/**
 * Styles CSS pour le plugin de numérotation de documents
 * Fichier: liste_complete_perso.css
 * Namespace: .liste_complete_perso
 */

/* === HEADER ET BOUTON FERMER === */
.liste_complete_perso-header {
    position: relative;
    padding: 0;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
    min-height: 35px;
}

.liste_complete_perso-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.liste_complete_perso-close-btn:hover {
    background-color: #e9ecef;
    color: #6c757d;
    transform: scale(1.1);
}

.liste_complete_perso-close-btn:active {
    background-color: #dee2e6;
    transform: scale(0.95);
}

/* Bouton fermer dans le container de recherche */
.liste_complete_perso-search-container .liste_complete_perso-close-btn {
    position: static;
    margin-left: 8px;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #6c757d;
}

.liste_complete_perso-search-container .liste_complete_perso-close-btn:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

/* === CHAMP DE RECHERCHE === */
.liste_complete_perso-search-container {
    padding: 8px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 8px;
	
}

.liste_complete_perso-search {
    flex: 1;
    /* Suppression des styles CSS personnalisés - utilise form-control de Bootstrap */
}

.liste_complete_perso-search:focus {
    border-color: #4CAF50 !important;
    box-shadow: 0 0 3px rgba(76, 175, 80, 0.3) !important;
}

/* === SUGGESTIONS === */
.liste_complete_perso-suggestions {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 999999999; /* Z-index très élevé pour passer au-dessus des popups */
    display: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-family: Arial, sans-serif;
    font-size: 14px;
}

/* Item de suggestion */
.liste_complete_perso-suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
    min-height: 40px;
    box-sizing: border-box;
}

.liste_complete_perso-suggestion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 5px 5px;
}

.liste_complete_perso-suggestion-item:hover {
    background-color: #f8f9fa;
}

.liste_complete_perso-suggestion-item.active {
    background-color: #4CAF50;
    color: white;
}

/* Code de la variable */
.liste_complete_perso-variable-code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-weight: bold;
    color: #2196F3;
    margin-right: 15px;
    font-size: 13px;
    flex-shrink: 0;
}

.liste_complete_perso-suggestion-item.active .liste_complete_perso-variable-code {
    color: white;
}

/* Description de la variable */
.liste_complete_perso-variable-description {
    font-size: 12px;
    color: #666;
    text-align: right;
    line-height: 1.3;
    flex-grow: 1;
}

.liste_complete_perso-suggestion-item.active .liste_complete_perso-variable-description {
    color: #e8f5e8;
}

/* === APERÇU === */
.liste_complete_perso-preview {
    margin-top: 8px;
    padding: 10px 12px;
    background-color: #e8f5e8;
    border-radius: 4px;
    border-left: 3px solid #4CAF50;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    color: #2196F3;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.liste_complete_perso-preview-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 6px;
    font-family: Arial, sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.liste_complete_perso-preview-content {
    font-weight: 600;
    font-size: 15px;
    color: #1976D2;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .liste_complete_perso-suggestions {
        font-size: 13px;
    }
    
    .liste_complete_perso-suggestion-item {
        padding: 8px 10px;
        min-height: 36px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .liste_complete_perso-variable-code {
        margin-right: 0;
        margin-bottom: 2px;
    }
    
    .liste_complete_perso-variable-description {
        text-align: left;
        font-size: 11px;
    }
    
    .liste_complete_perso-preview {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .liste_complete_perso-preview-content {
        font-size: 14px;
    }
}

/* === ANIMATIONS === */
.liste_complete_perso-suggestions {
    animation: slideDown 0.15s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === SCROLLBAR PERSONNALISÉE === */
.liste_complete_perso-suggestions::-webkit-scrollbar {
    width: 6px;
}

.liste_complete_perso-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.liste_complete_perso-suggestions::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.liste_complete_perso-suggestions::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* === ÉTATS SPÉCIAUX === */
.liste_complete_perso-suggestion-item:first-child {
    border-top: none;
}

/* Focus visible pour l'accessibilité */
.liste_complete_perso-suggestion-item:focus {
    outline: 2px solid #4CAF50;
    outline-offset: -2px;
}

/* === THÈME SOMBRE (optionnel) === */
@media (prefers-color-scheme: dark) {
    .liste_complete_perso-suggestions {
        background: #2d2d2d;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .liste_complete_perso-suggestion-item {
        border-bottom-color: #444;
    }
    
    .liste_complete_perso-suggestion-item:hover {
        background-color: #3a3a3a;
    }
    
    .liste_complete_perso-variable-description {
        color: #b0b0b0;
    }
    
    .liste_complete_perso-preview {
        background-color: #1e3a1e;
        border-left-color: #4CAF50;
    }
    
    .liste_complete_perso-preview-label {
        color: #b0b0b0;
    }
}

/* === COMPATIBILITÉ ANCIENS NAVIGATEURS === */
.liste_complete_perso-suggestions {
    -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    -moz-box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.liste_complete_perso-suggestion-item {
    -webkit-transition: background-color 0.2s ease;
    -moz-transition: background-color 0.2s ease;
    -o-transition: background-color 0.2s ease;
}

.liste_complete_perso-preview {
    -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}