/*
 * Feuille de style "Blindée" pour Ma Super Author Box - IActualité v2.3.2
 * Version avec spécificité augmentée et !important pour gagner les conflits CSS.
 */

/* =================================== */
/* STYLES DE BASE (RENFORCÉS)          */
/* =================================== */

body .msab-author-box-wrapper {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%) !important;
    border: 1px solid #333 !important;
    border-radius: 0 !important;
    padding: 24px !important;
    margin: 40px 0 30px 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 20px !important;
    position: relative !important;
    overflow: hidden !important;
    max-width: 100% !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 
                0 0 0 1px rgba(255, 255, 255, 0.05) inset !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif !important;
}

body .msab-author-box-wrapper * {
    box-sizing: border-box;
}

/* Avatar et badge étoile (RENFORCÉS) */
body .msab-avatar {
    flex-shrink: 0 !important;
    position: relative !important;
    width: 90px !important;
    height: 90px !important;
    margin: 0 !important;
    padding: 0 !important;
}

body .msab-avatar img {
    border-radius: 50% !important;
    width: 90px !important;
    height: 90px !important;
    border: 3px solid rgba(255, 255, 255, 0.1) !important;
    object-fit: cover !important;
    display: block !important;
    position: static !important;
}

body .msab-avatar::after {
    content: "✨" !important;
    position: absolute !important;
    bottom: 5px !important;
    right: 5px !important;
    background: linear-gradient(135deg, #4a90e2, #357abd) !important;
    color: white !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    z-index: 3 !important;
}

/* Contenu (texte, etc.) (RENFORCÉ) */
body .msab-content {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    text-align: left !important;
}

body .msab-author-name {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.3em !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}

body .msab-author-box-wrapper:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

body .msab-author-box-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transition: left 0.5s;
    z-index: 1;
}

body .msab-author-box-wrapper:hover::before {
    left: 100%;
}

body .msab-avatar:hover img {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.2);
}

body .msab-author-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body .msab-author-details {
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body .msab-author-name a {
    text-decoration: none;
    color: inherit;
    position: relative;
    display: inline-block;
    background: linear-gradient(45deg, #ffffff, #cbd5e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body .msab-author-name a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(45deg, #4a90e2, #63b3ed);
    transition: width 0.3s ease;
}

body .msab-author-name a:hover::after {
    width: 100%;
}

body .msab-articles-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

body .msab-articles-badge::before {
    content: "📝";
    font-size: 0.9em;
    margin-right: 2px;
}

body .msab-job-title {
    margin: 0;
    font-size: 0.95em;
    color: #a0aec0;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 15px;
    display: inline-block;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.3;
}

body .msab-job-title span {
    color: #718096;
    font-weight: 400;
}

body .msab-expertise {
    margin: 0;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 12px;
    background: rgba(74, 144, 226, 0.15);
    border-radius: 12px;
    display: inline-block;
    border: 1px solid rgba(74, 144, 226, 0.3);
}

body .msab-description {
    font-size: 0.95em;
    line-height: 1.5;
    color: #cbd5e0;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    max-height: 3.6em; /* Environ 2 lignes */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

body .msab-social-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: auto; /* Pousse les liens en bas */
}

body .msab-social-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

body .msab-social-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

body .msab-social-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    color: #ffffff;
}

body .msab-social-links a[href*="twitter.com"]:before,
body .msab-social-links a[href*="x.com"]:before {
    content: "𝕏";
    font-weight: bold;
    color: #4a90e2;
}

body .msab-social-links a[href*="linkedin.com"]:before { content: "💼"; }
body .msab-social-links a[href*="facebook.com"]:before { content: "📘"; }
body .msab-social-links a[href*="instagram.com"]:before { content: "📷"; }
body .msab-social-links a[href*="youtube.com"]:before { content: "📺"; }

body .msab-more-posts a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85em;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body .msab-more-posts a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body .msab-more-posts a:after {
    content: "→";
    font-weight: bold;
    transition: transform 0.3s ease;
}

body .msab-more-posts a:hover:after {
    transform: translateX(3px);
}

body .msab-author-stats {
    width: 100%;
    display: flex;
    gap: 16px;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
    margin-top: 16px;
}

body .msab-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 70px;
    flex: 1;
    max-width: 100px;
}

body .msab-stat-number {
    font-size: 1.2em;
    font-weight: 700;
    color: #4a90e2;
    line-height: 1;
}

body .msab-stat-label {
    font-size: 0.7em;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    text-align: center;
}

/* =================================== */
/* RESPONSIVE                          */
/* =================================== */

@media (max-width: 600px) {
    body .msab-author-box-wrapper {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    body .msab-avatar {
        align-self: center !important;
    }

    body .msab-content {
        text-align: center !important;
    }

    body .msab-author-name {
        justify-content: center !important;
    }
    
    body .msab-job-title, body .msab-expertise {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
    
    body .msab-social-section {
        justify-content: center !important;
    }
}

/* =================================== */
/* SHORTCODE (NON-RENFORCÉ)            */
/* =================================== */

.msab-shortcode-author-box {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.msab-shortcode-avatar img {
    border-radius: 50%;
    width: 70px;
    height: 70px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.msab-shortcode-details h5 {
    margin: 0 0 6px 0;
    color: #ffffff;
    font-size: 1.1em;
}

.msab-shortcode-details h5 a {
    text-decoration: none;
    color: inherit;
}

.msab-shortcode-details h5 a:hover {
    color: #4a90e2;
}

.msab-shortcode-job {
    margin: 0 0 6px 0;
    font-size: 0.85em;
    color: #a0aec0;
    font-style: italic;
}

.msab-shortcode-desc {
    margin: 0;
    font-size: 0.85em;
    color: #cbd5e0;
    line-height: 1.4;
}

/* =================================== */
/* WIDGET TOP AUTEURS (NON-RENFORCÉ)   */
/* =================================== */

.msab-top-authors-widget {
    margin: 15px 0;
}

.msab-mini-author-card {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
    border-radius: 12px;
    border-left: 4px solid #4a90e2;
    transition: transform 0.2s ease, background 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.msab-mini-author-card:hover {
    transform: translateX(5px);
    background: linear-gradient(135deg, #3a3a3a 0%, #404040 100%);
}

.msab-mini-avatar {
    margin-right: 12px;
}

.msab-mini-avatar img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.msab-mini-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.9em;
}

.msab-mini-info h4 a {
    text-decoration: none;
    color: #e2e8f0;
    transition: color 0.2s ease;
}

.msab-mini-info h4 a:hover {
    color: #ffffff;
}

.msab-mini-job {
    margin: 0 0 4px 0;
    font-size: 0.8em;
    color: #a0aec0;
    font-style: italic;
}

.msab-mini-count {
    font-size: 0.75em;
    background: #4a90e2;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}