/* Bouton Suggestions dans le header */
.suggest-btn {
    background: white;
    color: #9d4edd;
    border: 2px solid white;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    text-decoration: none;
}

.suggest-btn:hover {
    background: #9d4edd;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.suggest-btn i {
    font-size: 1.1rem;
}

/* Modal de suggestion */
.suggestion-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.suggestion-modal.active {
    display: flex;
}

.suggestion-modal-content {
    background: linear-gradient(180deg, #2d004d, #1a0033);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 600px;
    width: 90%;
    border: 2px solid #9d4edd;
    box-shadow: 0 20px 60px rgba(157, 78, 221, 0.4);
    animation: slideUp 0.4s ease;
}

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

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

.suggestion-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.suggestion-modal-title {
    font-size: 2rem;
    font-weight: 900;
    color: #c77dff;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.suggestion-modal-title i {
    font-size: 2.5rem;
}

.suggestion-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.suggestion-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.suggestion-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.suggestion-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.suggestion-form-group label {
    color: #e0aaff;
    font-weight: 600;
    font-size: 1.1rem;
}

.suggestion-form-group select,
.suggestion-form-group input,
.suggestion-form-group textarea {
    padding: 1rem;
    border: 2px solid rgba(157, 78, 221, 0.4);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.suggestion-form-group select:focus,
.suggestion-form-group input:focus,
.suggestion-form-group textarea:focus {
    outline: none;
    border-color: #c77dff;
    background: rgba(255, 255, 255, 0.1);
}

.suggestion-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.suggestion-form-group select {
    cursor: pointer;
}

.suggestion-form-group option {
    background: #1a0033;
    color: white;
}

.suggestion-submit-btn {
    background: linear-gradient(135deg, #9d4edd, #c77dff);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 10px 30px rgba(157, 78, 221, 0.4);
}

.suggestion-submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(157, 78, 221, 0.6);
}

.suggestion-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Message de confirmation */
.suggestion-message {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: center;
}

.suggestion-message.success {
    background: rgba(40, 167, 69, 0.2);
    border: 2px solid #28a745;
    color: #28a745;
}

.suggestion-message.error {
    background: rgba(220, 53, 69, 0.2);
    border: 2px solid #dc3545;
    color: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    .suggestion-modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .suggestion-modal-title {
        font-size: 1.5rem;
    }

    .suggest-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* ============================================
   SEARCH AUTOCOMPLETE SUGGESTIONS
   ============================================ */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(18, 16, 28, 0.98);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.15);
}

.search-suggestions.active {
    display: block;
    animation: suggestionsSlide 0.2s ease;
}

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

.search-suggestions-header {
    padding: 0.8rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-hover, #a78bfa);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
    background: rgba(139, 92, 246, 0.05);
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(139, 92, 246, 0.08);
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover,
.search-suggestion-item.selected {
    background: rgba(139, 92, 246, 0.15);
}

.search-suggestion-thumb {
    width: 50px;
    height: 70px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(109, 40, 217, 0.3));
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-suggestion-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-suggestion-thumb i {
    font-size: 1.5rem;
    color: rgba(139, 92, 246, 0.6);
}

.search-suggestion-info {
    flex: 1;
    min-width: 0;
}

.search-suggestion-title {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestion-title mark {
    background: transparent;
    color: var(--primary-hover, #a78bfa);
    font-weight: 700;
}

.search-suggestion-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.search-suggestion-type {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.search-suggestion-type.film {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.search-suggestion-type.série,
.search-suggestion-type.series {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.search-suggestion-type.anime {
    background: rgba(244, 114, 182, 0.2);
    color: #f472b6;
}

.search-suggestion-genres {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: 2rem 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.search-no-results i {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    color: rgba(139, 92, 246, 0.4);
    display: block;
}

/* Scrollbar for suggestions */
.search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: transparent;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* Responsive search suggestions */
@media (max-width: 768px) {
    .search-suggestions {
        position: fixed;
        top: 70px;
        left: 1rem;
        right: 1rem;
        max-height: calc(100vh - 100px);
    }

    .search-suggestion-thumb {
        width: 40px;
        height: 56px;
    }
}
