/* css/ruche.css */

/* --- Mise en page principale --- */
.main-content-wrapper {
    display: flex;
    gap: 20px;
    height: calc(100vh - 75px - 20px - 70px);
    padding: 20px;
}
.ruche-list-column {
    width: 380px;
    flex-shrink: 0;
    background-color: rgba(15, 20, 25, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(104, 253, 214, 0.25);
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}
.ruche-details-column {
    flex-grow: 1;
    background-color: rgba(15, 20, 25, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(104, 253, 214, 0.25);
    border-radius: 12px;
    padding: 25px;
    overflow-y: auto;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}
.no-selection {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #888;
    text-align: center;
}
.no-selection img { width: 100px; height: 100px; opacity: 0.3; margin-bottom: 20px; }
.loading-text, .error-text { text-align: center; padding: 40px; font-size: 1.2em; color: #aaa; }
.error-text { color: #ff6b6b; }

/* --- BOUTONS PREMIUM SCI-FI --- */
.ruche-button {
    flex-grow: 1;
    padding: 12px 20px;
    background: rgba(20, 25, 30, 0.6);
    color: #e0f7fa;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 1.05em;
    font-weight: bold;
    font-family: 'h73bold', sans-serif;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.ruche-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.ruche-button.action {
    border-color: rgba(104, 253, 214, 0.4);
    color: #68fdd6;
    background: rgba(104, 253, 214, 0.05);
}
.ruche-button.action:hover {
    background: rgba(104, 253, 214, 0.15);
    border-color: #68fdd6;
    box-shadow: 0 0 20px rgba(104, 253, 214, 0.4), inset 0 0 10px rgba(104, 253, 214, 0.2);
    color: #fff;
    text-shadow: 0 0 5px rgba(104, 253, 214, 0.8);
}

.ruche-button.secondary {
    border-color: rgba(163, 122, 204, 0.4);
    color: #c099e0;
    background: rgba(163, 122, 204, 0.05);
}
.ruche-button.secondary:hover {
    background: rgba(163, 122, 204, 0.15);
    border-color: #a37acc;
    box-shadow: 0 0 20px rgba(163, 122, 204, 0.4), inset 0 0 10px rgba(163, 122, 204, 0.2);
    color: #fff;
    text-shadow: 0 0 5px rgba(163, 122, 204, 0.8);
}

.ruche-button.danger {
    border-color: rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
}
.ruche-button.danger:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.4), inset 0 0 10px rgba(255, 107, 107, 0.2);
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.8);
}

.ruche-button.small {
    padding: 8px 15px;
    font-size: 0.85em;
    flex-grow: 0;
}

/* ========================================================= */
/* --- INTERFACE TACTIQUE : LISTE DES RUCHES (COMMAND DECK) --- */
/* ========================================================= */

.ruche-list-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px; 
}

.ruche-divider {
    display: none; 
}

.ruche-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px; 
    padding-bottom: 10px;
}

/* Bonus Premium : Scrollbar personnalisée pour la liste */
.ruche-list-column::-webkit-scrollbar { width: 6px; }
.ruche-list-column::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 8px; margin-block: 10px; }
.ruche-list-column::-webkit-scrollbar-thumb { background: rgba(104, 253, 214, 0.3); border-radius: 8px; }
.ruche-list-column::-webkit-scrollbar-thumb:hover { background: rgba(104, 253, 214, 0.6); }

/* En-tête Command Deck */
.ruche-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px; 
    padding: 12px 15px;
    background: rgba(104, 253, 214, 0.03);
    border-left: 4px solid #68fdd6;
    border-radius: 0 8px 8px 0;
}

.ruche-list-header h3 {
    color: #68fdd6;
    font-size: 1rem;
    font-family: 'h73bold', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    text-shadow: 0 0 10px rgba(104, 253, 214, 0.3);
}

.ruche-count-badge {
    background: rgba(104, 253, 214, 0.1);
    color: #68fdd6;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    border: 1px solid rgba(104, 253, 214, 0.3);
    box-shadow: 0 0 10px rgba(104, 253, 214, 0.1);
}

