/* ==========================================================================
   STYLE SPÉCIFIQUE : PAGE ARTICLE INDIVIDUEL (article.css)
========================================================================== */

/* Fil d'ariane (Breadcrumb) */
.sa-breadcrumb {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.sa-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}
.sa-breadcrumb a:hover {
    color: var(--la-orange);
}
.sa-breadcrumb .current {
    color: var(--la-rose);
}

/* Conteneur principal de l'article */
.sa-container {
    padding: 35px;
    border-radius: 20px;
    margin-bottom: 40px;
    position: relative; 
    z-index: 20;        
}

/* Image Héro de l'article */
.sa-hero-wrapper {
    width: 100%;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}
.sa-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top; 
    transition: transform 0.5s ease;
}
.sa-hero-wrapper:hover .sa-hero-img {
    transform: scale(1.02);
}

/* En-tête (Titre et Meta) */
.sa-header {
    margin-bottom: 35px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 25px;
}
.sa-title {
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 15px;
}
.sa-meta {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    font-style: italic;
}
.sa-meta span {
    color: var(--la-orange);
    font-weight: 800;
    font-style: normal;
}

/* Corps du texte */
.sa-content {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.8;
}
.sa-content p {
    margin-bottom: 25px;
}

.sa-content h1,
.sa-content h2,
.sa-content h3,
.sa-content h4,
.sa-content h5,
.sa-content h6 {
    margin-top: 1vh; 
    margin-bottom: 15px;
    color: #fff;
    line-height: 1.4;
}

.sa-content ul,
.sa-content ol {
    margin-bottom: 25px;
    padding-left: 20px; 
}

.sa-content ul li,
.sa-content ol li {
    margin-bottom: 12px; 
    line-height: 1.7;
}

/* Bloc de citation (Blockquote) */
.sa-blockquote {
    position: relative;
    font-size: 1.25rem;
    font-weight: 600;
    font-style: italic;
    color: #fff;
    padding: 25px 30px;
    margin: 40px 0;
    background: linear-gradient(to right, rgba(255,0,107,0.1), rgba(0,0,0,0));
    border-left: 4px solid var(--la-rose);
    border-radius: 0 12px 12px 0;
    line-height: 1.6;
}

/* Call to action text force to black */
.boost-call-to-action,
.boost-call-to-action * {
    color: #000 !important;
}

/* Pied d'article : Tags et Boutons Prev/Next */
.sa-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sa-tags-container {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
    gap: 10px;
}
.sa-tags-container a {
    display: inline-block;
    text-decoration: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 18px;
    border-radius: 8px; 
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 12px;
    margin-bottom: 12px;
}
.sa-tags-container a:nth-child(odd) {
    background: rgba(255, 0, 107, 0.1); 
    border: 1px solid rgba(255, 0, 107, 0.4);
}
.sa-tags-container a:nth-child(even) {
    background: rgba(250, 169, 64, 0.1); 
    border: 1px solid rgba(250, 169, 64, 0.4);
}
.sa-tags-container a:hover {
    transform: translateY(-3px);
    color: #fff;
    border-color: transparent;
}
.sa-tags-container a:nth-child(odd):hover {
    background: var(--grad-mauve-rose); 
    box-shadow: 0 5px 15px rgba(208, 11, 244, 0.3);
}
.sa-tags-container a:nth-child(even):hover {
    background: var(--grad-jaune-orange); 
    box-shadow: 0 5px 15px rgba(250, 169, 64, 0.3);
}

.sa-post-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sa-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
}
.sa-nav-btn:hover {
    background: var(--grad-rose-orange);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 107, 0.3);
    color: #000;
}

/* ==========================================================================
   ESPACE COMMENTAIRES
========================================================================== */
.sa-comments-section {
    padding: 35px;
    border-radius: 20px;
    position: relative; 
    z-index: 10;        
    margin-bottom: 5vh; /* <-- AJOUT: Marge basse pour décoller du footer */
}
.sa-comments-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 25px;
}

.sa-comment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sa-comment-form textarea,
.sa-comment-form input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.sa-comment-form textarea:focus,
.sa-comment-form input:focus {
    border-color: var(--la-rose);
    box-shadow: 0 0 15px rgba(255, 0, 107, 0.15);
}

