/**
 * NovaHome Styles
 * Design moderne et sobre - Charte NovaFuture
 */

/* ============================================
   Variables & Reset
   ============================================ */
:root {
    --novahome-green: #096E09;
    --novahome-green-light: #0a8a0a;
    --novahome-green-glow: rgba(9, 110, 9, 0.15);
    --novahome-blue: #116596;
    --novahome-blue-light: #1a7ab8;
    --novahome-dark: #1a1a1a;
    --novahome-gray-dark: #333;
    --novahome-gray: #666;
    --novahome-gray-light: #999;
    --novahome-gray-lighter: #e5e5e5;
    --novahome-bg: #f8f9fa;
    --novahome-bg-warm: #fafaf8;
    --novahome-white: #ffffff;
    --novahome-radius: 12px;
    --novahome-radius-sm: 6px;
    --novahome-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --novahome-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --novahome-shadow-glow: 0 4px 20px var(--novahome-green-glow);
    --novahome-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.novahome-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.novahome-container *,
.novahome-container *::before,
.novahome-container *::after {
    box-sizing: border-box;
}

/* ============================================
   Section Titles
   ============================================ */
.novahome-section-subtitle {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--novahome-gray-dark);
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 16px;
}

.novahome-section-subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--novahome-green);
    border-radius: 2px;
}

.novahome-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--novahome-dark);
    margin: 0;
}

/* Header inline (titre + lien sur même ligne) */
.novahome-section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.novahome-section-header-inline .novahome-section-subtitle {
    margin-bottom: 0;
}

/* ============================================
   Buttons
   ============================================ */
.novahome-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--novahome-radius);
    border: none;
    cursor: pointer;
    transition: all var(--novahome-transition);
    white-space: nowrap;
}

.novahome-btn-primary {
    background: linear-gradient(135deg, var(--novahome-green) 0%, var(--novahome-green-light) 100%);
    color: var(--novahome-white);
    box-shadow: 0 4px 15px rgba(9, 110, 9, 0.3);
}

.novahome-btn-primary:hover {
    box-shadow: 0 6px 25px rgba(9, 110, 9, 0.4);
    color: var(--novahome-white);
}

.novahome-btn-secondary {
    background: var(--novahome-white);
    color: var(--novahome-green);
    border: 2px solid var(--novahome-green);
}

.novahome-btn-secondary:hover {
    background: var(--novahome-green);
    color: var(--novahome-white);
}

.novahome-btn-small {
    padding: 10px 18px;
    font-size: 0.85rem;
    background: linear-gradient(135deg, var(--novahome-green) 0%, var(--novahome-green-light) 100%);
    color: var(--novahome-white);
    box-shadow: 0 3px 12px rgba(9, 110, 9, 0.25);
}

.novahome-btn-small:hover {
    box-shadow: 0 5px 18px rgba(9, 110, 9, 0.35);
    color: var(--novahome-white);
}

.novahome-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.novahome-btn-cta {
    padding: 16px 36px;
    font-size: 1rem;
}

/* ============================================
   Sections
   ============================================ */
.novahome-section {
    margin-bottom: 60px;
}

.novahome-section:first-child {
    margin-top: 20px;
}

.novahome-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.novahome-link-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--novahome-green);
    text-decoration: none;
    transition: all var(--novahome-transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.novahome-link-more:hover {
    color: var(--novahome-green-light);
    gap: 8px;
}

/* ============================================
   Grid
   ============================================ */
.novahome-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ============================================
   Cards (Articles & Tech Sheets)
   ============================================ */
.novahome-card {
    background: var(--novahome-white);
    border-radius: var(--novahome-radius);
    overflow: hidden;
    box-shadow: var(--novahome-shadow);
    transition: all var(--novahome-transition);
    position: relative;
}

.novahome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--novahome-green) 0%, var(--novahome-blue) 100%);
    opacity: 0;
    transition: opacity var(--novahome-transition);
}

.novahome-card:hover {
    box-shadow: var(--novahome-shadow-hover);
}

.novahome-card:hover::before {
    opacity: 1;
}

.novahome-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.novahome-card-image {
    position: relative;
    width: 100%;
    padding-top: 57.2%; /* Ratio 500x286 */
    overflow: hidden;
    background: var(--novahome-bg);
}