/* --- ITEMS DE LA LISTE (STYLE HUD ASYMÉTRIQUE) --- */
.ruche-list-item {
    background: rgba(10, 15, 20, 0.4);
    /* Découpe Sci-Fi sur les coins opposés */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
    padding: 18px;
    margin-bottom: 12px;
    border: 1px solid rgba(104, 253, 214, 0.15);
    border-left: 3px solid rgba(104, 253, 214, 0.3);
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.ruche-list-item:hover {
    background: rgba(104, 253, 214, 0.05);
    border-color: rgba(104, 253, 214, 0.5);
    border-left-color: #68fdd6;
    transform: translateX(8px);
    box-shadow: -5px 0 15px rgba(104, 253, 214, 0.1);
}

.ruche-list-item.active {
    background: linear-gradient(90deg, rgba(163, 122, 204, 0.15) 0%, rgba(10, 15, 20, 0.6) 100%);
    border-color: rgba(163, 122, 204, 0.4);
    border-left: 4px solid #a37acc;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); /* On remet les coins droits pour l'item actif */
    box-shadow: -5px 0 20px rgba(163, 122, 204, 0.2);
}

/* --- INFOS RUCHE & BADGES --- */
.ruche-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.ruche-item-info { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; }

.ruche-item-info h4 {
    margin: 0 0 5px 0;
    color: #fff;
    font-size: 1.15rem;
    font-family: 'h73bold', sans-serif;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    word-break: break-word;
}

.ruche-list-item:hover .ruche-item-info h4 {
    color: #68fdd6;
}

.ruche-list-item.active .ruche-item-info h4 {
    color: #c099e0;
}

/* Badge Serveur (Style Code source) */
.ruche-item-info .server-name {
    font-family: monospace;
    font-size: 0.75rem;
    color: rgba(104, 253, 214, 0.6);
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(104, 253, 214, 0.1);
    align-self: flex-start;
}

.ruche-item-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Badge Membres (Type Compteur Tactique) */
.member-count {
    font-family: 'h73bold', sans-serif;
    font-size: 0.8rem;
    background: rgba(104, 253, 214, 0.1);
    color: #68fdd6;
    border: 1px solid rgba(104, 253, 214, 0.2);
    padding: 4px 10px;
    border-radius: 2px;
    letter-spacing: 1px;
}

/* --- DESCRIPTION (HUD SUBTEXT) --- */
.ruche-item-desc {
    font-size: 0.8rem;
    color: rgba(224, 247, 250, 0.5);
    font-style: italic;
    border-left: 1px solid rgba(104, 253, 214, 0.2);
    padding-left: 10px;
    margin: 5px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limite à 2 lignes */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- FOOTER & ACTIONS RAPIDES --- */
.ruche-item-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.ruche-item-quick-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-wrap: wrap; 
    justify-content: flex-end;
}

.ruche-list-item:hover .ruche-item-quick-actions,
.ruche-list-item.active .ruche-item-quick-actions {
    opacity: 1; 
    transform: translateX(0);
}

.quick-action-btn {
    background: rgba(20, 25, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-family: 'h73light', sans-serif;
    text-transform: uppercase;
    font-size: 0.6rem;
    letter-spacing: 1px;
    padding: 5px 8px;
    clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    color: #fff;
    transform: scale(1.05);
}

.quick-action-btn.edit-btn:hover {
    background: rgba(104, 253, 214, 0.2);
    border-color: #68fdd6;
    color: #68fdd6;
}

.quick-action-btn.delete-btn:hover {
    background: rgba(255, 82, 82, 0.2);
    border-color: #ff5252;
    color: #ff5252;
}

/* --- Formulaires avec Labels Premium --- */
.ruche-form { 
    display: flex; 
    flex-direction: column; 
}
.ruche-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    text-align: left;
}
.ruche-form-group label {
    font-size: 0.85em;
    color: #a0a0a0;
    font-family: 'h73bold', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-left: 5px;
}
.ruche-form-group input, 
.ruche-form-group textarea, 
.ruche-form-group select {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid rgba(104, 253, 214, 0.2);
    border-radius: 8px;
    background-color: rgba(10, 15, 20, 0.6);
    backdrop-filter: blur(8px);
    color: #e0f7fa;
    font-size: 1.05em;
    font-family: h73light, sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}
.ruche-form-group textarea { min-height: 80px; resize: vertical; }
.ruche-form-group input:hover, .ruche-form-group textarea:hover, .ruche-form-group select:hover {
    border-color: rgba(104, 253, 214, 0.5);
    background-color: rgba(104, 253, 214, 0.05);
}
.ruche-form-group input:focus, .ruche-form-group textarea:focus, .ruche-form-group select:focus {
    outline: none;
    border-color: #68fdd6;
    box-shadow: 0 0 15px rgba(104, 253, 214, 0.3), inset 0 0 10px rgba(104, 253, 214, 0.1);
    background-color: rgba(15, 20, 25, 0.8);
}

/* --- Notifications (Toasts) Premium --- */
#ruche-toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
}
.ruche-toast {
    background: rgba(20, 25, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: 4px solid #68fdd6;
    border-radius: 8px;
    padding: 16px 24px;
    color: #e0f7fa;
    font-family: 'h73light', sans-serif;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 15px rgba(104, 253, 214, 0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.ruche-toast.show {
    transform: translateX(0);
}
.ruche-toast.error {
    border-left-color: #ff6b6b;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 107, 107, 0.15);
}
.ruche-toast svg {
    flex-shrink: 0;
}

/* --- Colonne de Droite (Détails Ruche) --- */
.ruche-header {
    background: linear-gradient(180deg, rgba(104, 253, 214, 0.05) 0%, rgba(0,0,0,0) 100%);
    border-radius: 12px;
    border: 1px solid rgba(104, 253, 214, 0.15);
    padding: 35px 30px;
    margin-bottom: 40px;
    box-shadow: inset 0 20px 50px rgba(0,0,0,0.3);
    position: relative;
    text-align: center;
    overflow: hidden;
}
.ruche-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, #68fdd6, transparent);
    box-shadow: 0 0 10px #68fdd6;
}
.ruche-header h2 {
    font-size: 2.8em;
    color: #68fdd6;
    text-shadow: 0 0 15px rgba(104, 253, 214, 0.6);
    margin-top: 0;
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-family: 'h73bold', sans-serif;
}
.ruche-header .server-name {
    display: inline-block;
    background: rgba(104, 253, 214, 0.1);
    color: #e0f7fa;
    padding: 6px 18px;
    border-radius: 20px;
    border: 1px solid rgba(104, 253, 214, 0.3);
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 20px;
    letter-spacing: 1px;
}
.ruche-header p {
    color: #b0b0b0;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    font-size: 1.1em;
}

.members-title {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #e0f7fa;
    font-size: 1.6em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
    font-family: 'h73bold', sans-serif;
}
.members-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(104, 253, 214, 0.4), transparent);
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* ========================================================= */
/* --- INTERFACE TACTIQUE : MEMBER-CARD (HUD EDITION) --- */
/* ========================================================= */

.member-card {
    background: radial-gradient(circle at top right, rgba(104, 253, 214, 0.05), transparent),
                rgba(10, 15, 20, 0.95);
    clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
    border: 1px solid rgba(104, 253, 214, 0.2);
    padding: 25px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* Animation d'apparition */
    opacity: 0; 
    animation: cardFadeIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    overflow: hidden;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- EFFET DE SCAN HOLOGRAPHIQUE AU SURVOL (CORRIGÉ) --- */
.member-card::after {
    content: '';
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 2px; /* Rendu plus fin */
    
    /* Couleurs beaucoup plus subtiles (opacité à 0.3 au lieu de 0.8) */
    background: linear-gradient(90deg, transparent, rgba(104, 253, 214, 0.3), transparent);
    box-shadow: 0 0 10px rgba(104, 253, 214, 0.2), 0 15px 15px rgba(104, 253, 214, 0.05);
    
    opacity: 0;
    pointer-events: none;
    
    /* CORRECTION DU CHEVAUCHEMENT : 
       Le faisceau passe derrière .member-header et .member-section (qui sont à z-index: 1) */
    z-index: 0; 
    
    /* MODE DE FUSION : Force le rayon à réagir comme de la lumière (incrustation) */
    mix-blend-mode: screen;
}

.member-card:hover::after {
    /* Opacité globale légèrement réduite pour éviter d'aveugler l'utilisateur */
    opacity: 0.8;
    
    /* Animation légèrement ralentie (2s au lieu de 1.5s) pour un effet plus "calme" */
    animation: holographScan 2s linear infinite; 
}

@keyframes holographScan {
    0% { top: -10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 110%; opacity: 0; }
}

.member-card:hover {
    border-color: rgba(104, 253, 214, 0.5);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(104, 253, 214, 0.05);
}

/* Carte de l'utilisateur connecté (VOUS) */
.member-card.is-me {
    border-color: rgba(104, 253, 214, 0.6);
    box-shadow: 0 0 20px rgba(104, 253, 214, 0.15);
}

/* Carte LEADER */
.member-card.leader {
    border-color: rgba(255, 215, 0, 0.4);
}

/* En-tête de carte (Style Terminal) */
.member-header {
    border-bottom: 2px solid rgba(104, 253, 214, 0.3);
    padding-bottom: 15px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.member-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.member-identity h4 {
    font-family: 'h73bold', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #68fdd6;
    text-shadow: 0 0 10px rgba(104, 253, 214, 0.3);
    margin: 0;
    font-size: 1.3em;
}

.member-card.leader .member-identity h4 {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Badges de statut */
.you-badge, .leader-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}
.you-badge {
    background: rgba(104, 253, 214, 0.15);
    color: #68fdd6;
    border: 1px solid rgba(104, 253, 214, 0.3);
    box-shadow: 0 0 10px rgba(104, 253, 214, 0.2);
}
.leader-badge {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* Sections internes (Modules de données) */
.member-section {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 15px;
    position: relative;
    z-index: 1;
}

.member-section-title {
    font-family: 'h73light', sans-serif;
    font-size: 0.75rem;
    color: rgba(104, 253, 214, 0.7);
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.member-section-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(104, 253, 214, 0.3), transparent);
}

/* --- CLASSE (HUD STYLE) --- */
.classe-placeholder, .member-class-display-section {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(104, 253, 214, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
}
.classe-placeholder {
    cursor: pointer;
    border-style: dashed;
}
.classe-placeholder:hover {
    border-style: solid;
    background: rgba(104, 253, 214, 0.1);
    box-shadow: inset 0 0 15px rgba(104, 253, 214, 0.15);
}
.classe-placeholder img, .member-class-display-section img {
    width: 35px; height: 35px; flex-shrink: 0;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
}
.classe-placeholder span, .member-class-display-section span {
    font-size: 1.1em; font-weight: bold; color: #e0f7fa; letter-spacing: 0.5px;
}

/* --- GRILLES TECHNOLOGIES --- */
.maitrises-selection-area, .member-maitrises-list { margin-top: 0; padding-top: 0; }
.member-maitrises-list, #user-tech-grid {
    display: flex;
    flex-direction: column; /* Force le stack vertical type HUD */
    gap: 10px;
}

/* En-tête des actions de gestion des techs (Vos technologies) */
.maitrises-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.maitrises-header h4 { color: #ccc; font-size: 1em; margin: 0; }
.maitrises-actions { 
    display: flex; 
    gap: 10px; 
    margin-top: 15px; 
    padding-top: 15px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}
.maitrises-actions .ruche-button {
    flex: 1;
}

/* --- SLOTS DE TECHNOLOGIES (VERSION FINALE HUD) --- */
.tech-premium-slot, .maitrise-display-item {
    width: 100%;
    box-sizing: border-box;
    background: rgba(20, 25, 30, 0.6);
    border: 1px solid rgba(104, 253, 214, 0.1);
    border-left: 4px solid #68fdd6;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between; 
    gap: 15px;
    transition: all 0.2s ease;
    border-radius: 4px;
    cursor: pointer;
}

.tech-info-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.tech-premium-slot:hover, .maitrise-display-item:hover {
    background: rgba(104, 253, 214, 0.05);
    border-color: rgba(104, 253, 214, 0.4);
    transform: translateX(5px);
}

.tech-premium-slot .tech-slot-img, .maitrise-display-item img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.8));
    flex-shrink: 0;
}

.tech-premium-slot .tech-slot-name, .maitrise-display-item span {
    font-size: 0.85em;
    color: #e0f7fa;
    font-weight: 600;
    white-space: normal; 
    word-wrap: break-word;
    line-height: 1.3;
}

/* Bouton de suppression aligné à droite (Caché par défaut) */
.remove-tech-btn {
    margin-left: auto; 
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.2);
    color: #ff5252;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none; 
}

