/* ===== GLOBAL ===== */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0f0f0f;
    color: #fff;
    line-height: 1.4;
    overflow-x: hidden;
}

/* ===== NOTIFICATION AJOUT ===== */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, #4dcaff, #00e5ff);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 15px 35px rgba(77,202,255,0.4);
    z-index: 2000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.notification:not(.hidden) {
    transform: translateX(0);
    opacity: 1;
}

.notification.hidden {
    display: block;
}

/* Correction sticky header */
#accueil {
    scroll-margin-top: 80px;
}

/* ===== NAVBAR ===== */
header {
    position: sticky;
    top: 0;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 1000;
}

.navbar {
    max-width: 1200px;
    margin: auto;
    padding: 0.6rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO mieux mis en valeur */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left:-300px;
    margin-left: 120px;
    margin-right: -100px;
    margin-left: -190px;
}

.logo img {
    height: 80px;
    max-width: 180px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(77,202,255,0.45));
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.logo img:hover {
    transform: translateY(-2px) scale(1.07);
    filter: drop-shadow(0 8px 18px rgba(77,202,255,0.7));
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0.5rem 0;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4dcaff, #6fd8ff);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

nav ul li a:hover::before {
    width: 100%;
}

nav ul li a:hover {
    color: #4dcaff;
    transform: translateY(-2px);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4) contrast(1.1);
    transition: filter 0.6s ease;
}

.hero:hover .hero-video {
    filter: brightness(0.5) contrast(1.2);
}

.hero-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15,15,15,0.9) 0%, rgba(15,15,15,0.7) 50%, rgba(15,15,15,0) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    animation: slideInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
}

@keyframes slideInUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, #4dcaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: #ccc;
    margin-bottom: 2rem;
}

/* ===== BOUTONS GÉNÉRIQUES ===== */
.btn,
.btn-small,
.btn-remove {
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
}

/* Bouton principal */
.btn {
    background: linear-gradient(135deg, #00e5ff, #008cff);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: inline-block;
    box-shadow: 0 8px 25px rgba(77,202,255,0.4);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 35px rgba(77,202,255,0.6);
}

/* Bouton "Regarder" */
.btn-small {
    background: linear-gradient(135deg, #4dcaff, #00e5ff);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-small:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(77,202,255,0.4);
}

/* Bouton "Retirer" */
.liste-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.btn-remove {
    background: transparent;
    border: 1px solid #ff4d6a;
    color: #ff4d6a;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    align-self: center;
    transition: all 0.25s ease;
    box-shadow: 0 0 0 rgba(255, 77, 106, 0);
}

.btn-remove:hover {
    background: linear-gradient(135deg, #ff4d6a, #ff7b7b);
    color: #fff;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 18px rgba(255, 77, 106, 0.4);
}

.btn-remove:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 3px 10px rgba(255, 77, 106, 0.3);
}

/* ===== MA LISTE MINI ===== */
.ma-liste-mini {
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.ma-liste-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.ma-liste-header h2 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #4dcaff, #6fd8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.ma-liste-header p {
    color: #ccc;
    font-size: 1.1rem;
}

.ma-liste-scroll {
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    scrollbar-width: thin;
    scrollbar-color: #4dcaff #2a2a2a;
    background: linear-gradient(145deg, #1a1a1a, #222);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.liste-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.liste-item:hover {
    background: rgba(77,202,255,0.1);
    transform: translateX(5px);
}

.liste-item img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.liste-item h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* ===== MAIN ===== */
main {
    max-width: 1400px;
    margin: auto;
    padding: 0 2rem 4rem;
}

/* ===== BARRE DE RECHERCHE ===== */
.search-container {
    max-width: 600px;
    margin: 2.5rem auto 1rem;
    padding: 0 1rem;
    text-align: center;
}

#search-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(10,10,10,0.9);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    box-shadow: 0 0 0 rgba(77,202,255,0);
    transition: all 0.3s ease;
}

#search-input::placeholder {
    color: #777;
}

#search-input:focus {
    border-color: #4dcaff;
    box-shadow: 0 0 0 2px rgba(77,202,255,0.3);
    background: #111;
}

.search-no-result {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #ff7070;
}

/* ===== VIDEO GRID ===== */
.video-section {
    margin-bottom: 4rem;
}

.category-section {
    margin-bottom: 6rem;
}

.category-section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 2.5rem;
    color: #4dcaff;
    text-align: center;
    position: relative;
    font-weight: 800;
}

.category-section h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #4dcaff, #6fd8ff, #4dcaff);
    border-radius: 2px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px #4dcaff; }
    to { box-shadow: 0 0 20px #4dcaff; }
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.video-item {
    background: linear-gradient(145deg, #1a1a1a, #222);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.05);
}

.video-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(77,202,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 1;
}

.video-item:hover::before {
    opacity: 1;
}

.video-item:hover {
    transform: translateY(-12px) rotateX(5deg) rotateY(5deg);
    box-shadow:
        0 25px 50px rgba(0,0,0,0.6),
        0 0 30px rgba(77,202,255,0.3);
}

.video-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    z-index: 2;
}

.video-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.video-item:hover img {
    transform: scale(1.1) rotate(1deg);
    filter: brightness(1.15) contrast(1.1);
}

.video-info {
    padding: 1.2rem;
    position: relative;
    z-index: 2;
}

.video-info h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: #fff;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.anime-source {
    font-size: 0.85rem;
    color: #4dcaff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(77,202,255,0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    display: inline-block;
}

.add-list-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00b7ff, #6fd8ff);
    border: 2px solid rgba(255,255,255,0.9);
    color: #fff;
    font-weight: 900;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 4;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 25px rgba(77,202,255,0.4);
}

.video-item:hover .add-list-btn {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.add-list-btn:hover {
    transform: scale(1.2) rotate(5deg);
    background: linear-gradient(135deg, #6fd8ff, #4dcaff);
    box-shadow: 0 12px 35px rgba(77,202,255,0.6);
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #aaa;
    background: linear-gradient(180deg, #111, #0f0f0f);
    margin-top: 6rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.7rem 1rem;
    }

    .logo img {
        height: 60px;
        max-width: 150px;
    }

    nav ul {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        height: 45vh;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .notification {
        top: 80px;
        right: 10px;
        left: 10px;
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 1.5rem;
    }

    .video-item img {
        height: 220px;
    }

    .ma-liste-mini {
        padding: 0 1rem;
        margin: 2rem auto;
    }

    .ma-liste-scroll {
        max-height: 250px;
    }

    .liste-item {
        flex-direction: column;
        text-align: center;
    }

    .liste-item img {
        width: 100%;
        height: 120px;
        max-width: 150px;
    }

    .btn-remove {
        margin-top: 0.6rem;
        align-self: center;
    }

    .search-container {
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1.2rem;
    }

    .video-item img {
        height: 190px;
    }

    .video-info {
        padding: 1rem;
    }

    .video-info h3 {
        font-size: 0.95rem;
    }
}