.novahome-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.novahome-card:hover .novahome-card-image img {
    transform: scale(1.05);
}

.novahome-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--novahome-green) 0%, var(--novahome-blue) 100%);
}

.novahome-card-image-placeholder span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: var(--novahome-white);
    opacity: 0.9;
}

.novahome-tech-placeholder {
    background: linear-gradient(135deg, var(--novahome-green) 0%, var(--novahome-green-light) 100%);
}

.novahome-card-content {
    padding: 18px;
}

.novahome-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--novahome-dark);
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.novahome-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--novahome-gray-light);
}

.novahome-card-cat {
    background: var(--novahome-bg);
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--novahome-green);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: all var(--novahome-transition);
}

.novahome-card-cat:hover {
    background: var(--novahome-green);
    color: var(--novahome-white);
}

.novahome-tech-cat {
    color: var(--novahome-green);
}

.novahome-tech-cat:hover {
    background: var(--novahome-green);
    color: var(--novahome-white);
}

.novahome-card-comments {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ============================================
   Load More
   ============================================ */
.novahome-load-more-wrap {
    text-align: center;
    margin-top: 35px;
}

.novahome-load-more.loading {
    pointer-events: none;
}

.novahome-load-more.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid var(--novahome-gray-lighter);
    border-top-color: var(--novahome-green);
    border-radius: 50%;
    animation: novahome-spin 0.8s linear infinite;
}

@keyframes novahome-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Featured Section (Articles & Tech)
   ============================================ */
.novahome-featured-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--novahome-gray-lighter);
}

.novahome-featured-title {
    margin-bottom: 25px;
}

.novahome-featured-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.novahome-featured-item {
    background: var(--novahome-white);
    border-radius: var(--novahome-radius);
    overflow: hidden;
    box-shadow: var(--novahome-shadow);
    transition: all var(--novahome-transition);
}

.novahome-featured-item:hover {
    box-shadow: var(--novahome-shadow-hover);
}

.novahome-featured-link {
    display: flex;
    gap: 20px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
}

.novahome-featured-image {
    flex-shrink: 0;
    width: 160px;
    height: 95px;
    border-radius: var(--novahome-radius-sm);
    overflow: hidden;
}

.novahome-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.novahome-featured-item:hover .novahome-featured-image img {
    transform: scale(1.05);
}

.novahome-featured-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.novahome-featured-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--novahome-white);
    background: linear-gradient(135deg, var(--novahome-green) 0%, var(--novahome-green-light) 100%);
    border-radius: 4px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

.novahome-featured-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.novahome-featured-item-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--novahome-dark);
    margin: 0;
}

.novahome-tech-badge {
    background: linear-gradient(135deg, var(--novahome-green) 0%, var(--novahome-green-light) 100%);
}

.novahome-featured-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--novahome-gray-light);
}

.novahome-featured-cat {
    color: var(--novahome-green);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--novahome-transition);
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: inherit !important;
}

.novahome-featured-cat:hover {
    color: var(--novahome-green-light);
    text-decoration: underline;
    background: none !important;
}

.novahome-featured-meta .novahome-tech-cat {
    color: var(--novahome-green);
    background: none !important;
}

.novahome-featured-meta .novahome-tech-cat:hover {
    color: var(--novahome-green-light);
    text-decoration: underline;
    background: none !important;
}

/* Featured blog cat link */
.novahome-featured-blog-cat {
    color: var(--novahome-blue);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--novahome-transition);
}

.novahome-featured-blog-cat:hover {
    color: #1a85c4;
    text-decoration: underline;
}

/* Author link in featured blogs */
.novahome-featured-blog-author {
    color: var(--novahome-gray);
    text-decoration: none;
    transition: color var(--novahome-transition);
}

.novahome-featured-blog-author:hover {
    color: var(--novahome-green);
}

/* ============================================
   Blogs Section
   ============================================ */
.novahome-blogs-section {
    background: linear-gradient(180deg, var(--novahome-bg) 0%, var(--novahome-bg-warm) 100%);
    padding: 40px;
    border-radius: var(--novahome-radius);
    margin-left: -20px;
    margin-right: -20px;
    padding-left: calc(20px + 40px);
    padding-right: calc(20px + 40px);
}

