/* assets/css/style.css */

/* ==========================================================================
   Variables et Styles de Base
   ========================================================================== */
:root {
    --primary-color: #9c5096;
    --accent-color: #00f5ca;
    --dark-bg: #111111;
    --card-bg: #1a1a1a;
    --header-bg: rgba(26, 26, 26, 0.85);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-light: #f5f5f5;
    --text-dark: #111111;
    --text-muted: #a0a0a0;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    --border-radius: 12px;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Désactive le flash bleu sur les clics mobiles */
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Aide les navigateurs (dont Windows/Chrome/Edge) à choisir des menus contextuels sombres */
    color-scheme: dark;
}

/* ==========================================================================
   Layout Principal de l'Application
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    flex-shrink: 0;
}

.app-root {
    flex-grow: 1;
    padding-top: 70px; /* Espace pour le header */
    padding-bottom: 80px; /* Espace pour la nav du bas */
    width: 100%;
    display: flex;
    flex-direction: column;
}

.main-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    flex-shrink: 0;
}

.page-container {
    padding: 1.5rem;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* ==========================================================================
   Arrière-plan Animé
   ========================================================================== */
.background-glow { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; overflow: hidden; }
.firefly { position: absolute; border-radius: 50%; }
.firefly.large.fixed { filter: blur(200px); opacity: 0.3; }
#glow1 { width: 700px; height: 700px; top: -25%; left: -15%; background-color: var(--primary-color); }
#glow2 { width: 600px; height: 600px; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: var(--accent-color); }
#glow3 { width: 550px; height: 550px; bottom: -30%; right: -20%; background-color: #3533cd; }


/* ==========================================================================
   Composants UI Réutilisables
   ========================================================================== */

/* --- Boutons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--accent-color);
    color: var(--dark-bg);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 245, 202, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}
.btn-secondary:hover {
    background: var(--accent-color);
    color: var(--dark-bg);
}

.btn-danger {
    background: var(--error-color);
    color: var(--text-light);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Cartes --- */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.card-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* --- Formulaires --- */
.form-group {
    margin-bottom: 1.5rem;
}
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.9rem;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-light) 50%),
                      linear-gradient(135deg, var(--text-light) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(1em + 2px), calc(100% - 15px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    /* Sur Windows, forcer couleurs internes pour contraste */
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Options du select (meilleure lisibilité sur Windows menus natifs) */
.form-select option {
    color: #000; /* Les listes déroulantes natives utilisent souvent fond clair -> texte noir lisible */
    background-color: #fff;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}
.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* --- Loader --- */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    width: 100%;
    flex-grow: 1;
}
.loader {
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Header Principal
   ========================================================================== */
.header-content {display:flex;justify-content:space-between;align-items:center;padding:0 1.5rem;height:60px;background:var(--header-bg);backdrop-filter:blur(10px);} /* border-bottom removed to eliminate underline */
.header-logo .fei-logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
}
.header-logo .fei { color: var(--text-light); }
.header-logo .separator { color: var(--accent-color); }
.header-logo .cv { color: var(--text-light); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.action-icon {
    position: relative;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-icon img.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    object-fit: cover;
}
.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    background-color: var(--error-color);
    border-radius: 50%;
    border: 1px solid var(--dark-bg);
}

/* Notifications */
.notification-item.notification-read {
    opacity: 0.6;
    border-left-color: var(--border-color) !important;
}

/* --- Dropdown Menu --- */
.dropdown-menu {
    position: absolute;
    top: 55px;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 1100;
    width: 220px;
    overflow: hidden;
    display: none;
    animation: dropdown-fade 0.2s ease-out;
}
.dropdown-menu.active { display: block; }
@keyframes dropdown-fade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.dropdown-menu ul { list-style: none; }
.dropdown-menu li a, .dropdown-menu li button {
    display: block;
    padding: 0.8rem 1.2rem;
    color: var(--text-light);
    text-decoration: none;
    transition: background-color 0.2s ease;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}
.dropdown-menu li a:hover, .dropdown-menu li button:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

/* ==========================================================================
   Barre de Navigation Inférieure
   ========================================================================== */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 70px;
    background: var(--header-bg);
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    flex-grow: 1;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
}
.nav-item.active {
    color: var(--accent-color);
}
.nav-item:hover {
    color: var(--text-light);
}
.nav-icon {
    font-size: 1.5rem; /* Utiliser des icônes SVG/font plus tard */
    margin-bottom: 4px;
}
.nav-label {
    font-size: 0.75rem;
    font-weight: 500;
}

/* ==========================================================================
   Styles Spécifiques aux Vues
   ========================================================================== */

/* --- Dashboard --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.2rem;
    border-radius: var(--border-radius);
    text-align: center;
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}
.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}
.completion-card {
    background: linear-gradient(45deg, rgba(156, 80, 150, 0.2), rgba(0, 245, 202, 0.2));
    border-color: var(--accent-color);
}

/* --- Recherche & Connexions (Profile List) --- */
.profile-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.profile-card {background-color: var(--card-bg);border:1px solid var(--border-color);border-radius:var(--border-radius);padding:0.9rem;display:flex;flex-direction:column;gap:0.75rem;transition:background-color .2s ease;}
.profile-card:hover {background-color:rgba(255,255,255,0.03);}
.profile-card-main-row {display:flex;align-items:center;gap:0.9rem;}
.profile-card-avatar img {width:56px;height:56px;border-radius:50%;object-fit:cover;}
.profile-card-info {flex:1;display:flex;flex-direction:column;justify-content:center;min-width:0;}
.profile-card-name {font-weight:600;color:var(--text-light);line-height:1.2;}
.profile-card-details {font-size:0.8rem;color:var(--text-muted);margin-top:0.2rem;line-height:1.1;}
.profile-card-actions {width:100%;display:flex;}
.profile-card-actions .btn, .profile-card-actions .status-badge {flex:1;display:inline-flex;justify-content:center;align-items:center;width:100%;}
.profile-card-actions .btn {padding:0.55rem 1rem;font-size:0.9rem;}

/* Responsive: s'assurer que les boutons d'action se placent côte à côte et regressent proprement */
@media (max-width: 480px) {
    .profile-card-main-row {align-items:flex-start;}
    .profile-card-avatar img {width:60px;height:60px;}
    .profile-card-actions {flex-direction:column;gap:0.5rem;}
    .profile-card-actions .btn {flex:1 1 100%;}
    .tabs { overflow-x: auto; }
}

/* Search view: compact single-line profile items on small screens */
@media (max-width: 420px) {
    .profile-card-name {font-size:0.95rem;}
    .profile-card-details {font-size:0.7rem;}
    .profile-card-avatar img {width:54px;height:54px;}
}
.status-badge {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50px;
    color: var(--text-light);
    background-color: var(--text-muted);
}
.status-badge.pending { background-color: var(--warning-color); }

/* --- Onglets --- */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}
.tab-item {
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    border: none;
    background: none;
    font-size: 1rem;
}
.tab-item.active {
    color: var(--accent-color);
}
.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* --- Profil --- */
.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-color);
    margin-bottom: 0.5rem;
    display: block; /* Force l'affichage en bloc pour éviter les déformations */
}

#change-avatar-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

/* Animation pour les spinners de chargement */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-name {
    font-size: 1.8rem;
    font-family: var(--font-heading);
}
.profile-position {
    font-size: 1.1rem;
    color: var(--text-muted);
}
.profile-section {
    margin-bottom: 2rem;
}
.profile-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.profile-info-list li {
    list-style: none;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}
.profile-info-list li strong {
    color: var(--text-light);
}
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.skill-tag {
    background: rgba(0, 245, 202, 0.1);
    color: var(--accent-color);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}