.sa-form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.sa-submit-btn {
    align-self: flex-start;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid var(--la-orange);
    color: var(--la-orange);
    border-radius: 8px;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sa-submit-btn:hover {
    background: var(--grad-jaune-orange);
    border-color: transparent;
    color: #000;
    box-shadow: 0 5px 20px rgba(250, 169, 64, 0.4);
    transform: translateY(-2px);
}

/* Responsive mobile form commentaires */
@media (max-width: 768px) {
    .sa-form-row {
        grid-template-columns: 1fr;
    }
    .sa-post-nav {
        flex-direction: column;
        gap: 15px;
    }
    .sa-nav-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   BARRE D'INTERACTION (Likes & Partages)
========================================================================== */
.sa-interaction-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
    gap: 20px;       
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.sa-interaction-bar > div:first-child {
    display: flex;
    align-items: center;
    flex-wrap: wrap; 
    gap: 15px;
}

/* --- BOUTON J'AIME RÉINTÉGRÉ --- */
.sa-like-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sa-like-btn:hover {
    background: rgba(255, 0, 107, 0.1);
    border-color: var(--la-rose);
    color: var(--la-rose);
}

.sa-like-btn.liked {
    background: var(--la-rose);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(255, 0, 107, 0.4);
}

.sa-like-btn.liked .heart-icon {
    fill: #fff;
}

/* --- BOUTON FAVORIS --- */
.sa-fav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}
.sa-fav-btn .bookmark-icon {
    transition: all 0.3s ease;
}
.sa-fav-btn:hover {
    background: rgba(250, 169, 64, 0.1);
    border-color: var(--la-orange);
    color: var(--la-orange);
}
.sa-fav-btn.active {
    background: var(--grad-jaune-orange); 
    color: #000;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(250, 169, 64, 0.4);
}
.sa-fav-btn.active .bookmark-icon {
    fill: #000; 
    stroke: #000;
    animation: heart-burst 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- BOUTONS DE PARTAGE RÉINTÉGRÉS --- */
.sa-share-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap; 
    gap: 12px;
}

.sa-share-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.sa-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sa-share-btn:hover {
    transform: translateY(-2px);
}
.sa-share-btn.fb:hover { background: #1877F2; border-color: #1877F2; }
.sa-share-btn.in:hover { background: #0A66C2; border-color: #0A66C2; }
.sa-share-btn.x-twitter:hover { background: #000; border-color: #fff; color: #fff; }

/* ==========================================================================
   DESIGN DES COMMENTAIRES ET RÉPONSES IMBRIQUÉES
========================================================================== */
.sa-comments-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 50px;
}

.sa-comment-item {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
}

/* En-tête du commentaire */
.sa-comment-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.sa-comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--grad-jaune-orange);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.1rem;
}

.sa-avatar-admin {
    background: var(--grad-rose-orange);
    color: #fff;
    border: 2px solid var(--la-rose);
}

.sa-comment-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sa-comment-author {
    font-weight: 800;
    color: #fff;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sa-badge-author {
    font-size: 0.7rem;
    font-weight: 900;
    background: var(--la-rose);
    color: #fff;
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.sa-comment-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.sa-comment-content {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    padding-left: 57px; 
}

/* Action Répondre */
.sa-comment-actions {
    padding-left: 57px;
    margin-top: 10px;
}

.sa-comment-reply-btn {
    background: transparent;
    border: none;
    color: var(--la-orange);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.sa-comment-reply-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Structuration des réponses imbriquées (Niveau 2) */
.sa-comment-replies {
    margin-left: 57px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-left: 2px dashed rgba(255, 0, 107, 0.2); 
    padding-left: 20px;
}

.sa-comment-item.sa-is-reply {
    background: rgba(0, 0, 0, 0.2);
}

/* --- BANDEAU D'INDICATEUR DE RÉPONSE DANS LE FORMULAIRE --- */
.sa-reply-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(250, 169, 64, 0.1);
    border: 1px solid rgba(250, 169, 64, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.sa-reply-indicator-text {
    font-size: 0.9rem;
    color: var(--la-orange);
}

.sa-reply-indicator-text strong {
    color: #fff;
}

.sa-cancel-reply-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.sa-cancel-reply-btn:hover {
    background: rgba(218, 10, 14, 0.2);
    border-color: var(--la-rouge);
    color: #fff;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive mobile pour les commentaires */
@media (max-width: 768px) {
    .sa-comment-content, .sa-comment-actions { padding-left: 0; }
    .sa-comment-replies { margin-left: 15px; padding-left: 10px; }
}

/* ==========================================================================
   MINI ÉDITEUR DE TEXTE WYSIWYG
========================================================================== */
.sa-editor-wrapper {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sa-editor-wrapper:focus-within {
    border-color: var(--la-rose);
    box-shadow: 0 0 15px rgba(255, 0, 107, 0.15);
}

.sa-editor-toolbar {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sa-toolbar-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.sa-toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.sa-visual-editor {
    min-height: 120px;
    padding: 15px;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.6;
    outline: none;
}

.sa-visual-editor[contenteditable]:empty::before {
    content: attr(placeholder);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    display: block; 
}

/* BOUTON LIKER COMMENTAIRE */
.sa-comment-actions {
    display: flex;
    gap: 15px;
    padding-left: 57px;
    margin-top: 10px;
}

.sa-action-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.sa-action-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.sa-comment-like-btn.liked {
    color: var(--la-rose);
}
.sa-comment-like-btn.liked .heart-icon {
    fill: var(--la-rose);
    stroke: var(--la-rose);
}

/* ==========================================================================
   MODALE DE CONNEXION REQUISE
========================================================================== */
.sa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    animation: fadeInModal 0.3s forwards ease-out;
}

.sa-modal-box {
    width: 90%;
    max-width: 400px;
    padding: 30px;
    text-align: center;
    border-radius: 20px;
    transform: translateY(20px);
    animation: slideUpModal 0.3s forwards ease-out;
}

.sa-modal-icon {
    color: var(--la-rose);
    margin-bottom: 15px;
}

.sa-modal-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.sa-modal-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.sa-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.sa-modal-cancel {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sa-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sa-modal-login-btn {
    padding: 10px 20px;
    background: var(--grad-rose-orange);
    border: none;
    color: #000;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
    transition: all 0.3s ease;
}

.sa-modal-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 107, 0.3);
}

@keyframes fadeInModal {
    to { opacity: 1; }
}

@keyframes slideUpModal {
    to { transform: translateY(0); }
}

/* ==========================================================================
   MODALE DE PARTAGE (POPOVER)
========================================================================== */
.sa-share-popover .share-modal-box {
    width: 525px; 
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
}

.sa-share-media-preview { 
    width: 100%; 
    height: 260px; 
    border-radius: 12px; 
    overflow: hidden; 
    margin-bottom: 15px; 
    background: #000; 
}

.sa-modal-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
}

.sa-modal-close-icon { 
    background: rgba(255, 255, 255, 0.1); 
    border: none; 
    color: #fff; 
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.3rem; 
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer; 
    transition: all 0.3s ease;
}
.sa-modal-close-icon:hover { 
    background: var(--la-rose);
    color: #fff; 
    transform: rotate(90deg); 
}

.sa-copy-link-wrapper { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 15px;
    align-items: stretch; 
}
.sa-copy-input { 
    flex: 1; 
    background: rgba(0,0,0,0.5); 
    border: 1px solid rgba(255,255,255,0.2); 
    color: rgba(255,255,255,0.8); 
    padding: 12px 15px; 
    border-radius: 8px; 
    font-size: 0.9rem; 
    outline: none; 
}
.sa-copy-btn { 
    background: rgba(255, 255, 255, 0.1); 
    color: #fff; 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    padding: 0 20px; 
    border-radius: 8px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.3s ease; 
}
.sa-copy-btn:hover { 
    background: var(--la-rose);
    border-color: var(--la-rose);
    transform: translateY(-2px); 
}

/* ==========================================================================
   STYLE DU BLOC AUTEUR (Cartes & Liste)
========================================================================== */
.la-author-info {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px; 
}

.la-author-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.la-author-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 6px 14px 6px 6px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.la-author-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--la-rose, #ff006b);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.la-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--la-orange, #faa940);
    background: #000;
}

.la-author-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   RESPONSIVE LAYOUT : GRILLE PRINCIPALE (CONTENU + SIDEBAR)
========================================================================== */
.la-global-grid {
    display: grid;
    grid-template-columns: 1fr 320px; 
    gap: 40px; 
    align-items: start; 
    width: 100%;
    max-width: 1400px; 
    margin: 0 auto;
    padding: 0 20px; 
}

.la-main-content-column {
    min-width: 0; 
    width: 100%;
}

@media (max-width: 992px) {
    .la-global-grid {
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    .la-sidebar-global {
        display: none !important;
    }
}

/* ==========================================================================
   CORRECTION DE LA SIDEBAR (Désactivation du scroll interne & Marge)
========================================================================== */
.la-sidebar-global {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin-top: 10.5vh; /* <-- AJOUT: Marge haute pour s'aligner sur l'image de l'article */
}

.la-widget {
    overflow: visible !important;
}