.novahome-blogs-title {
    font-size: 2.2rem !important;
    font-weight: 700 !important;
    margin: 0;
    color: var(--novahome-dark);
}

.novahome-green {
    color: var(--novahome-green);
}

/* Featured Blog (style NovaMag) */
.novahome-featured-blog {
    margin-bottom: 20px;
}

.novahome-featured-blog-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--novahome-white);
    border-radius: var(--novahome-radius);
    box-shadow: var(--novahome-shadow);
    transition: all var(--novahome-transition);
    border-left: 4px solid transparent;
}

.novahome-featured-blog-inner:hover {
    box-shadow: var(--novahome-shadow-hover);
    border-left-color: var(--novahome-green);
}

.novahome-featured-blog-image {
    flex-shrink: 0;
    width: 180px;
    height: 105px;
    border-radius: var(--novahome-radius-sm);
    overflow: hidden;
    display: block;
}

.novahome-featured-blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.novahome-featured-blog-image:hover img {
    transform: scale(1.05);
}

.novahome-featured-blog-content {
    flex: 1;
    min-width: 0;
}

.novahome-featured-blog-title-link {
    text-decoration: none;
    color: inherit;
}

.novahome-featured-blog-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--novahome-dark);
    margin: 0 0 8px;
    line-height: 1.35;
    transition: color var(--novahome-transition);
}

.novahome-featured-blog-title-link:hover .novahome-featured-blog-title {
    color: var(--novahome-green);
}

.novahome-featured-blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--novahome-gray);
}

.novahome-blogs-empty {
    text-align: center;
    padding: 40px 20px;
    background: var(--novahome-white);
    border-radius: var(--novahome-radius);
}

.novahome-blogs-empty p {
    margin: 0;
    font-size: 1.1rem;
    color: var(--novahome-gray);
}

.novahome-blogs-cta {
    text-align: center;
    margin-top: 30px;
}

/* Footer blogs (CTA + View All) */
.novahome-blogs-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.novahome-link-blogs {
    font-size: 0.95rem;
}

/* ============================================
   Forum Section
   ============================================ */
.novahome-forum-section {
    padding-top: 20px;
}

.novahome-forum-list {
    background: var(--novahome-white);
    border-radius: var(--novahome-radius);
    border: 1px solid var(--novahome-gray-lighter);
    overflow: hidden;
}

.novahome-forum-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 22px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--novahome-gray-lighter);
    transition: all var(--novahome-transition);
}

.novahome-forum-item:last-child {
    border-bottom: none;
}

.novahome-forum-item:hover {
    background: var(--novahome-bg);
}

.novahome-forum-bullet {
    color: var(--novahome-green);
    font-size: 0.5rem;
    line-height: 1.8rem;
    flex-shrink: 0;
}

.novahome-forum-content {
    flex: 1;
    min-width: 0;
}

.novahome-forum-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--novahome-dark);
    margin-bottom: 4px;
}

.novahome-forum-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--novahome-gray-light);
}

.novahome-forum-name {
    color: var(--novahome-green);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--novahome-transition);
}

.novahome-forum-name:hover {
    color: var(--novahome-green-light);
}

.novahome-forum-sep {
    color: var(--novahome-gray-lighter);
}

/* ============================================
   No Content
   ============================================ */
.novahome-no-content {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    color: var(--novahome-gray);
    font-size: 1rem;
    background: var(--novahome-bg);
    border-radius: var(--novahome-radius);
}

/* ============================================
   Join Community Section
   ============================================ */
.novahome-join-section {
    margin-top: 20px;
    margin-bottom: 60px;
}

.novahome-join-box {
    background: var(--novahome-white);
    border: 2px solid var(--novahome-green);
    border-radius: var(--novahome-radius);
    padding: 45px 40px;
    text-align: center;
    position: relative;
}

.novahome-join-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--novahome-green);
    border-radius: var(--novahome-radius) var(--novahome-radius) 0 0;
}

.novahome-join-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--novahome-dark);
}

