/**
 * Styles pour la page d'accueil Volopress
 * Cohérence avec le thème Volopress Sorties
 */

/* === Variables CSS (Theme Montagne) === */
:root {
    --volo-primary: #3498db;
    --volo-primary-light: #60a5fa;
    --volo-primary-dark: #1e40af;
    --volo-text: #334155;
    --volo-text-light: #64748b;
    --volo-bg: #ffffff;
    --volo-bg-light: #f8fafc;
    --volo-border: #e2e8f0;
    --volo-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

/* Container principal */
.volopress-homepage {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
}

.volopress-container {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 1rem;
    align-items: start;
}

/* Responsive : 3 colonnes maintenues le plus longtemps possible */
@media (max-width: 1200px) {
    .volopress-container {
        grid-template-columns: 240px 1fr 240px;
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .volopress-container {
        grid-template-columns: 220px 1fr 220px;
        gap: 1.25rem;
    }
}

@media (max-width: 900px) {
    .volopress-container {
        grid-template-columns: 200px 1fr 200px;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .volopress-container {
        grid-template-columns: 180px 1fr 180px;
        gap: 0.875rem;
    }
}

@media (max-width: 640px) {
    .volopress-container {
        grid-template-columns: 160px 1fr 160px;
        gap: 0.75rem;
    }
}

@media (max-width: 540px) {
    .volopress-container {
        grid-template-columns: 140px 1fr 140px;
        gap: 0.625rem;
    }
}

/* Passage en 1 colonne uniquement sur mobile */
@media (max-width: 480px) {
    .volopress-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .volopress-sidebar {
        order: 2;
    }
    
    .volopress-main-content {
        order: 1;
    }
}

/* Colonnes latérales */
.volopress-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-section {
    background: var(--volo-bg);
    border: 1px solid var(--volo-border);
    padding: 0.75rem;
    border-radius: 6px;
    box-shadow: var(--volo-shadow);
    transition: box-shadow 0.3s ease;
}

.sidebar-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-section h2 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--volo-text);
    padding-bottom: 0.25rem;
}

/* Section recherche */
.search-section {
    background: var(--volo-bg-light);
    border-color: var(--volo-primary-light);
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form label {
    flex: 1;
    margin: 0;
}

.search-field {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--volo-border);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--volo-text);
    transition: border-color 0.2s ease;
}

