/**
 * Styles Frontend - Plugin Glossaire Bâtiment
 * Version: 1.0.0
 */

/* ========================================
   CONTAINERS ET LAYOUT
   ======================================== */

.gb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gb-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin: 20px 0;
}

/* ========================================
   RECHERCHE
   ======================================== */

.gb-search-container {
    margin: 30px 0;
}

.gb-search-form {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.gb-search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.gb-search-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.gb-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.gb-search-button {
    padding: 15px 30px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gb-search-button:hover {
    background: #005a87;
    transform: translateY(-2px);
}

.gb-search-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.gb-filter-select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    min-width: 200px;
}

.gb-filter-select:focus {
    outline: none;
    border-color: #007cba;
}

/* ========================================
   RÉSULTATS DE RECHERCHE
   ======================================== */

.gb-search-results {
    margin-top: 20px;
}

.gb-result-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.gb-result-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.gb-result-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.gb-result-title a {
    color: #007cba;
    text-decoration: none;
}

.gb-result-title a:hover {
    color: #005a87;
}

.gb-result-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 10px;
}

.gb-result-meta {
    font-size: 14px;
    color: #868e96;
}

.gb-result-categories {
    display: inline-block;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 12px;
}

/* ========================================
   SHORTCODES
   ======================================== */

/* Terme Shortcode */
.gb-terme-shortcode {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.gb-terme-title {
    font-size: 20px;
    margin-bottom: 15px;
}

.gb-terme-title a {
    color: #007cba;
    text-decoration: none;
}

.gb-terme-definition {
    line-height: 1.6;
    margin-bottom: 15px;
}

.gb-terme-synonymes,
.gb-terme-categories {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
}

/* Catégories Shortcode */
.gb-categories-shortcode {
    margin: 20px 0;
}

.gb-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gb-category-item {
    border-bottom: 1px solid #e9ecef;
    padding: 12px 0;
}

.gb-category-item:last-child {
    border-bottom: none;
}

.gb-category-link {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gb-category-link:hover {
    color: #005a87;
}

.gb-category-count {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #6c757d;
}

.gb-category-description {
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
    line-height: 1.4;
}

/* Termes Récents Shortcode */
.gb-recent-shortcode {
    margin: 20px 0;
}

.gb-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gb-recent-item {
    padding: 10px 0;
    border-bottom: 1px solid #f1f3f4;
}

.gb-recent-item:last-child {
    border-bottom: none;
}

.gb-recent-link {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.gb-recent-link:hover {
    color: #005a87;
}

.gb-recent-date {
    font-size: 12px;
    color: #868e96;
    margin-left: 10px;
}

.gb-recent-excerpt {
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
    line-height: 1.4;
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.gb-breadcrumbs {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.gb-breadcrumbs a {
    color: #007cba;
    text-decoration: none;
}

.gb-breadcrumbs a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* ========================================
   NAVIGATION ALPHABÉTIQUE
   ======================================== */

.gb-alphabetical-nav {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.gb-alphabetical-nav h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #495057;
}

.gb-alphabetical-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gb-letter-link {
    display: inline-block;
    padding: 8px 12px;
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 35px;
    text-align: center;
}

.gb-letter-link:hover {
    background: #007cba;
    color: white;
}

.gb-letter-link.active {
    background: #007cba;
    color: white;
}

.gb-letter-count {
    font-size: 11px;
    margin-left: 2px;
    opacity: 0.8;
}

/* ========================================
   TEMPLATES
   ======================================== */

/* Single Terme */
.gb-single-terme {
    max-width: 800px;
    margin: 0 auto;
}

.gb-terme-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.gb-terme-title {
    font-size: 32px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 10px;
}

.gb-terme-meta {
    color: #6c757d;
    font-size: 14px;
}

.gb-terme-content {
    line-height: 1.8;
    font-size: 16px;
    color: #495057;
}

.gb-terme-sidebar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.gb-terme-sidebar h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 18px;
}

.gb-terme-details {
    margin-bottom: 20px;
}

.gb-terme-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.gb-terme-detail-item:last-child {
    border-bottom: none;
}

.gb-detail-label {
    font-weight: 600;
    color: #495057;
}

.gb-detail-value {
    color: #6c757d;
}

/* Archive */
.gb-archive-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border-radius: 12px;
}

.gb-archive-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.gb-archive-description {
    font-size: 18px;
    opacity: 0.9;
}

.gb-terme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.gb-terme-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.gb-terme-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.gb-terme-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.gb-terme-card-title a {
    color: #007cba;
    text-decoration: none;
}

.gb-terme-card-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.gb-terme-card-meta {
    font-size: 14px;
    color: #868e96;
}

/* ========================================
   PAGINATION
   ======================================== */

.gb-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    gap: 10px;
}

.gb-pagination a,
.gb-pagination span {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    text-decoration: none;
    color: #007cba;
    transition: all 0.3s ease;
}

.gb-pagination a:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.gb-pagination .current {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .gb-container {
        padding: 0 15px;
    }
    
    .gb-content {
        padding: 20px;
    }
    
    .gb-search-input-group {
        flex-direction: column;
    }
    
    .gb-search-filters {
        flex-direction: column;
    }
    
    .gb-filter-select {
        min-width: auto;
    }
    
    .gb-alphabetical-list {
        justify-content: center;
    }
    
    .gb-terme-grid {
        grid-template-columns: 1fr;
    }
    
    .gb-archive-title {
        font-size: 28px;
    }
    
    .gb-terme-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .gb-search-form {
        padding: 15px;
    }
    
    .gb-search-input,
    .gb-search-button {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .gb-alphabetical-list {
        gap: 5px;
    }
    
    .gb-letter-link {
        padding: 6px 8px;
        min-width: 30px;
        font-size: 14px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

.gb-fade-in {
    animation: gbFadeIn 0.5s ease-out;
}

/* ========================================
   ÉTATS DE CHARGEMENT
   ======================================== */

.gb-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.gb-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    border-top-color: #007cba;
    animation: gbSpin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes gbSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   MESSAGES
   ======================================== */

.gb-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 20px 0;
}

.gb-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gb-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.gb-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
} 