/* Apparition fluide au survol de la carte */
.tech-premium-slot:hover .remove-tech-btn {
    opacity: 1;
    pointer-events: auto;
}

.remove-tech-btn:hover {
    background: #ff5252;
    color: white;
    box-shadow: 0 0 15px rgba(255, 82, 82, 0.5);
    transform: rotate(90deg);
}

/* Bouton d'ajout harmonisé */
.empty-add-slot {
    justify-content: center !important;
    border: 1px dashed rgba(104, 253, 214, 0.4) !important;
    border-left: 4px solid rgba(104, 253, 214, 0.4) !important;
    color: #68fdd6;
    font-family: 'h73bold', sans-serif;
    letter-spacing: 1px;
    background: rgba(104, 253, 214, 0.02);
}
.empty-add-slot:hover {
    background: rgba(104, 253, 214, 0.08);
    border-color: #68fdd6 !important;
}

/* Helper vide */
.no-data {
    color: rgba(255,255,255,0.4);
    font-style: italic;
    font-size: 0.85em;
    display: block;
    text-align: center;
    padding: 10px;
}

/* Actions Admin/Chef de guilde (Boutons nommer chef / exclure) */
.member-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    z-index: 1;
}

/* --- Tooltips globaux --- */
.ruche-tooltip {
    display: none; 
    position: absolute; 
    z-index: 99999; 
    background-color: rgba(15, 20, 25, 0.95); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid #68fdd6; 
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 15px rgba(104, 253, 214, 0.3);
    padding: 12px; 
    border-radius: 8px; 
    font-size: 0.95em; 
    max-width: 300px; 
    pointer-events: none;
}
.ruche-tooltip strong { color: #68fdd6; display: block; margin-bottom: 5px; font-size: 1.1em;}
.ruche-tooltip hr { border: none; border-top: 1px solid rgba(104,253,214,0.2); margin: 8px 0; }

/* --- Structure Modales Générales --- */
.ruche-modal {
    display: none; 
    position: fixed; 
    z-index: 10010; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(5, 8, 12, 0.85); 
    backdrop-filter: blur(6px); 
    -webkit-backdrop-filter: blur(6px);
    align-items: center; 
    justify-content: center;
    animation: modalFadeIn 0.3s ease; 
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ruche-modal-content {
    background: linear-gradient(135deg, rgba(20, 25, 30, 0.95) 0%, rgba(10, 15, 20, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #68fdd6; 
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(104, 253, 214, 0.15);
    padding: 35px 40px; 
    width: 90%; 
    max-width: 480px; 
    border-radius: 12px; 
    position: relative;
    transform: translateY(0);
    animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ruche-modal-close {
    color: #666; 
    position: absolute; 
    top: 15px; 
    right: 20px;
    font-size: 28px; 
    font-weight: bold; 
    cursor: pointer;
    transition: all 0.2s ease;
}

.ruche-modal-close:hover { 
    color: #ff6b6b; 
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    transform: scale(1.1);
}

.ruche-modal-content h2 {
    color: #68fdd6;
    font-size: 1.8em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    text-shadow: 0 0 10px rgba(104, 253, 214, 0.4);
    border-bottom: 1px dashed rgba(104, 253, 214, 0.2);
    padding-bottom: 15px;
}

/* ========================================================= */
/* --- BANNIÈRE D'ALERTE PRIORITAIRE (TOP PLACEMENT HUD) --- */
/* ========================================================= */

.priority-alert-banner {
    margin-bottom: 25px;
    /* Fond type "Hachures de zone de danger" très subtil */
    background: repeating-linear-gradient(
        45deg,
        rgba(243, 156, 18, 0.03),
        rgba(243, 156, 18, 0.03) 10px,
        rgba(0, 0, 0, 0.5) 10px,
        rgba(0, 0, 0, 0.5) 20px
    );
    border: 1px solid rgba(243, 156, 18, 0.4);
    border-left: 5px solid #f39c12;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(243, 156, 18, 0.1);
    /* Animation de chute à l'affichage */
    animation: slideDownAlert 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideDownAlert {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-banner-header {
    display: flex;
    align-items: center;
    background: rgba(243, 156, 18, 0.15);
    padding: 12px 20px;
    border-bottom: 1px solid rgba(243, 156, 18, 0.3);
}

/* Le point lumineux qui clignote style radar */
.alert-pulse-indicator {
    width: 10px;
    height: 10px;
    background-color: #f39c12;
    border-radius: 50%;
    margin-right: 15px;
    box-shadow: 0 0 10px #f39c12;
    animation: radarBlink 1s infinite alternate;
}

@keyframes radarBlink {
    from { opacity: 1; transform: scale(1); box-shadow: 0 0 15px #f39c12; }
    to { opacity: 0.3; transform: scale(0.8); box-shadow: 0 0 2px #f39c12; }
}

.alert-title {
    color: #f39c12;
    font-family: 'h73bold', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    flex-grow: 1;
    text-shadow: 0 0 8px rgba(243, 156, 18, 0.5);
    margin: 0;
}

.alert-count {
    color: #fff;
    font-family: monospace;
    font-weight: bold;
    background: rgba(0,0,0,0.6);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(243, 156, 18, 0.5);
    font-size: 0.9rem;
}

/* --- LE CARROUSEL HORIZONTAL --- */
.alert-banner-content {
    padding: 15px 20px;
    background: rgba(10, 15, 20, 0.85);
}

.applicant-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 8px; /* Laisse la place pour la scrollbar */
    padding-top: 4px;
    margin-top: -4px;
}

/* Scrollbar premium pour le carrousel */
.applicant-carousel::-webkit-scrollbar { height: 6px; }
.applicant-carousel::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 4px; }
.applicant-carousel::-webkit-scrollbar-thumb { background: rgba(243, 156, 18, 0.3); border-radius: 4px; }
.applicant-carousel::-webkit-scrollbar-thumb:hover { background: rgba(243, 156, 18, 0.6); }

/* --- CARTES COMPACTES CANDIDATS --- */
.applicant-quick-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 250px;
    max-width: 300px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(243, 156, 18, 0.2);
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0; /* Empêche l'écrasement horizontal */
}

.applicant-quick-card:hover {
    border-color: rgba(243, 156, 18, 0.6);
    background: rgba(243, 156, 18, 0.1);
    transform: translateY(-2px);
}

.applicant-id {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0f7fa;
    font-family: 'h73bold', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.applicant-id svg {
    color: rgba(243, 156, 18, 0.8);
}

/* --- BOUTONS ACTIONS RAPIDES --- */
.applicant-actions {
    display: flex;
    gap: 8px;
}

.action-icon {
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-icon.approve-btn { color: #68fdd6; border: 1px solid rgba(104, 253, 214, 0.2); }
.action-icon.approve-btn:hover { background: rgba(104, 253, 214, 0.15); border-color: #68fdd6; box-shadow: 0 0 10px rgba(104, 253, 214, 0.3); }

.action-icon.deny-btn { color: #ff6b6b; border: 1px solid rgba(255, 107, 107, 0.2); }
.action-icon.deny-btn:hover { background: rgba(255, 107, 107, 0.15); border-color: #ff6b6b; box-shadow: 0 0 10px rgba(255, 107, 107, 0.3); }

/* --- État non connecté (Page Mes Ruches) --- */
.unlogged-hive-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: rgba(15, 20, 25, 0.65); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(104, 253, 214, 0.25);
    border-radius: 12px;
    padding: 50px 30px;
    margin: 40px auto;
    max-width: 700px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

.unlogged-hive-state .unlogged-icon {
    width: 100px;
    height: 100px;
    opacity: 0.6;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 8px rgba(104, 253, 214, 0.4)); 
}

.unlogged-hive-state h2 {
    color: #68fdd6; 
    font-size: 2.2em;
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(104, 253, 214, 0.5);
}

.unlogged-hive-state .hive-description {
    color: #ccc;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 15px;
}

.unlogged-hive-state .hive-description strong {
    color: #e0f7fa; 
}

.unlogged-hive-state .hive-call-to-action {
    color: #fff;
    font-weight: bold;
    margin-bottom: 30px;
}

.unlogged-hive-state .unlogged-actions {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* --- ÉTAT VIDE (AUCUNE RUCHE) PREMIUM --- */
.empty-hive-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    animation: modalFadeIn 0.8s ease;
}

.empty-hive-state .empty-hive-icon {
    width: 130px;
    height: 130px;
    opacity: 0.8;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 15px rgba(104, 253, 214, 0.5)); 
    animation: pulseGlow 3s infinite alternate; 
}

@keyframes pulseGlow {
    from { filter: drop-shadow(0 0 10px rgba(104, 253, 214, 0.3)); transform: scale(0.98); }
    to { filter: drop-shadow(0 0 25px rgba(104, 253, 214, 0.7)); transform: scale(1.02); }
}

.empty-hive-state h3 {
    color: #68fdd6;
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(104, 253, 214, 0.5);
}

.empty-hive-state p {
    color: #e0f7fa;
    font-size: 1.15em;
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.empty-hive-state .empty-hive-hint {
    color: #a0a0a0;
    font-size: 0.95em;
    padding: 15px 25px;
    border: 1px dashed rgba(104, 253, 214, 0.3);
    border-radius: 8px;
    background: rgba(10, 15, 20, 0.6);
    backdrop-filter: blur(4px);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}
.empty-hive-state .empty-hive-hint strong {
    color: #fff;
}

/* ========================================================================== */
/* --- MODALE DE SÉLECTION D'ITEMS (CLASSES / TECHNOLOGIES) PREMIUM --- */
/* ========================================================================== */

#item-selection-modal.builder-modal[style*="display: block"] {
    display: flex !important;
}

#item-selection-modal.builder-modal {
    position: fixed; 
    z-index: 10020; 
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(5, 8, 12, 0.85); 
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);
    align-items: center; 
    justify-content: center;
}

#item-selection-modal .builder-modal-content {
    background: linear-gradient(135deg, rgba(20, 25, 30, 0.95) 0%, rgba(10, 15, 20, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #a37acc; 
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(163, 122, 204, 0.15);
    padding: 35px 40px; 
    width: 90%; 
    max-width: 850px; 
    border-radius: 12px; 
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#item-selection-modal .builder-modal-close {
    color: #666; 
    position: absolute; 
    top: 15px; 
    right: 20px;
    font-size: 28px; 
    font-weight: bold; 
    cursor: pointer;
    transition: all 0.2s ease;
}

#item-selection-modal .builder-modal-close:hover { 
    color: #ff6b6b; 
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    transform: scale(1.1);
}

#item-selection-modal #item-modal-title {
    color: #a37acc;
    font-size: 1.8em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px rgba(163, 122, 204, 0.4);
    border-bottom: 1px dashed rgba(163, 122, 204, 0.3);
    padding-bottom: 15px;
    font-family: 'h73bold', sans-serif;
}

#item-selection-modal .page-filters-area {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#item-selection-modal .filters-container {
    background: transparent !important;
    border: none !important;
    width: 100%;
}

#item-selection-modal .filter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#item-selection-modal .filter-main-label {
    color: #a0a0a0;
    font-family: 'h73bold', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-size: 0.9em;
}

#item-selection-modal .filter-control {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    border: 1px solid rgba(163, 122, 204, 0.3);
    border-radius: 30px; 
    background-color: rgba(0, 0, 0, 0.5);
    color: #e0f7fa;
    font-size: 1em;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

#item-selection-modal .filter-control:focus {
    outline: none;
    border-color: #a37acc;
    box-shadow: 0 0 15px rgba(163, 122, 204, 0.4), inset 0 0 10px rgba(163, 122, 204, 0.1);
    background-color: rgba(15, 20, 25, 0.8);
}

/* Grille Classes Classiques */
#item-selection-modal .item-vignette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 15px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 15px 5px;
}

#item-selection-modal .item-vignette-grid::-webkit-scrollbar { width: 6px; }
#item-selection-modal .item-vignette-grid::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 8px; }
#item-selection-modal .item-vignette-grid::-webkit-scrollbar-thumb { background: rgba(163, 122, 204, 0.4); border-radius: 8px; }
#item-selection-modal .item-vignette-grid::-webkit-scrollbar-thumb:hover { background: rgba(163, 122, 204, 0.8); }

#item-selection-modal .item-vignette {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

#item-selection-modal .item-vignette:hover {
    background: rgba(163, 122, 204, 0.1);
    border-color: #a37acc;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), inset 0 0 15px rgba(163, 122, 204, 0.3);
}

#item-selection-modal .item-vignette img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
    transition: all 0.3s ease;
}

#item-selection-modal .item-vignette:hover img {
    filter: drop-shadow(0 0 10px rgba(163, 122, 204, 0.8));
    transform: scale(1.1);
}

