/* ============================================================
   NAJAC VOX - STYLES v10.0
   ============================================================ */

/* Force le 100% de large en sortant du conteneur du thème si nécessaire */
#najac-vox-container {
    width: 100vw;
    max-width: 100vw;
    min-height: 100vh;
    margin: 0;
    background: #fff;
    display: flex;
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-shadow: none;
    border-radius: 0;
}

#najac-vox { 
    display: flex; 
    width: 100%; 
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.vox-sidebar { 
    width: 320px; 
    border-right: 1px solid #f0f0f0; 
    display: flex; 
    flex-direction: column; 
    background: #fff; 
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
}

.vox-sidebar-header { 
    padding: 30px 20px; 
    background: #ce1010; 
    color: #fff; 
    font-weight: 900; 
    text-transform: uppercase; 
    font-size: 20px; 
}

/* User Bar en haut */
.vox-user-bar { 
    padding: 20px; 
    border-bottom: 1px solid #eee; 
    background: #fdfdfd; 
    display: flex; 
    align-items: center; 
    gap: 12px;
    order: 1;
}

.vox-user-name { 
    display: block; 
    font-size: 14px; 
    font-weight: 700; 
    color: #333; 
}

.vox-user-links { 
    display: flex; 
    gap: 12px; 
    margin-top: 5px; 
    flex-wrap: wrap; 
}

.vox-user-links a, 
.vox-user-links span { 
    font-size: 11px; 
    font-weight: 700; 
    text-transform: uppercase; 
    cursor: pointer; 
    text-decoration: none; 
    color: #ce1010; 
}

/* Liste des topics sticky */
.vox-topic-list { 
    flex: 1; 
    overflow-y: auto; 
    order: 2;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.vox-topic-item { 
    padding: 18px 20px; 
    cursor: pointer; 
    border-bottom: 1px solid #f9f9f9; 
    font-weight: 600; 
    color: #444; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    transition: 0.2s;
    pointer-events: auto;
    -webkit-tap-highlight-color: rgba(206, 16, 16, 0.2);
}

.vox-topic-item:hover { 
    background: #fafafa; 
}

.vox-topic-item.active { 
    background: #fff5f5; 
    color: #ce1010; 
    border-left: 6px solid #ce1010; 
}

.vox-count-bubble { 
    font-size: 11px; 
    color: #999; 
    font-weight: 400; 
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.vox-main { 
    flex: 1; 
    overflow-y: auto; 
    padding: 0; 
    background: #fff; 
    position: relative; 
}

/* Zone sticky en haut (image + titre) */
.vox-sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

/* Welcome top dans sticky */
.vox-welcome-top { 
    margin: 0; 
    padding: 20px 40px;
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid #f0f0f0; 
    background: #fff;
}

.vox-welcome-text { 
    font-size: 22px; 
    color: #111; 
    font-weight: 800; 
}

/* Image en bandeau dans sticky */
.vox-img-wrapper { 
    width: 100%; 
    height: 353px; 
    overflow: hidden; 
    border-radius: 0; 
    margin: 0; 
    box-shadow: none;
}

.vox-featured-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

/* Titre et séparateur dans sticky */
.vox-header-title { 
    font-size: 38px; 
    font-weight: 900; 
    color: #111; 
    margin: 0; 
    padding: 30px 40px 15px 40px;
}

.vox-separator { 
    height: 6px; 
    width: 70px; 
    background: #ce1010; 
    margin: 0 40px 20px 40px;
}

/* Contenu scrollable (commentaires, etc) */
.vox-scrollable-content {
    padding: 20px 40px 40px 40px;
}

/* ============================================================
   CONTRIBUTIONS
   ============================================================ */
.vox-contribution { 
    background: #fff; 
    padding: 30px; 
    border-radius: 15px; 
    margin-bottom: 25px; 
    border: 1px solid #f0f0f0; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.03); 
}

.vox-author-row { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 15px; 
    font-weight: 700; 
}

.vox-attached-img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 12px; 
    margin-top: 20px; 
    border: 1px solid #eee; 
}

/* ============================================================
   DASHBOARD ADMIN
   ============================================================ */
.vox-dashboard { 
    background: linear-gradient(135deg, #fff 0%, #fff9f9 100%); 
    padding: 30px; 
    border-radius: 20px; 
    margin-bottom: 30px; 
    border: 2px solid #f0f0f0; 
}

.vox-dash-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 30px; 
}

.vox-dash-title { 
    font-size: 28px; 
    font-weight: 900; 
    color: #ce1010; 
    margin: 0; 
}

.vox-dash-stats { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px; 
}

.vox-stat-card { 
    background: #fff; 
    padding: 20px; 
    border-radius: 12px; 
    border: 1px solid #f0f0f0; 
    text-align: center; 
}

.vox-stat-number { 
    font-size: 36px; 
    font-weight: 900; 
    color: #ce1010; 
    margin: 0; 
}

.vox-stat-label { 
    font-size: 12px; 
    color: #999; 
    text-transform: uppercase; 
    font-weight: 700; 
    margin-top: 5px; 
}

.vox-topic-card { 
    background: #fff; 
    padding: 25px; 
    border-radius: 15px; 
    margin-bottom: 20px; 
    border: 1px solid #f0f0f0; 
    cursor: pointer; 
    transition: 0.3s; 
}

.vox-topic-card:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
}

