/* Category Famille - Styles spécialisés responsive */

/* Container principal avec padding intelligent */
.category-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 0;
}

/* Hero Section */
.category-hero {
    background: linear-gradient(135deg, #F7A8B8 0%, #81C3D7 100%);
    border-radius: 20px;
    margin-bottom: 3rem;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    padding: 3rem;
    min-height: 400px;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.hero-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Sections thématiques */
.family-themes {
    margin: 4rem 0;
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.theme-card {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.theme-card:hover {
    transform: translateY(-5px);
}

.theme-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.theme-card h3 {
    color: #2D3748;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.theme-card p {
    color: #718096;
    line-height: 1.6;
}

/* Calculateur interactif */
.family-calculator {
    background: linear-gradient(135deg, #F7F8FC 0%, #EDF2F7 100%);
    padding: 3rem;
    border-radius: 20px;
    margin: 4rem 0;
}

.calculator-container h2 {
    text-align: center;
    color: #2D3748;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.calculator-form {
    max-width: 600px;
    margin: 0 auto;
}

.question-group {
    margin-bottom: 2rem;
}

.question-group label {
    display: block;
    font-weight: 600;
    color: #4A5568;
    margin-bottom: 0.5rem;
}

.range-input {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #E2E8F0;
    outline: none;
    -webkit-appearance: none;
}

.range-input::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #F7A8B8;
    cursor: pointer;
}

.range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #F7A8B8;
    cursor: pointer;
    border: none;
}

.range-value {
    display: inline-block;
    margin-left: 1rem;
    font-weight: 600;
    color: #F7A8B8;
    font-size: 1.1rem;
}

.calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, #F7A8B8 0%, #81C3D7 100%);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.calculate-btn:hover {
    transform: translateY(-2px);
}

.result-display {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    display: none;
}

/* Statistiques et conseils */
.family-insights {
    margin: 4rem 0;
}

.family-insights h2 {
    text-align: center;
    color: #2D3748;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.insight-card {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-top: 4px solid #F7A8B8;
}

.insight-stat {
    font-size: 3rem;
    font-weight: 700;
    color: #F7A8B8;
    margin-bottom: 1rem;
}

.insight-card h4 {
    color: #2D3748;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.insight-card p {
    color: #718096;
    line-height: 1.6;
}

/* Section articles */
.articles-section {
    margin: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: #2D3748;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: #718096;
    font-size: 1.1rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-card.featured {
    border-left: 4px solid #F7A8B8;
}

.article-content {
    padding: 2rem;
}

.article-content h3 {
    margin-bottom: 1rem;
}

.article-content h3 a {
    color: #2D3748;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
}

.article-content h3 a:hover {
    color: #F7A8B8;
}

.article-description {
    color: #718096;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #A0AEC0;
}

.article-date {
    font-weight: 500;
}

.reading-time {
    color: #81C3D7;
    font-weight: 500;
}

/* Tableau responsive */
.family-approaches {
    margin: 4rem 0;
}

.family-approaches h2 {
    text-align: center;
    color: #2D3748;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.responsive-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: #fff;
}

.responsive-table th {
    background: linear-gradient(135deg, #F7A8B8 0%, #81C3D7 100%);
    color: #fff;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.responsive-table td {
    padding: 1rem;
    border-bottom: 1px solid #E2E8F0;
    color: #4A5568;
}

.responsive-table tr:hover {
    background-color: #F7FAFC;
}

/* Call to action final */
.family-cta {
    background: linear-gradient(135deg, #2D3748 0%, #4A5568 100%);
    color: #fff;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    margin: 4rem 0;
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
}

.feature-icon {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .category-container {
        padding-top: 20px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-stats {
        justify-content: center;
    }

    .themes-grid {
        grid-template-columns: 1fr;
    }

    .family-calculator {
        padding: 2rem;
    }

    .calculator-container h2 {
        font-size: 1.5rem;
    }

    .insights-grid {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .family-cta {
        padding: 2rem;
    }

    .cta-content h2 {
        font-size: 1.5rem;
    }

    .cta-features {
        flex-direction: column;
        align-items: center;
    }

    /* Tableau responsive mobile */
    .responsive-table {
        min-width: auto;
        display: block;
    }
    
    .responsive-table thead,
    .responsive-table tbody,
    .responsive-table th,
    .responsive-table td,
    .responsive-table tr {
        display: block;
    }
    
    .responsive-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .responsive-table tr {
        border: 1px solid #E2E8F0;
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 10px;
    }
    
    .responsive-table td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        text-align: left;
        white-space: normal;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .responsive-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 15px;
        width: 45%;
        text-align: left;
        font-weight: bold;
        color: #F7A8B8;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-content {
        gap: 2rem;
        padding: 2.5rem;
    }

    .themes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .hero-content {
        padding: 4rem;
    }

    .themes-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .insights-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}