#item-selection-modal .vignette-name {
    font-size: 0.85em;
    color: #e0f7fa;
    text-align: center;
    line-height: 1.3;
    font-weight: bold;
}

#item-selection-modal .item-vignette.item-vignette-text-only {
    border: 1px dashed rgba(255, 107, 107, 0.4);
    justify-content: center;
}

#item-selection-modal .item-vignette.item-vignette-text-only:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), inset 0 0 15px rgba(255, 107, 107, 0.3);
}

#item-selection-modal .item-vignette.item-vignette-text-only span {
    color: #ff6b6b;
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sécurisation Modale Technologie (Déplacé dans la grille modale) */
#item-selection-modal .item-vignette-grid.tech-active-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    padding: 10px;
}

.item-vignette.tech-vignette {
    background: linear-gradient(145deg, rgba(20, 25, 35, 0.9), rgba(10, 15, 20, 0.95));
    border: 1px solid rgba(104, 253, 214, 0.2);
    border-radius: 8px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: auto !important; 
    height: 120px !important; 
}

.item-vignette.tech-vignette:hover {
    border-color: #68fdd6;
    box-shadow: 0 0 20px rgba(104, 253, 214, 0.3), inset 0 0 15px rgba(104, 253, 214, 0.1);
    transform: translateY(-4px);
}

