/**
 * Blog Widgets Styles
 * Normandie Séminaire Theme
 *
 * @package NormandieSeminaire
 * @since 1.0.0
 */

/* ==========================================================================
   SIDEBAR BASE
   ========================================================================== */

.blog-sidebar,
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (max-width: 1024px) {
    .blog-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .blog-sidebar {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SIDEBAR WIDGET BASE
   ========================================================================== */

.sidebar-widget {
    background: var(--ns-white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.sidebar-widget h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--ns-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   WIDGET AUTHOR
   ========================================================================== */

.widget-author {
    text-align: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 4px solid var(--ns-gold);
}

.widget-author h4 {
    justify-content: center;
    margin-bottom: 4px;
}

.author-title {
    color: var(--ns-red);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.author-bio {
    color: var(--ns-text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 16px;
}

.author-link {
    color: var(--ns-red);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.author-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   WIDGET CTA
   ========================================================================== */

.widget-cta {
    background: linear-gradient(135deg, var(--ns-red) 0%, var(--ns-red-dark) 100%);
    color: var(--ns-white);
    text-align: center;
}

.widget-cta .widget-label {
    display: inline-block;
    background: var(--ns-gold);
    color: var(--ns-dark);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.widget-cta h4 {
    color: var(--ns-white);
    font-size: 1.25rem;
    margin-bottom: 8px;
    justify-content: center;
}

.widget-cta p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 16px;
    line-height: 1.5;
}

.widget-cta .btn-primary {
    display: block;
    background: var(--ns-gold);
    color: var(--ns-dark);
    padding: 14px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 12px;
    transition: all var(--transition-fast);
}

.widget-cta .btn-primary:hover {
    background: var(--ns-gold-dark);
    transform: translateY(-2px);
}

.widget-phone {
    font-size: 0.85rem;
    opacity: 0.8;
}

.widget-phone a {
    color: var(--ns-gold);
    text-decoration: none;
    font-weight: 600;
}

.widget-phone a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   WIDGET NEWSLETTER
   ========================================================================== */

.widget-newsletter {
    background: var(--ns-dark);
    color: var(--ns-white);
}

.widget-newsletter h4 {
    color: var(--ns-gold);
}

.widget-newsletter > p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 16px;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input[type="email"] {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--ns-white);
    color: var(--ns-text);
}

.newsletter-form input[type="email"]::placeholder {
    color: var(--ns-text-muted);
}

.newsletter-form button {
    background: var(--ns-gold);
    color: var(--ns-dark);
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.newsletter-form button:hover {
    background: var(--ns-gold-dark);
}

.newsletter-privacy {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: 8px;
}

.newsletter-success {
    background: var(--ns-success);
    color: white;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

/* ==========================================================================
   WIDGET POPULAR POSTS
   ========================================================================== */

.widget-popular h4::before {
    content: "📈";
}

.popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-list li {
    margin-bottom: 16px;
}

.popular-list li:last-child {
    margin-bottom: 0;
}

.popular-list a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.popular-list a:hover {
    transform: translateX(4px);
}

.popular-number {
    color: var(--ns-gold);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    min-width: 32px;
}

.popular-title {
    color: var(--ns-text);
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color var(--transition-fast);
}

.popular-list a:hover .popular-title {
    color: var(--ns-red);
}

/* ==========================================================================
   WIDGET CATEGORIES
   ========================================================================== */

.widget-categories h4::before {
    content: "📂";
}

.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.categories-list li:last-child {
    border-bottom: none;
}

.categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--ns-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.categories-list a:hover {
    color: var(--ns-red);
}

.categories-list span {
    color: var(--ns-text-muted);
    font-size: 0.85rem;
    background: var(--ns-light);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ==========================================================================
   WIDGET FORMATION
   ========================================================================== */

.widget-formation {
    background: var(--ns-blue);
    color: var(--ns-white);
    position: relative;
    overflow: visible;
}

.widget-formation .widget-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--ns-gold);
    color: var(--ns-dark);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.widget-formation h4 {
    color: var(--ns-white);
    margin-top: 8px;
}

.widget-formation > p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 16px;
    line-height: 1.5;
}

.widget-formation .btn-outline {
    display: block;
    text-align: center;
    border: 2px solid var(--ns-white);
    color: var(--ns-white);
    background: transparent;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.widget-formation .btn-outline:hover {
    background: var(--ns-white);
    color: var(--ns-blue);
}

/* ==========================================================================
   WIDGET RELATED ARTICLES
   ========================================================================== */

.widget-related h4::before {
    content: "📚";
}

.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-list li {
    margin-bottom: 16px;
}

.related-list li:last-child {
    margin-bottom: 0;
}

.related-list a {
    display: flex;
    gap: 12px;
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.related-list a:hover {
    transform: translateX(4px);
}

.related-list img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.related-list span {
    color: var(--ns-text);
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color var(--transition-fast);
}

.related-list a:hover span {
    color: var(--ns-red);
}

/* ==========================================================================
   WIDGET TAGS CLOUD
   ========================================================================== */

.widget-tags h4::before {
    content: "🏷️";
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-cloud a {
    display: inline-block;
    padding: 6px 12px;
    background: var(--ns-light);
    color: var(--ns-text);
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.tags-cloud a:hover {
    background: var(--ns-red);
    color: var(--ns-white);
}

/* ==========================================================================
   WIDGET SOCIAL
   ========================================================================== */

.widget-social h4::before {
    content: "🔗";
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ns-light);
    color: var(--ns-text);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--ns-red);
    color: var(--ns-white);
    transform: translateY(-2px);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   WIDGET STICKY CTA (Article Sidebar)
   ========================================================================== */

.article-sidebar .widget-cta {
    position: sticky;
    top: 100px;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 640px) {
    .sidebar-widget {
        padding: 20px;
    }

    .widget-cta .btn-primary {
        padding: 12px 20px;
    }

    .author-avatar {
        width: 80px;
        height: 80px;
    }

    .popular-number {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .blog-sidebar,
    .article-sidebar {
        display: none;
    }
}
