/* Styles pour le frontend du plugin Glossaire */

/* Bouton sidebar */
.glossaire-sidebar-button {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 9999;
}

.glossaire-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.glossaire-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.glossaire-btn-primary {
    background: #00a32a;
}

.glossaire-btn-primary:hover {
    background: #007a1f;
}

.glossaire-btn-text {
    white-space: nowrap;
}

/* Modal */
.glossaire-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glossaire-modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.glossaire-modal-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.glossaire-modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.glossaire-modal-close {
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.glossaire-modal-close:hover {
    color: #000;
}

.glossaire-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Loading */
.glossaire-loading {
    text-align: center;
    padding: 40px 20px;
}

.glossaire-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Container des termes */
.glossaire-terms-container {
    margin-top: 20px;
}

.glossaire-terms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.glossaire-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}

.glossaire-select-all input[type="checkbox"] {
    transform: scale(1.2);
}

/* Liste des termes */
.glossaire-terms-list {
    max-height: 400px;
    overflow-y: auto;
}

.glossaire-term-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.glossaire-term-item:hover {
    background: #e9ecef;
    border-color: #0073aa;
}

.glossaire-term-item input[type="checkbox"] {
    transform: scale(1.1);
}

.glossaire-term-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

/* Erreur */
.glossaire-error {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
}

/* Page glossaire */
.glossaire-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.glossaire-index {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.glossaire-index h3 {
    margin-top: 0;
    color: #333;
}

.glossaire-index-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.glossaire-index-list li {
    margin: 0;
}

.glossaire-index-list a {
    display: block;
    padding: 8px 12px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    color: #0073aa;
    font-weight: 500;
    transition: all 0.2s ease;
}

.glossaire-index-list a:hover {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.glossaire-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.glossaire-letter {
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: bold;
}

.glossaire-letter:first-child {
    margin-top: 0;
}

.glossaire-term {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.glossaire-term:last-child {
    border-bottom: none;
}

.glossaire-term-title {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.glossaire-term-definition {
    color: #666;
    margin: 0;
    line-height: 1.6;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .glossaire-sidebar-button {
        right: 10px;
    }
    
    .glossaire-btn-text {
        display: none;
    }
    
    .glossaire-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .glossaire-terms-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .glossaire-index-list {
        justify-content: center;
    }
    
    .glossaire-content {
        padding: 20px;
    }
}