.vox-topic-card.has-pending { 
    border-left: 5px solid #ffc107; 
    background: #fffdf5; 
}

.vox-topic-card-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: start; 
    margin-bottom: 15px; 
}

.vox-topic-card-title { 
    font-size: 20px; 
    font-weight: 800; 
    color: #111; 
    margin: 0; 
}

.vox-badge-pending { 
    background: #ffc107; 
    color: #856404; 
    padding: 5px 15px; 
    border-radius: 20px; 
    font-size: 11px; 
    font-weight: bold; 
}

.vox-badge-ok { 
    background: #28a745; 
    color: #fff; 
    padding: 5px 15px; 
    border-radius: 20px; 
    font-size: 11px; 
    font-weight: bold; 
}

.vox-topic-meta { 
    display: flex; 
    gap: 20px; 
    font-size: 13px; 
    color: #666; 
}

.vox-quick-actions { 
    display: flex; 
    gap: 10px; 
    margin-top: 15px; 
    padding-top: 15px; 
    border-top: 1px solid #f0f0f0; 
}

/* ============================================================
   FORMULAIRES
   ============================================================ */
.vox-form-card { 
    background: #fafafa; 
    padding: 40px; 
    border-radius: 20px; 
    border: 1px solid #eee; 
    margin-top: 50px; 
}

.vox-input-locked { 
    background: #eee !important; 
    color: #888; 
    cursor: not-allowed; 
}

.button-red { 
    background: #ce1010; 
    color: #fff; 
    border: none; 
    padding: 20px; 
    border-radius: 12px; 
    font-weight: 800; 
    cursor: pointer; 
    width: 100%; 
    transition: 0.3s; 
}

.button-red:disabled { 
    background: #ccc; 
    cursor: not-allowed; 
    transform: none; 
}

.button-red:hover { 
    background: #a50d0d; 
    transform: translateY(-2px); 
}

/* Bouton Auth principal */
.vox-auth-link {
    display: inline-block;
    padding: 16px 35px;
    background: #ce1010;
    color: #fff !important;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    text-transform: uppercase;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(206,16,16,0.3);
}

.vox-auth-link:hover {
    background: #a50d0d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(206,16,16,0.4);
}

/* Onglets Connexion/Inscription */
.vox-form-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.vox-form-tab {
    padding: 15px 30px;
    cursor: pointer;
    font-weight: 700;
    color: #999;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 13px;
}

.vox-form-tab.active {
    color: #ce1010;
    border-bottom-color: #ce1010;
}

.vox-tab-content {
    display: none;
}

.vox-tab-content.active {
    display: block;
}

/* Checkbox charte */
.vox-checkbox-wrapper {
    display: flex;
    align-items: start;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.vox-checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.vox-checkbox-label {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.vox-checkbox-label a {
    color: #ce1010;
    font-weight: bold;
    text-decoration: underline;
}

/* ============================================================
   NOTIFICATIONS & LOADERS
   ============================================================ */
#vox-notify { 
    position: fixed; 
    top: 30px; 
    right: 30px; 
    padding: 15px 35px; 
    border-radius: 50px; 
    color: #fff; 
    font-weight: 700; 
    z-index: 10001; 
    display: none; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); 
}

.vox-success { 
    background: #28a745; 
}

.vox-error { 
    background: #dc3545; 
}

.vox-loader { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 40px; 
    height: 40px; 
    border: 4px solid #f0f0f0; 
    border-top: 4px solid #ce1010; 
    border-radius: 50%; 
    animation: spin 1s linear infinite; 
    display: none;
}

