/* styles/recherche.css - Version mobile first */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f2f5f9;
    color: #1e293b;
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
}


/* Header */

.page-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9eef2;
}

.logo-link {
    text-decoration: none;
    align-self: center;
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(145deg, #2d3a5e, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.header-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.nav-link {
    color: #546a7a;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 2rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.nav-link i {
    font-size: 1rem;
}

.nav-link:hover,
.nav-link.active {
    color: #4f46e5;
    background: #edf2ff;
}


/* Main content */

.search-container {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 1.2rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    min-height: 60vh;
}

.page-title {
    margin-bottom: 1.5rem;
    text-align: center;
}

.page-title h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.3rem;
}

.subtitle {
    color: #546a7a;
    font-size: 0.9rem;
}


/* Barre de recherche */

.search-box {
    position: relative;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 2.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 3rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    background: #f8fafc;
}

.search-input:focus {
    outline: none;
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}


/* Loading spinner */

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #4f46e5;
    font-size: 1rem;
}


/* Messages */

.error-message,
.info-message {
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.error-message {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #b91c1c;
}

.info-message {
    background: #e6f0ff;
    border-left: 4px solid #3b82f6;
    color: #1e4b8f;
}


/* Liste des résultats */

.results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}


/* Carte utilisateur */

.user-card {
    background: #f9fafc;
    border-radius: 1rem;
    padding: 1rem;
    border: 1px solid #edf2f7;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.user-card:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.avatar {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    overflow: hidden;
}

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

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

.full-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #0f172a;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}

.username {
    font-size: 0.9rem;
    color: #4f46e5;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.username i {
    font-size: 0.8rem;
    color: #64748b;
}


/* Aucun résultat / suggestion */

.no-results,
.initial-suggestion {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

.no-results i,
.initial-suggestion i {
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.no-results p,
.initial-suggestion p {
    margin-bottom: 0.5rem;
}

.suggestion {
    font-size: 0.9rem;
    color: #94a3b8;
}

.initial-suggestion i {
    color: #4f46e5;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}


/* Footer */

.page-footer {
    text-align: center;
    padding: 1.5rem 0 0;
    color: #7f8fa3;
    font-size: 0.8rem;
    border-top: 1px solid #e9eef2;
}


/* Responsive tablettes et plus */

@media (min-width: 768px) {
    .page-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .logo-link {
        align-self: auto;
    }
    .header-nav {
        justify-content: flex-end;
    }
    .search-container {
        padding: 2rem;
    }
}