.item-vignette.tech-vignette::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #68fdd6, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.item-vignette.tech-vignette:hover::before { opacity: 1; }

.item-vignette.tech-vignette img {
    width: 50px !important;
    height: 50px !important;
    object-fit: contain;
    margin-bottom: 8px !important;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.7));
    transition: transform 0.3s ease;
}
.item-vignette.tech-vignette:hover img { transform: scale(1.15); }

.item-vignette.tech-vignette .vignette-name {
    font-size: 0.8em;
    text-align: center;
    color: #e0f7fa;
    line-height: 1.2;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 !important;
}

.item-vignette.tech-vignette[data-action="clear"] {
    border: 1px dashed rgba(255, 107, 107, 0.5);
    background: rgba(255, 107, 107, 0.05);
    justify-content: center;
}
.item-vignette.tech-vignette[data-action="clear"]:hover {
    border-color: #ff6b6b;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.2), inset 0 0 10px rgba(255, 107, 107, 0.1);
}
.item-vignette.tech-vignette[data-action="clear"] span {
    color: #ff6b6b;
    font-weight: bold;
}

/* ========================================================= */
/* --- BONUS UX/UI : JAUGE, GLITCH, PULSATION & BOOT-UP --- */
/* ========================================================= */

/* --- 1. Jauge d'occupation (Data Bar) --- */
.occupancy-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.occupancy-track {
    width: 50px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}