@keyframes spin { 
    0% { transform: translate(-50%, -50%) rotate(0deg); } 
    100% { transform: translate(-50%, -50%) rotate(360deg); } 
}

/* ============================================================
   ACCESSIBILITÉ
   ============================================================ */
.vox-topic-item:focus, 
button:focus, 
input:focus, 
textarea:focus, 
.vox-help-link:focus, 
.vox-close-hero:focus {
    outline: 3px solid #ce1010;
    outline-offset: 2px;
}

textarea {
    resize: vertical !important;
    min-height: 120px;
}

/* ============================================================
   MODÉRATION
   ============================================================ */
.vox-btn-mod { 
    padding: 8px 16px; 
    border-radius: 6px; 
    font-size: 11px; 
    cursor: pointer; 
    border: none; 
    font-weight: bold; 
    color: #fff; 
}

.vox-btn-approve { 
    background: #28a745; 
}

.vox-btn-delete { 
    background: #dc3545; 
}

/* ============================================================
   HERO CARD
   ============================================================ */
.vox-hero-card { 
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%); 
    padding: 40px; 
    border-radius: 20px; 
    border: 2px solid #f0f0f0; 
    margin-bottom: 40px; 
    text-align: center;
    position: relative;
}

.vox-hero-card.hidden { 
    display: none; 
}

.vox-hero-card h2 { 
    font-size: 32px; 
    font-weight: 900; 
    color: #ce1010; 
    margin: 0 0 15px 0; 
}

.vox-hero-card p { 
    font-size: 16px; 
    color: #666; 
    line-height: 1.6; 
    margin: 0 0 20px 0; 
    max-width: 700px; 
    margin-left: auto; 
    margin-right: auto; 
}

.vox-help-link { 
    color: #ce1010; 
    cursor: pointer; 
    font-weight: bold; 
    text-decoration: underline; 
    font-size: 14px; 
    text-transform: uppercase;
}

.vox-help-link:hover { 
    color: #a50d0d; 
}

.vox-close-hero { 
    position: absolute; 
    top: 15px; 
    right: 15px; 
    width: 40px; 
    height: 40px; 
    background: #ce1010; 
    color: #fff; 
    border-radius: 50%; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: bold; 
    font-size: 24px;
    transition: 0.3s;
}

.vox-close-hero:hover { 
    background: #a50d0d; 
    transform: rotate(90deg);
}

/* ============================================================
   PANNEAU LATÉRAL
   ============================================================ */
.vox-side-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 30px rgba(0,0,0,0.2);
    z-index: 999999;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 40px;
}

.vox-side-panel.open {
    right: 0;
}

.vox-side-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: -1;
    pointer-events: none;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.vox-side-panel-overlay.open {
    z-index: 10001;
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.vox-panel-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: #666;
    transition: 0.3s;
}

.vox-panel-close:hover {
    background: #ce1010;
    color: #fff;
    transform: rotate(90deg);
}

.vox-side-panel h3 {
    color: #ce1010;
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 25px;
    padding-right: 40px;
}

.vox-side-panel p {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 15px;
}

.vox-side-panel strong {
    color: #ce1010;
    font-weight: 800;
}

/* ============================================================
   LIGHTBOX AMÉLIORÉE
   ============================================================ */
.vox-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.95);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vox-lightbox-overlay.active {
    display: flex;
}

.vox-lightbox-container {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vox-lightbox-overlay img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    object-fit: contain;
}

.vox-lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 30px;
    color: #fff;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.3);
    z-index: 1000000;
}

.vox-lightbox-close:hover {
    background: #ce1010;
    border-color: #ce1010;
    transform: rotate(90deg);
}

/* Image cliquable dans les commentaires */
.vox-lightbox-trigger {
    cursor: zoom-in;
    transition: transform 0.3s, box-shadow 0.3s;
}

.vox-lightbox-trigger:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* ============================================================
   MENU MOBILE
   ============================================================ */
.vox-mobile-menu-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    min-width: 70px;
    height: 70px;
    padding: 12px 20px;
    background: #ce1010;
    color: #fff;
    border-radius: 35px;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(206, 16, 16, 0.4);
    transition: 0.3s;
    animation: vox-pulse 3s ease-in-out infinite;
}

.vox-mobile-menu-btn:active {
    transform: scale(0.95);
    animation: none;
}

.vox-menu-icon {
    font-size: 24px;
    line-height: 1;
}

