/**
 * STG Blog — Widget « Articles récents »
 *
 * Charte STG :
 *   Primaire (accents, hover)       : #403935
 *   Texte principal (titres)        : #403935
 *   Texte secondaire (date)         : #8b7c74
 *   Fond widget                     : #ffffff
 *   Border-radius                   : 6px
 *   Police                          : Raleway
 */

.stg-blog-recent-articles-widget {
    background: #ffffff;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
    font-family: 'Raleway', sans-serif;
}

.stg-blog-recent-articles-widget .widget-title,
.stg-blog-recent-articles-widget h3.widget-title,
.stg-blog-recent-articles-widget h2.widgettitle,
.stg-blog-recent-articles-widget .widget-header h3 {
    font-size: 24px !important;
    font-weight: 400 !important;
    letter-spacing: 0.5px !important;
    color: #5D514B !important;
    text-transform: none !important;
    margin: 0 0 16px !important;
    line-height: 1.2 !important;
}

.stg-blog-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* v1.1.2 — Item flex : contient un lien-image + un lien-titre séparés */
.stg-blog-recent-item {
    padding: 12px 0;
    border-bottom: 1px solid #f2efeb;
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.stg-blog-recent-item:first-child {
    padding-top: 0;
}
.stg-blog-recent-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

/* Lien-image dédié : garantit la cliquabilité de la photo */
.stg-blog-recent-thumb-link {
    display: block;
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    text-decoration: none !important;
    cursor: pointer !important;
    pointer-events: auto !important; /* force au cas où Houzez/parent posait none */
    outline: none;
}
.stg-blog-recent-thumb {
    display: block;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 6px;
    background: #f2efeb;
    pointer-events: none; /* le clic va au parent <a> */
}
.stg-blog-recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    pointer-events: none;
}
.stg-blog-recent-thumb-link:hover .stg-blog-recent-thumb img {
    transform: scale(1.05);
}

.stg-blog-recent-body {
    flex: 1 1 auto;
    min-width: 0;
}

.stg-blog-recent-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 4px;
    line-height: 1.4;
    letter-spacing: 0.2px;
    /* Clamp 2 lignes max pour uniformité visuelle */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.stg-blog-recent-title-link {
    color: #403935 !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
    font-weight: 500;
}
.stg-blog-recent-title-link:hover,
.stg-blog-recent-title-link:focus {
    color: #8b7c74 !important;
    text-decoration: none !important;
}

.stg-blog-recent-date {
    display: block;
    font-size: 12px;
    color: #8b7c74;
    font-weight: 400;
    margin-top: 2px;
}

.stg-blog-recent-excerpt {
    font-size: 13px;
    color: #5D514B;
    line-height: 1.5;
    margin: 6px 0 0;
    /* Clamp 2 lignes max */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 480px) {
    .stg-blog-recent-thumb {
        flex: 0 0 64px;
        width: 64px;
        height: 64px;
    }
    .stg-blog-recent-title {
        font-size: 13px;
    }
}

/* ═════════════════════════════════════════════════════════════════════
   Widget « STG Archives » (v1.1.0)
   Accordéon par année + compteur mois + charte STG
   ═════════════════════════════════════════════════════════════════════ */
.stg-blog-archives-widget {
    background: #ffffff;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
    font-family: 'Raleway', sans-serif;
}
.stg-blog-archives-widget .widget-title,
.stg-blog-archives-widget h3.widget-title,
.stg-blog-archives-widget h2.widgettitle,
.stg-blog-archives-widget .widget-header h3 {
    font-size: 24px !important;
    font-weight: 400 !important;
    letter-spacing: 0.5px !important;
    color: #5D514B !important;
    text-transform: none !important;
    margin: 0 0 16px !important;
    line-height: 1.2 !important;
}

.stg-blog-archives {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ─── Mode ACCORDION ────────────────────────────────────────────── */
.stg-blog-archives-accordion .stg-blog-archives-year {
    border-bottom: 1px solid #f2efeb;
    list-style: none;
}
.stg-blog-archives-accordion .stg-blog-archives-year:last-child {
    border-bottom: 0;
}
.stg-blog-archives-year-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border: 0;
    color: #403935;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.3px;
    cursor: pointer;
    text-align: left;
    transition: color 0.15s ease;
}
.stg-blog-archives-year-toggle:hover {
    color: #8b7c74;
}
.stg-blog-archives-year-label {
    flex: 1 1 auto;
}
.stg-blog-archives-year-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 8px;
    background: #f2efeb;
    color: #403935;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 10px;
    letter-spacing: 0;
}
.stg-blog-archives-year-chevron {
    display: inline-flex;
    align-items: center;
    color: #8b7c74;
    transition: transform 0.2s ease;
}
.stg-blog-archives-year.is-open .stg-blog-archives-year-chevron {
    transform: rotate(180deg);
}
.stg-blog-archives-accordion .stg-blog-archives-months {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.stg-blog-archives-year.is-open .stg-blog-archives-months {
    max-height: 800px;
    padding-bottom: 8px;
}

/* ─── Mode LIST ─────────────────────────────────────────────────── */
.stg-blog-archives-list .stg-blog-archives-month {
    border-bottom: 1px solid #f2efeb;
}
.stg-blog-archives-list .stg-blog-archives-month:last-child {
    border-bottom: 0;
}

/* ─── Éléments mois (partagé accordion + list) ──────────────────── */
.stg-blog-archives-month {
    list-style: none;
}
.stg-blog-archives-month-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    color: #5D514B;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 400;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}
.stg-blog-archives-accordion .stg-blog-archives-month-link {
    padding-left: 20px; /* légère indentation sous l'année */
}
.stg-blog-archives-month-link:hover {
    background: #f2efeb;
    color: #403935;
    text-decoration: none !important;
}
.stg-blog-archives-month-label {
    flex: 1 1 auto;
}
.stg-blog-archives-month-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    background: transparent;
    color: #8b7c74;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}
.stg-blog-archives-month-link:hover .stg-blog-archives-month-count,
.stg-blog-archives-month-link:hover .stg-blog-archives-month-count * {
    background: #403935 !important;
    color: #ffffff !important;
}
/* Année : même règle au survol du toggle pour cohérence */
.stg-blog-archives-year-toggle:hover .stg-blog-archives-year-count,
.stg-blog-archives-year-toggle:hover .stg-blog-archives-year-count * {
    background: #403935 !important;
    color: #ffffff !important;
}

/* ─── Mode DROPDOWN ─────────────────────────────────────────────── */
.stg-blog-archives-select {
    width: 100%;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #d9d4d2;
    border-radius: 6px;
    color: #403935;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #403935 50%),
                      linear-gradient(135deg, #403935 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 34px;
}
.stg-blog-archives-select:hover,
.stg-blog-archives-select:focus {
    border-color: #403935;
    outline: none;
}
