/**
 * Styles pour le header de la page article
 * Structure : Titre > Image > Métadonnées (comme ingredient.php)
 */

.article-header {
    margin-bottom: 0;
}

/* Le titre .main-title hérite des styles de commun.css (avec ::after) */
/* Pas besoin de le redéfinir ici */

/* Boutons de navigation par type d'article */
.article-type-navigation {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 0;
}

.article-type-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-color, #333);
    background-color: var(--card-bg, #f5f5f5);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.article-type-btn:hover {
    background-color: var(--primary-color-light, #ffe5e5);
    color: var(--primary-color, #ff6b6b);
    text-decoration: none;
}

.article-type-btn.active {
    background-color: var(--primary-color, #ff6b6b);
    color: white;
    border-color: var(--primary-color, #ff6b6b);
}

/* Mode sombre */
.dark-mode .article-type-btn {
    background-color: var(--card-bg, #2d3748);
    color: var(--text-color, #f7fafc);
}

.dark-mode .article-type-btn:hover {
    background-color: var(--primary-color-dark, #cc5555);
    color: white;
}

.dark-mode .article-type-btn.active {
    background-color: var(--primary-color, #ff6b6b);
    color: white;
}

/* Container de l'image (similaire à ingredient.php) */
#article-image-container {
    margin-bottom: 0;
}

.article-content-wrapper {
    position: relative;
}

.article-image-principale {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-main-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Introduction (directement après l'image) */
.article-introduction {
    margin-top: 10px;
    margin-bottom: 15px;
}

.article-introduction p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-style: italic;
}

/* Container des métadonnées (après l'introduction) */
.article-meta-container {
    margin-top: 0;
    margin-bottom: 20px;
}

/* Wrapper pour auteur/dates à gauche, temps de lecture à droite */
.article-meta-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

/* Partie gauche : auteur et dates */
.article-meta-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Partie droite : temps de lecture */
.article-meta-right {
    flex-shrink: 0;
}

/* Métadonnées génériques */
.article-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
}

.article-meta-item svg {
    flex-shrink: 0;
}

/* Labels et valeurs */
.meta-label {
    color: var(--text-tertiary, #999);
    font-size: 0.85rem;
}

.meta-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Auteur */
.article-author {
    font-size: 0.95rem;
}

.article-author .meta-value {
    color: var(--primary-color);
    font-weight: 600;
}

/* Dates */
.article-meta-dates {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.article-date-creation,
.article-date-modification {
    font-size: 0.85rem;
}

/* Temps de lecture */
.article-temps-lecture {
    color: var(--primary-color);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .article-header .main-title {
        font-size: 2rem;
    }

    /* Boutons de navigation responsive */
    .article-type-navigation {
        gap: 8px;
    }

    .article-type-btn {
        padding: 8px 18px;
        font-size: 0.95rem;
    }

    /* Garder la mise en page horizontale sur tablette */
    .article-meta-wrapper {
        gap: 20px;
    }

    .article-introduction p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .article-header .main-title {
        font-size: 1.75rem;
    }

    /* Boutons en mode mobile */
    .article-type-navigation {
        gap: 6px;
        flex-wrap: wrap;
    }

    .article-type-btn {
        padding: 6px 14px;
        font-size: 0.9rem;
    }

    .article-meta-wrapper {
        gap: 12px;
    }

    .article-meta-left {
        gap: 6px;
    }

    .meta-label,
    .meta-value {
        font-size: 0.8rem;
    }
}