.vox-menu-text {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.2;
}

@keyframes vox-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(206, 16, 16, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 30px rgba(206, 16, 16, 0.6);
    }
}

/* Arrêter l'animation après le premier clic */
.vox-mobile-menu-btn.clicked {
    animation: none;
}

.vox-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    pointer-events: none;
}

.vox-sidebar-overlay.open {
    display: block;
    pointer-events: auto;
}

/* ============================================================
   RESPONSIVE - TABLETTES
   ============================================================ */
@media (max-width: 1024px) { 
    .vox-scrollable-content { 
        padding: 20px 30px 40px 30px; 
    }
    
    .vox-welcome-top { 
        padding: 15px 30px; 
    }
    
    .vox-header-title { 
        padding: 20px 30px 10px 30px; 
    }
    
    .vox-separator { 
        margin: 0 30px 15px 30px; 
    }
}

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */
@media (max-width: 768px) {
    #najac-vox-container { 
        flex-direction: column; 
        left: 0; 
        right: 0; 
        margin-left: 0; 
        margin-right: 0; 
        width: 100%; 
    }
    
    .vox-sidebar { 
        position: fixed;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        z-index: 10001;
        transition: left 0.3s ease;
        box-shadow: 5px 0 20px rgba(0,0,0,0.3);
        border-right: none;
    }
    
    .vox-sidebar.open {
        left: 0;
        pointer-events: auto;
    }
    
    .vox-mobile-menu-btn {
        display: flex;
    }
    
    .vox-main {
        width: 100%;
    }
    
    .vox-scrollable-content { 
        padding: 15px 20px 80px 20px; 
    }
    
    .vox-img-wrapper { 
        height: 200px; 
    }
    
    .vox-hero-card { 
        padding: 25px; 
    }
    
    .vox-hero-card h2 {
        font-size: 24px;
    }
    
    .vox-hero-card p {
        font-size: 14px;
    }
    
    .vox-side-panel { 
        width: 100%; 
        right: -100%; 
        padding: 30px 20px; 
    }
    
    .vox-welcome-top { 
        padding: 15px 20px; 
    }
    
    .vox-welcome-text {
        font-size: 18px;
    }
    
    .vox-header-title { 
        font-size: 24px; 
        padding: 15px 20px 10px 20px; 
    }
    
    .vox-separator { 
        margin: 0 20px 15px 20px; 
    }
    
    .vox-contribution {
        padding: 20px;
        font-size: 15px;
    }
    
    .vox-form-card {
        padding: 25px 20px;
    }
    
    .button-red {
        padding: 16px;
    }
    
    #vox-notify {
        top: 15px;
        right: 15px;
        left: 15px;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .vox-dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vox-form-tab {
        padding: 12px 20px;
        font-size: 12px;
    }
    
    .vox-user-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ============================================================
   RESPONSIVE - PETIT MOBILE
   ============================================================ */
@media (max-width: 480px) {
    .vox-header-title {
        font-size: 20px;
    }
    
    .vox-img-wrapper {
        height: 180px;
    }
    
    .vox-dash-stats {
        grid-template-columns: 1fr;
    }
    
    .vox-sidebar {
        width: 90%;
    }
}

/* ============================================================
   MODAL SUPPRESSION
   ============================================================ */
.vox-delete-reason-option {
    display: block;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.vox-delete-reason-option:hover {
    border-color: #ce1010;
    background: #fff5f5;
}

.vox-delete-reason-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.vox-delete-reason-option input[type="radio"]:checked + .vox-delete-reason-content {
    color: #ce1010;
}

.vox-delete-reason-option input[type="radio"]:checked ~ * {
    border-color: #ce1010;
}

.vox-delete-reason-option:has(input:checked) {
    border-color: #ce1010;
    background: #fff5f5;
}

.vox-delete-reason-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-left: 30px;
    position: relative;
}

.vox-delete-reason-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    background: #fff;
}

.vox-delete-reason-option input[type="radio"]:checked + .vox-delete-reason-content::before {
    border-color: #ce1010;
    background: #ce1010;
    box-shadow: inset 0 0 0 3px #fff;
}

.vox-delete-reason-content strong {
    font-size: 15px;
    color: #333;
}

.vox-delete-reason-option input[type="radio"]:checked + .vox-delete-reason-content strong {
    color: #ce1010;
}

.vox-delete-reason-content span {
    font-size: 13px;
    color: #999;
    line-height: 1.4;
}