.occupancy-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.occupancy-text {
    font-family: 'h73bold', monospace;
    font-size: 0.85rem;
    letter-spacing: 1px;
}
/* Clignotement si la ruche est pleine */
.occupancy-container.is-full .occupancy-text {
    animation: flashAlert 1s infinite alternate;
}
@keyframes flashAlert {
    from { opacity: 1; text-shadow: 0 0 10px #ff5252; }
    to { opacity: 0.4; text-shadow: none; }
}

/* --- 2. Effet Glitch (Style Menu de Navigation : Magenta/Cyan) --- */
@keyframes glitchTextNav {
    0% { text-shadow: 0 0 0 transparent; }
    20% { text-shadow: -2px 0 #ff00c1, 2px 0 #00fff9; } /* Magenta / Cyan */
    40% { text-shadow: -1px 0 #ff00c1, 1px 0 #00fff9; }
    60% { text-shadow: 0 0 0 transparent; }
    80% { text-shadow: 1px 0 #ff00c1, -1px 0 #00fff9; }
    100% { text-shadow: 0 0 0 transparent; }
}

@keyframes glitchSVGNav {
    0% { filter: none; }
    20% { filter: drop-shadow(-2px 0 0 #ff00c1) drop-shadow(2px 0 0 #00fff9); }
    40% { filter: drop-shadow(-1px 0 0 #ff00c1) drop-shadow(1px 0 0 #00fff9); }
    60% { filter: none; }
    80% { filter: drop-shadow(1px 0 0 #ff00c1) drop-shadow(-1px 0 0 #00fff9); }
    100% { filter: none; }
}

.quick-action-btn.delete-btn:hover {
    /* Le conteneur du bouton reste parfaitement stable et immobile */
    background: rgba(255, 82, 82, 0.2);
    border-color: #ff5252;
    
    /* Le texte passe au blanc pour que le glitch néon ressorte (comme dans la sidebar) */
    color: #ffffff; 
    
    /* Le glitch ne s'applique qu'au texte */
    animation: glitchTextNav 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

.quick-action-btn.delete-btn:hover svg {
    /* Le glitch s'applique à l'icône SVG indépendamment */
    animation: glitchSVGNav 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

/* --- 4. Alerte Visuelle (Pulsation données manquantes) --- */
.missing-data-alert .classe-placeholder {
    /* On allonge la durée à 3 secondes (rythme respiratoire) et on utilise 0%-100% au lieu de alternate */
    animation: pulseMissingData 3s infinite ease-in-out;
}

.missing-data-alert .classe-placeholder:hover {
    border-color: #ff5252;
    background: rgba(255, 82, 82, 0.15);
    box-shadow: 0 0 15px rgba(255, 82, 82, 0.3), inset 0 0 15px rgba(255, 82, 82, 0.2);
    /* On stoppe la respiration au survol pour un effet stable */
    animation: none; 
}

/* On lie la bordure, le fond et l'ombre dans la même animation pour une transition parfaitement liquide */
@keyframes pulseMissingData {
    0%, 100% { 
        box-shadow: 0 0 0px rgba(255, 82, 82, 0), inset 0 0 5px rgba(255, 82, 82, 0.05); 
        border-color: rgba(255, 82, 82, 0.2);
        background: rgba(255, 82, 82, 0.02);
    }
    50% { 
        box-shadow: 0 0 12px rgba(255, 82, 82, 0.4), inset 0 0 10px rgba(255, 82, 82, 0.15); 
        border-color: rgba(255, 82, 82, 0.7);
        background: rgba(255, 82, 82, 0.08);
    }
}

/* --- 5. Animation d'amorçage (Boot-up Sequence Liste) --- */
/* (Pensez à rajouter opacity: 0; dans la classe .ruche-list-item plus haut dans votre CSS, ou laissez ce bloc écraser le style) */
.ruche-list-item {
    opacity: 0;
    transform: translateX(-30px);
    animation: bootUpSlide 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes bootUpSlide {
    0% { opacity: 0; transform: translateX(-30px) skewX(5deg); }
    100% { opacity: 1; transform: translateX(0) skewX(0); }
}

/* ========================================================= */
/* --- MODALE REJOINDRE : FLUX DYNAMIQUE (SERVEURS / RUCHES) --- */
/* ========================================================= */

.join-flow-modal {
    display: flex;
    flex-direction: column;
    height: 75vh;
    max-height: 600px;
    width: 90%;
    max-width: 550px;
}

/* --- EN-TÊTE ET BOUTON RETOUR --- */
.join-modal-header {
    display: flex;
    align-items: center;
    justify-content: center; /* Centre le titre proprement */
    position: relative;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(104, 253, 214, 0.2);
}

.join-modal-header h2 {
    margin: 0;
    border-bottom: none;
    padding: 0 50px; /* CORRECTION : Empêche le texte de passer sous le bouton */
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.4rem;
}

.join-modal-header #join-back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-70%); /* Centrage vertical compensé */
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    z-index: 10;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.join-modal-header #join-back-btn:hover {
    background: rgba(104, 253, 214, 0.15);
    border-color: #68fdd6;
    color: #68fdd6;
    box-shadow: 0 0 10px rgba(104, 253, 214, 0.3);
    transform: translateY(-70%) scale(1.05);
}

/* --- BARRE DE RECHERCHE PREMIUM --- */
#join-search-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(10, 15, 20, 0.6);
    border: 1px solid rgba(104, 253, 214, 0.3);
    border-radius: 8px;
    padding: 12px 20px;
    color: #e0f7fa;
    font-family: 'h73light', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

#join-search-input:focus {
    outline: none;
    border-color: #68fdd6;
    box-shadow: 0 0 15px rgba(104, 253, 214, 0.3), inset 0 0 10px rgba(104, 253, 214, 0.1);
    background: rgba(15, 20, 25, 0.8);
}

/* --- GRILLE ET SCROLLBAR --- */
.join-options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    overflow-x: hidden; /* CORRECTION : Empêche l'apparition de la barre horizontale */
    flex-grow: 1;
    padding-right: 10px; 
    padding-left: 4px; /* Laisse de la place pour l'ombre au survol */
    padding-bottom: 10px;
    margin-top: 10px;
}

.join-options-grid::-webkit-scrollbar { width: 6px; }
.join-options-grid::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 4px; }
.join-options-grid::-webkit-scrollbar-thumb { background: rgba(104, 253, 214, 0.3); border-radius: 4px; }
.join-options-grid::-webkit-scrollbar-thumb:hover { background: rgba(104, 253, 214, 0.6); }

/* --- CARTES SERVEUR ET RUCHE --- */
.join-option-card {
    width: calc(100% - 8px); /* CORRECTION : Laisse la place pour le décalage translateX(6px) */
    box-sizing: border-box;
    background: linear-gradient(90deg, rgba(20, 25, 30, 0.8) 0%, rgba(10, 15, 20, 0.9) 100%);
    border: 1px solid rgba(104, 253, 214, 0.15);
    border-left: 4px solid #68fdd6;
    border-radius: 4px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: bootUpSlide 0.3s ease-out;
}

.join-option-card:hover {
    background: rgba(104, 253, 214, 0.08);
    border-color: rgba(104, 253, 214, 0.4);
    transform: translateX(6px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4), inset 0 0 15px rgba(104, 253, 214, 0.05);
}

.join-option-card .option-name {
    font-size: 1.1rem;
    color: #e0f7fa;
    font-family: 'h73bold', sans-serif;
    letter-spacing: 1px;
}

.join-option-card.hive-card {
    border-left-color: #a37acc;
    justify-content: space-between;
    cursor: default; 
}

.join-option-card.hive-card:hover {
    background: rgba(163, 122, 204, 0.08);
    border-color: rgba(163, 122, 204, 0.4);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4), inset 0 0 15px rgba(163, 122, 204, 0.05);
}

.hive-info {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hive-info .option-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================================= */
/* --- 5 AMÉLIORATIONS UX/UI : EXPERT EDITION --- */
/* ========================================================= */

/* --- 1. Emplacements Fantômes "NO DATA" --- */
.maitrise-display-item.ghost-slot {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    box-shadow: none;
    cursor: default;
    opacity: 0.6;
}
.maitrise-display-item.ghost-slot:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.02);
}
.ghost-icon-box {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    flex-shrink: 0;
}
.ghost-text {
    font-family: 'Consolas', monospace;
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.3) !important;
    letter-spacing: 1px;
}

/* --- 2. Bouton Partager (Lien d'Invitation Rapide) --- */
.quick-action-btn.share-btn:hover {
    background: rgba(104, 163, 253, 0.2);
    border-color: #68a3fd;
    color: #68a3fd;
}
.quick-action-btn.share-btn.copied {
    background: #68a3fd;
    color: #fff;
    border-color: #68a3fd;
    animation: none;
}

/* --- 3. Filtres Rapides & Recherche d'Escouade --- */
.squad-filters-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, rgba(15, 20, 25, 0.9), rgba(20, 25, 30, 0.6));
    border: 1px solid rgba(104, 253, 214, 0.2);
    border-left: 4px solid #68fdd6;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.squad-filters-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.squad-filter-title {
    color: rgba(104, 253, 214, 0.7);
    font-size: 0.8rem;
    font-family: 'h73bold', sans-serif;
    letter-spacing: 1.5px;
}

.squad-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.squad-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: #aaa;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.squad-filter-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.squad-filter-btn.active {
    background: rgba(163, 122, 204, 0.15);
    border-color: #a37acc;
    color: #fff;
    box-shadow: 0 0 10px rgba(163, 122, 204, 0.2);
}

/* Zone Droite : Recherche de Technologie */
.squad-filters-right {
    flex-grow: 1;
    max-width: 300px;
    min-width: 200px;
}

.squad-tech-search-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(104, 253, 214, 0.3);
    color: #e0f7fa;
    padding: 8px 15px 8px 35px;
    border-radius: 4px;
    font-family: 'h73light', sans-serif;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2368fdd6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
}

.squad-tech-search-input:focus {
    outline: none;
    border-color: #68fdd6;
    box-shadow: 0 0 10px rgba(104, 253, 214, 0.2);
    background-color: rgba(10, 15, 20, 0.8);
}

/* --- 4. Curseur Terminal sur l'Écran Vide --- */
.terminal-mode .terminal-text-container {
    display: inline-block;
    margin-bottom: 15px;
}
.terminal-mode .typewriter-text {
    color: #68fdd6;
    font-family: 'Consolas', monospace !important;
    letter-spacing: 1px;
    margin: 0;
    overflow: hidden; 
    white-space: nowrap; 
    animation: typing 2s steps(30, end);
}
.terminal-mode .terminal-cursor {
    animation: blinkCursor 1s step-end infinite;
}
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blinkCursor {
    50% { opacity: 0; }
}

/* --- 5. Radar de Balayage pour la Modale Recherche --- */
.search-input-wrapper {
    position: relative;
    width: 100%;
}
.radar-scanner {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(104, 253, 214, 0.2);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    overflow: hidden;
}
.is-scanning .radar-scanner {
    opacity: 1;
}
.radar-line {
    width: 50%;
    height: 50%;
    background: linear-gradient(45deg, transparent, rgba(104, 253, 214, 0.8));
    transform-origin: bottom right;
    animation: radarSpin 1s linear infinite;
}
@keyframes radarSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* À ajouter dans ruche.css */
.hud-loader-container {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; min-height: 200px; gap: 15px; color: #68fdd6; font-family: 'h73bold', monospace;
}
.hud-spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(104, 253, 214, 0.2);
    border-top-color: #68fdd6; border-radius: 50%;
    animation: spinHUD 1s linear infinite;
    box-shadow: 0 0 15px rgba(104, 253, 214, 0.4);
}
@keyframes spinHUD { to { transform: rotate(360deg); } }
.hud-loader-container span {
    letter-spacing: 2px; animation: pulseText 1.5s infinite alternate;
}

/* Dimensions spécifiques du bouton Discord sur l'écran non connecté */
.unlogged-actions .btn-discord-premium {
    padding: 12px 24px;
    font-size: 1.1em;
}