/* ==========================================
   PAGE D'ACCUEIL (index.css)
   ========================================== */

:root {
    /* --- STRUCTURE & FONDS --- */
    --index-card-bg: #faf5e5;            /* Fond des cartes et blocs */
    --index-border-color: #02060f;       /* Couleur des bordures */
    --index-shadow-color: rgba(0, 0, 0, 0.04);
    --index-shadow-hover: rgba(0, 0, 0, 0.08);

    /* --- TYPOGRAPHIE & TITRES --- */
    --index-title-color: #0c0e0c;        /* Titres d'introduction et des cartes */
    --index-link-color: #0c0e0c;         /* Couleur des liens de catégories */
    --index-link-hover: #f1cb4f;        /* Couleur des liens au survol */
    --index-text-color: #1f2937;         /* Texte principal des paragraphes */
    --index-text-muted: #6b7280;        /* Badges et métadonnées */
}

/* --- Bloc de Présentation --- */
main .intro-box {
    background: var(--index-card-bg);
    border: 1px solid var(--index-border-color);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
    text-align: center;
    box-shadow: 0 4px 12px var(--index-shadow-color);
}

main .intro-box h2 {
    color: var(--index-title-color);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

main .intro-box p {
    color: var(--index-text-color);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* --- Grille des catégories --- */
.section-categories {
    margin-bottom: 3rem;
}

.grid-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.card-categorie {
    background: var(--index-card-bg);
    border: 1px solid var(--index-border-color);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-categorie:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px var(--index-shadow-hover);
}

.card-categorie h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-categorie h2 a {
    color: var(--index-link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-categorie h2 a:hover {
    color: var(--index-link-hover);
    text-decoration: underline;
}

.card-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--index-border-color);
}

.badge-count,
.badge-sites {
    font-size: 0.85rem;
    color: var(--index-text-muted);
    font-weight: normal;
}

/* --- Section 2 cadres (Texte + Photo) --- */
.split-section {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.split-card {
    flex: 1;
    width: 100%;
    background: var(--index-card-bg);
    border: 1px solid var(--index-border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--index-shadow-color);
}

.split-text {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.split-text h2 {
    color: var(--index-title-color);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.split-text p {
    color: var(--index-text-color);
    font-size: 1rem;
    line-height: 1.6;
}

.split-photo {
    padding: 0;
}

.split-photo img {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
    display: block;
}

/* --- Adaptation Tablette et Mobile --- */
@media (max-width: 868px) {
    main .intro-box {
        padding: 1.25rem 1rem;
        margin-top: 1rem;
        margin-bottom: 1.5rem;
    }

    main .intro-box h2 {
        font-size: 1.35rem;
    }

    .grid-categories {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .split-section {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .split-card {
        width: 100%;
    }

    .split-text {
        padding: 1.25rem;
    }

    .split-photo img {
        width: 100%;
        height: 220px;
        object-fit: cover;
    }
}