/**
 * Planet GeoRezo - Styles CSS
 * Agrégateur de flux RSS
 */

/* Layout principal */
.planet-wrapper {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.planet-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.planet-main {
    flex: 1;
    min-width: 0;
}

/* En-tête */
.planet-header {
    max-width: 1400px;
    padding: 0 1rem;
}

.planet-header h1 {
    font-weight: 700;
    margin: 0 0 0.3rem 0;
    color: #666;
}

.planet-header p {
    font-size: 1rem;
    margin: 0;
    color: #666;
}

.planet-header hr {
    border: none;
    margin-top: 1rem;
    width: 80px;
    margin-left: 0;
}

/* Onglets catégories */
.planet-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.planet-tab {
    padding: 0.3rem 0.8rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 2px;
    color: #666;
    transition: all 0.2s;
    font-size: 0.85rem;
    line-height: 1.3;
    display: inline-block;
    text-decoration: none;
}

.planet-tab:hover {
    border-color: #456BAA;
    color: #456BAA;
    text-decoration: none;
}

.planet-tab.active {
    background: #456BAA;
    border-color: #456BAA;
    color: white;
    font-weight: 600;
    text-decoration: none;
}

/* Barre de recherche et filtres */
.planet-search-box {
    background: white;
    padding: 1rem;
    border-radius: 2px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.planet-search-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.planet-search-input-group {
    display: flex;
    gap: 0.5rem;
}

.planet-search-input {
    flex: 1;
    padding: 0.35rem 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 2px;
    font-size: 0.9rem;
    height: 32px;
    line-height: 1;
    box-sizing: border-box;
    vertical-align: middle;
}

.planet-search-button {
    padding: 0.35rem 1.2rem;
    background: #456BAA;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    height: 32px;
    line-height: 1;
    box-sizing: border-box;
    vertical-align: middle;
}

.planet-search-button:hover {
    background: #5568d3;
}

.planet-filters {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.planet-filter-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.planet-filter-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

.planet-filter-select {
    padding: 0.25rem 0.6rem;
    border: 2px solid #e0e0e0;
    border-radius: 2px;
    font-size: 0.85rem;
    cursor: pointer;
    height: 28px;
    line-height: 1;
    box-sizing: border-box;
    vertical-align: middle;
}

/* Tags de filtres actifs */
.planet-active-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.planet-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #456BAA;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 2px;
    font-size: 0.85rem;
}

.planet-filter-tag a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    font-size: 1.2rem;
    line-height: 1;
}

.planet-filter-tag a:hover {
    opacity: 1;
}

/* Liste des flux */
.planet-feeds-list {
    background: white;
    padding: 1rem;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 1rem;
    margin-bottom: 1.5rem;
}

.planet-feeds-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #666;
    border-bottom: 2px solid #456BAA;
    padding-bottom: 0.5rem;
}

.planet-feed-item {
    display: block;
    padding: 0.2rem 0.4rem;
    margin-bottom: 0.3rem;
    border-radius: 2px;
    text-decoration: none;
    color: #666;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.planet-feed-item:hover {
    background: #f5f5f5;
    color: #456BAA;
}

.planet-feed-item.active {
    background: #456BAA;
    color: white;
    font-weight: 500;
    text-decoration: none;
}

.planet-feed-count {
    float: right;
    background: #e0e0e0;
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

.planet-feed-item.active .planet-feed-count {
    background: rgba(255,255,255,0.3);
    color: white;
}

.planet-feed-category-header {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #456BAA;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 1px solid #e0e0e0;
}

/* Articles */
.planet-articles {
    margin-bottom: 2rem;
}

.planet-article {
    background: white;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.planet-article.with-image {
    grid-template-columns: 200px 1fr;
}

.planet-article-image {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 2px;
    background: #f0f0f0;
}

.planet-article-body {
    min-width: 0;
}



.planet-article-title {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    margin-top: 0;
}

.planet-article-title a {
    color: #666;
    text-decoration: none;
}

.planet-article-title a:hover {
    color: #456BAA;
}

.planet-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

.planet-feed-name {
    color: #456BAA;
    font-weight: 600;
}

.planet-feed-name a {
    color: inherit;
    text-decoration: none;
}

.planet-article-content {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1rem;
    display: block;
}

.planet-article-content p {
    margin-bottom: 0.8rem;
}

.planet-read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.6rem;
    background: transparent;
    color: #456BAA;
    text-decoration: none;
    border: 1px solid #456BAA;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 0.85rem;
    height: 22px;
    line-height: 1;
    box-sizing: border-box;
    white-space: nowrap;
    margin-top: 0.5rem;
}

.planet-read-more:hover {
    background: #456BAA;
    color: white;
    text-decoration: none;
}

/* Pagination */
.planet-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.planet-pagination a,
.planet-pagination span {
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 2px;
    text-decoration: none;
    color: #456BAA;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.planet-pagination a:hover {
    background: #456BAA;
    color: white;
}

.planet-pagination .current {
    background: #456BAA;
    color: white;
    font-weight: 600;
}

/* Stats */
.planet-stats {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    margin-top: 2rem;
}

/* Modal pour le contenu complet */
.planet-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.planet-modal.active {
    display: block;
}

.planet-modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.planet-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    margin: 0 0 1rem 1rem;
}

.planet-modal-close:hover,
.planet-modal-close:focus {
    color: #000;
}

.planet-modal-article-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #666;
    line-height: 1.3;
}

.planet-modal-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.planet-modal-article-content {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
}

.planet-modal-article-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 4px;
}

.planet-modal-article-content p {
    margin-bottom: 1rem;
}

.planet-modal-article-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.6rem;
    background: transparent;
    color: #456BAA;
    text-decoration: none;
    border: 1px solid #456BAA;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 0.85rem;
    height: 22px;
    line-height: 1;
    box-sizing: border-box;
    white-space: nowrap;
    margin-top: 1.5rem;
}

.planet-modal-article-link:hover {
    background: #456BAA;
    color: white;
    text-decoration: none;
}

/* Loading spinner pour la modal */
.planet-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #456BAA;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Responsive */
@media (max-width: 768px) {
    .planet-wrapper {
        flex-direction: column;
    }
    
    .planet-sidebar {
        width: 100%;
        order: -1;
    }
    
    .planet-feeds-list {
        position: static;
    }
    
    .planet-article.with-image {
        grid-template-columns: 1fr;
    }
    
    .planet-article-image {
        width: 100%;
        height: 200px;
    }
    
    .planet-tabs {
        font-size: 0.85rem;
    }
    
    .planet-tab {
        padding: 0.4rem 0.8rem;
    }
}