.search-field:focus {
    outline: none;
    border-color: var(--volo-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-submit {
    padding: 0.625rem 1rem;
    background: var(--volo-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.search-submit:hover {
    background: var(--volo-primary-dark);
}

/* Cartes de mise en avant */
.featured-card {
    margin-bottom: 0;
}

.featured-card-image {
    margin-bottom: 0.5rem;
    overflow: hidden;
    border-radius: 6px;
    max-height: 150px;
    text-align: center;
}

.featured-card-image img {
    /* width: 100%; */
    height: 150px;
    max-height: 150px;
    /* object-fit: cover; */
    text-align: center;
    margin: auto;
}


.featured-card-image a:hover img {
    transform: scale(1.05);
}

.featured-card-type {
    display: inline-block;
    width: fit-content;
    background: var(--volo-primary);
    color: white;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.volopress-sidebar .featured-card-type {
    float: right;
    position: relative;
    top: -33px;
}

.volopress-main-content .featured-card-type {
    display: inline-block;
}

/* Images topos : ajustement en hauteur */
.volopress-sidebar .featured-card-image.topo-cover {
    max-height: none;
    height: 150px;
}

.volopress-sidebar .featured-card-image.topo-cover img {
    max-height: none;
    height: 170px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.featured-card-title {
    margin: 0 0 0.375rem 0;
    font-size: 0.875rem;
    line-height: 1.3;
}

.featured-card-title a {
    color: var(--volo-text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.featured-card-title a:hover {
    color: var(--volo-primary);
}

.featured-card-excerpt {
    font-size: 0.8125rem;
    color: var(--volo-text-light);
    line-height: 1.4;
    margin-bottom: 0;
}

.featured-card-meta {
    font-size: 0.75rem;
    color: var(--volo-text-light);
}

.featured-card-meta .date {
    color: var(--volo-primary);
    font-weight: 600;
}

.featured-card-meta .author-ini {
    color: var(--volo-text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.featured-card-meta .author-ini:hover {
    color: var(--volo-primary);
    text-decoration: underline;
}

/* Sidebar image */
.sidebar-image {
    margin-top: 0.75rem;
}

.sidebar-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Contenu principal */
.volopress-main-content {
    background: var(--volo-bg);
    /* padding: 1rem; */
    border-radius: 6px;
    /* box-shadow: var(--volo-shadow); */
}

/* Mises en avant centrales - Layout horizontal */
.center-featured-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--volo-border);
}

.featured-card-horizontal {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--volo-bg-light);
    border: 1px solid var(--volo-border);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 0.75rem;
}

.featured-card-horizontal:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.featured-card-horizontal-image {
    float: left;
    flex-shrink: 0;
    width: 200px;
    height: 140px;
    overflow: hidden;
    border-radius: 4px;
    margin-right: 1rem;
}

.featured-card-horizontal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-card-horizontal-image a:hover img {
    transform: scale(1.05);
}

.featured-card-horizontal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
}

.featured-card-horizontal .featured-card-title {
    margin: 0 0 0.375rem 0;
    font-size: 1rem;
    line-height: 1.3;
}

/* Responsive pour les cartes horizontales */
@media (max-width: 640px) {
    .featured-card-horizontal {
        flex-direction: column;
        gap: 1rem;
    }
    
    .featured-card-horizontal-image {
        width: 100%;
        height: 180px;
    }
}

/* Sections de la page */
.homepage-section {
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 1.125rem;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.375rem;
    font-weight: 700;
}

/* Listes d'articles et sorties */
.articles-list,
.sorties-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Liste compacte des sorties */
.sorties-compact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sortie-compact-item {
    padding: 0.25rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.sortie-compact-date {
    color: var(--volo-text);
}

.sortie-compact-link {
    text-decoration: none;
    transition: color 0.2s ease;
    color: var(--volo-primary);
    font-weight: 600;
}

.sortie-compact-massif{
    color: var(--volo-text);
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sortie-compact-link:hover {
    color: var(--volo-primary);
    text-decoration: underline;
}

.article-category {
    color: var(--volo-text);
    font-weight: 600;
}

.list-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--volo-border);
    transition: background-color 0.2s ease;
}

.list-item:hover {
    background-color: var(--volo-bg-light);
    margin: 0 -0.5rem;
    padding: 0.5rem 0.5rem;
    border-radius: 4px;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-category {
    display: inline-block;
    background: var(--volo-bg-light);
    color: var(--volo-text-light);
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.list-item-title {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.3;
    flex: 1;
}

.list-item-title a {
    color: var(--volo-text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.list-item-title a:hover {
    color: var(--volo-primary);
}

.list-item-meta {
    font-size: 0.75rem;
    color: var(--volo-text-light);
    white-space: nowrap;
    flex-shrink: 0;
}

.list-item-meta .date {
    color: var(--volo-primary);
    font-weight: 600;
}

.list-item-meta .author-ini {
    color: var(--volo-text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.list-item-meta .author-ini:hover {
    color: var(--volo-primary);
    text-decoration: underline;
}

.list-item-excerpt {
    font-size: 0.8125rem;
    color: var(--volo-text-light);
    line-height: 1.4;
    margin-bottom: 0;
}

/* Responsive pour les listes */
@media (max-width: 768px) {
    .list-item-header {
        flex-direction: column;
        gap: 0.375rem;
    }
    
    .list-item-meta {
        white-space: normal;
    }
}

/* Section Archive */
.archive-section {
    margin-bottom: 0;
}

.archive-card {
    background: var(--volo-bg-light);
    border: 1px solid var(--volo-border);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.archive-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.archive-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.archive-image {
    width: 100%;
    max-height: 150px;
    overflow: hidden;
}

.archive-image img {
    width: 100%;
    height: 100%;
    max-height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.archive-link:hover .archive-image img {
    transform: scale(1.05);
}

.archive-content {
    padding: 0.75rem;
    text-align: center;
}

.archive-description {
    margin: 0;
    font-size: 0.875rem;
    color: var(--volo-text);
    font-weight: 500;
}

/* Liste de commentaires */
.comments-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--volo-border);
    display: flex;
    gap: 1rem;
    transition: background-color 0.2s ease;
}

.comment-item:hover {
    background-color: var(--volo-bg-light);
    margin: 0 -1rem;
    padding: 1rem;
    border-radius: 6px;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--volo-primary);
    font-weight: 600;
    min-width: 80px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.comment-content {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.6;
}

.comment-content strong {
    color: var(--volo-text);
    font-weight: 600;
}

.comment-content a {
    color: var(--volo-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.comment-content a:hover {
    color: var(--volo-primary-dark);
    text-decoration: underline;
}

.comment-post {
    font-size: 0.75rem;
    color: var(--volo-text-light);
    margin-top: 0.375rem;
}

/* Réduction progressive des paddings pour les petits écrans */
@media (max-width: 900px) {
    .sidebar-section {
        padding: 1rem;
        gap: 1rem;
    }
    
    .sidebar-section h2 {
        font-size: 0.9375rem;
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 768px) {
    .volopress-homepage {
        padding: 1rem 0.5rem;
    }
    
    
    /* Les colonnes latérales sont plus compactes */
    .sidebar-section {
        padding: 0.875rem;
    }
    
    .sidebar-section h2 {
        font-size: 0.875rem;
        margin-bottom: 0.625rem;
        padding-bottom: 0.375rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .list-item-title {
        font-size: 1rem;
    }
    
    .list-item {
        padding: 1rem 0;
    }
}

@media (max-width: 640px) {
    /* Colonne centrale : garde une bonne lisibilité */
    .volopress-main-content {
        padding: 1.375rem;
    }
    
    /* Colonnes latérales : plus compactes */
    .sidebar-section {
        padding: 0.75rem;
    }
    
    .sidebar-section h2 {
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
    }
    
    .featured-card-title {
        font-size: 0.875rem;
    }
    
    .featured-card-excerpt {
        font-size: 0.8125rem;
    }
    
    .list-item {
        padding: 0.875rem 0;
    }
}

@media (max-width: 540px) {
    
    /* Colonnes latérales : très compactes */
    .sidebar-section {
        padding: 0.625rem;
    }
    
    .sidebar-section h2 {
        font-size: 0.75rem;
    }
    
    .featured-card-type {
        font-size: 0.625rem;
        padding: 0.1875rem 0.5rem;
    }
    
    .list-item {
        padding: 0.75rem 0;
    }
    
    .section-title {
        font-size: 1.125rem;
    }
}

/* Responsive mobile : 1 colonne */
@media (max-width: 480px) {
    .volopress-homepage {
        padding: 1rem 0.5rem;
    }
    
    .sidebar-section {
        padding: 1rem;
    }
    
    .sidebar-section h2 {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .list-item-title {
        font-size: 1rem;
    }
    
    .comment-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .comment-date {
        min-width: auto;
    }
}