.novahome-join-text {
    font-size: 1rem;
    margin: 0 0 25px;
    color: var(--novahome-gray);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.novahome-btn-join {
    background: var(--novahome-white);
    color: var(--novahome-green);
    border: 2px solid var(--novahome-green);
    padding: 14px 32px;
    font-size: 1rem;
    box-shadow: none;
}

.novahome-btn-join:hover {
    background: var(--novahome-green);
    color: var(--novahome-white);
}

/* ============================================
   Support the Project Section
   ============================================ */
.novahome-support-section {
    margin-top: 40px;
    margin-bottom: 20px;
}

.novahome-support-box {
    background: var(--novahome-bg);
    border-radius: var(--novahome-radius);
    padding: 45px 40px;
    text-align: center;
    border: 1px solid var(--novahome-gray-lighter);
}

.novahome-support-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 15px;
    color: var(--novahome-dark);
}

.novahome-support-text {
    font-size: 1rem;
    color: var(--novahome-gray);
    margin: 0 0 25px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.novahome-bmc-link {
    display: inline-block;
}

.novahome-bmc-link:hover {
    opacity: 0.9;
}

.novahome-bmc-button {
    height: 50px;
    width: auto;
    border-radius: 8px;
}

/* ============================================
   Responsive: Tablet (max 992px)
   ============================================ */
@media (max-width: 992px) {
    .novahome-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .novahome-blogs-section {
        padding: 30px;
        padding-left: calc(20px + 30px);
        padding-right: calc(20px + 30px);
    }
    
    .novahome-featured-blog-link {
        flex-direction: column;
    }
    
    .novahome-featured-blog-image {
        width: 100%;
        height: 180px;
    }
    
    .novahome-featured-link {
        flex-direction: column;
    }
    
    .novahome-featured-image {
        width: 100%;
        height: 150px;
    }
}

/* ============================================
   Responsive: Mobile (max 600px)
   ============================================ */
@media (max-width: 600px) {
    .novahome-container {
        padding: 0 15px;
    }
    
    .novahome-section {
        margin-bottom: 45px;
    }
    
    .novahome-section-subtitle {
        font-size: 1rem;
    }
    
    .novahome-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    /* Grid mobile: 1 colonne */
    .novahome-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    /* Blogs section mobile */
    .novahome-blogs-section {
        margin-left: -15px;
        margin-right: -15px;
        padding: 25px;
        border-radius: 0;
    }
    
    .novahome-blogs-title {
        font-size: 1.8rem !important;
    }
    
    /* Featured blogs mobile - stack vertical */
    .novahome-featured-blog-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .novahome-featured-blog-image {
        width: 100%;
        height: 180px;
    }
    
    .novahome-featured-blog-content {
        width: 100%;
    }
    
    .novahome-featured-title-row {
        flex-wrap: wrap;
    }
    
    .novahome-featured-blog-title {
        font-size: 1.05rem;
    }
    
    /* Cards mobile */
    .novahome-card-content {
        padding: 15px;
    }
    
    .novahome-card-title {
        font-size: 0.9rem;
    }
    
    /* Featured mobile */
    .novahome-featured-section {
        margin-top: 30px;
        padding-top: 25px;
    }
    
    .novahome-featured-link {
        padding: 14px;
    }
    
    .novahome-featured-image {
        height: 130px;
    }
    
    .novahome-featured-item-title {
        font-size: 0.95rem;
    }
    
    /* Forum mobile */
    .novahome-forum-item {
        padding: 15px 18px;
    }
    
    .novahome-forum-item:hover {
        padding-left: 22px;
    }
    
    .novahome-forum-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .novahome-forum-sep {
        display: none;
    }
    
    /* Join section mobile */
    .novahome-join-box {
        padding: 30px 20px;
    }
    
    .novahome-join-title {
        font-size: 1.4rem;
    }
    
    .novahome-join-text {
        font-size: 0.95rem;
    }
    
    .novahome-btn-join {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    /* Support section mobile */
    .novahome-support-box {
        padding: 35px 25px;
    }
    
    .novahome-support-title {
        font-size: 1.3rem;
    }
    
    .novahome-bmc-button {
        height: 45px;
    }
}

/* ============================================
   Accessibility
   ============================================ */
.novahome-btn:focus,
.novahome-card-link:focus,
.novahome-featured-link:focus,
.novahome-featured-blog-link:focus,
.novahome-forum-item:focus {
    outline: 2px solid var(--novahome-green);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .novahome-container * {
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================
   Dark mode support (optionnel)
   ============================================ */
@media (prefers-color-scheme: dark) {
    .novahome-container {
        /* Peut être activé si besoin */
    }
}
