/* JVG Members - Jnews Theme Integration CSS
   Compatible avec le design system de Jnews
   ========================================== */

/* Variables CSS pour l'intégration avec Jnews */
.jvgm-container {
    --jvg-primary-color: #f0516b;
    --jvg-secondary-color: #333333;
    --jvg-accent-color: #ffd700;
    --jvg-bg-light: #f8f9fa;
    --jvg-text-dark: #333333;
    --jvg-text-light: #666666;
    --jvg-border-color: #dee2e6;
    --jvg-border-radius: 4px;
    --jvg-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --jvg-transition: all 0.3s ease;
}

/* === HEADER INTEGRATION === */
.jvg-header-member-links {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.jvg-header-member-links .jvg-header-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 8px;
}

.jvg-header-member-links a {
    color: inherit;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--jvg-border-radius);
    transition: var(--jvg-transition);
    display: flex;
    align-items: center;
}

.jvg-header-member-links a:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--jvg-primary-color);
}

/* Style bouton pour les liens header */
.jvg-style-button .jvg-login-link,
.jvg-style-button .jvg-register-link {
    background-color: var(--jvg-primary-color);
    color: white !important;
    border-radius: 20px;
    padding: 8px 16px;
}

.jvg-style-button .jvg-login-link:hover,
.jvg-style-button .jvg-register-link:hover {
    background-color: rgba(240, 81, 107, 0.8);
}

/* Style minimal */
.jvg-style-minimal a {
    padding: 4px 8px;
    font-size: 13px;
}

/* === PROFIL MEMBRE INTEGRATION === */
.jvgm-profile-single {
    background: white;
    border-radius: var(--jvg-border-radius);
    box-shadow: var(--jvg-shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

/* Bannière compatible Jnews */
.jvgm-banner {
    background: linear-gradient(135deg, var(--jvg-primary-color), var(--jvg-secondary-color));
    color: white;
    padding: 40px 20px;
    text-align: center;
    position: relative;
}

.jvgm-banner.has-image {
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.jvgm-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.jvgm-avatar {
    border: 4px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    transition: var(--jvg-transition);
}

.jvgm-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255,255,255,0.4);
}

.jvgm-banner-meta h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 700;
    text-align: left;
}

.jvgm-username {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.jvgm-registered {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Onglets style Jnews */
.jvgm-tabs {
    background: white;
    border-bottom: 1px solid var(--jvg-border-color);
    padding: 0 20px;
    display: flex;
    overflow-x: auto;
}

.jvgm-tab {
    padding: 15px 20px;
    color: var(--jvg-text-light);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: var(--jvg-transition);
    white-space: nowrap;
    font-weight: 500;
}

.jvgm-tab:hover {
    color: var(--jvg-primary-color);
    background-color: rgba(240, 81, 107, 0.05);
}

.jvgm-tab.is-active {
    color: var(--jvg-primary-color);
    border-bottom-color: var(--jvg-primary-color);
    background-color: rgba(240, 81, 107, 0.05);
}

/* Contenu des onglets */
.jvgm-tab-content {
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* === BOUTONS STYLE JNEWS === */
.jvgm-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--jvg-border-radius);
    cursor: pointer;
    transition: var(--jvg-transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.jvgm-btn-primary {
    background-color: var(--jvg-primary-color);
    color: white;
}

.jvgm-btn-primary:hover {
    background-color: rgba(240, 81, 107, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.jvgm-btn-secondary {
    background-color: white;
    color: var(--jvg-secondary-color);
    border: 1px solid var(--jvg-border-color);
}

.jvgm-btn-secondary:hover {
    background-color: var(--jvg-bg-light);
    border-color: var(--jvg-primary-color);
}

/* === BADGES ET STATUTS === */
.jvg-member-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    margin-left: 8px;
}

.jvg-premium-member {
    background-color: var(--jvg-accent-color);
    color: #333;
}

.jvg-premium-member i {
    margin-right: 4px;
}

/* === AUTHOR BOX JNEWS === */
.jvg-jnews-author-box {
    background: white;
    border-radius: var(--jvg-border-radius);
    padding: 20px;
    margin: 30px 0;
    box-shadow: var(--jvg-shadow);
    border-left: 4px solid var(--jvg-primary-color);
}

.jvg-jnews-author-box .jeg_author_image img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.jvg-jnews-author-box .jeg_author_name a {
    color: var(--jvg-primary-color);
    text-decoration: none;
    font-weight: 700;
}

.jvg-jnews-author-box .jeg_author_name a:hover {
    color: var(--jvg-secondary-color);
}

.jvg-jnews-author-box .jeg_author_socials a {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background-color: var(--jvg-bg-light);
    color: var(--jvg-text-light);
    border-radius: 50%;
    margin-right: 8px;
    transition: var(--jvg-transition);
}

.jvg-jnews-author-box .jeg_author_socials a:hover {
    background-color: var(--jvg-primary-color);
    color: white;
    transform: translateY(-2px);
}

/* === FORMULAIRES === */
.jvgm-form {
    background: white;
    padding: 30px;
    border-radius: var(--jvg-border-radius);
    box-shadow: var(--jvg-shadow);
    max-width: 500px;
    margin: 0 auto;
}

.jvgm-form-group {
    margin-bottom: 20px;
}

.jvgm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--jvg-text-dark);
}

.jvgm-form-group input,
.jvgm-form-group textarea,
.jvgm-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--jvg-border-color);
    border-radius: var(--jvg-border-radius);
    font-size: 14px;
    transition: var(--jvg-transition);
}

.jvgm-form-group input:focus,
.jvgm-form-group textarea:focus,
.jvgm-form-group select:focus {
    outline: none;
    border-color: var(--jvg-primary-color);
    box-shadow: 0 0 0 2px rgba(240, 81, 107, 0.2);
}

/* === DASHBOARD MEMBRE === */
.jvg-jnews-member-dashboard {
    background: white;
    padding: 30px;
    border-radius: var(--jvg-border-radius);
    box-shadow: var(--jvg-shadow);
}

.jvg-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.jvg-dashboard-stats .stat-card {
    background: var(--jvg-bg-light);
    padding: 20px;
    border-radius: var(--jvg-border-radius);
    text-align: center;
    border-left: 4px solid var(--jvg-primary-color);
}

.jvg-dashboard-stats .stat-card h3 {
    font-size: 2em;
    margin: 0 0 5px 0;
    color: var(--jvg-primary-color);
    font-weight: 700;
}

.jvg-dashboard-stats .stat-card p {
    margin: 0;
    color: var(--jvg-text-light);
    font-size: 0.9em;
}

.jvg-dashboard-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* === COLLECTION DE JEUX === */
.jvgm-collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.jvgm-collection-item {
    background: white;
    border-radius: var(--jvg-border-radius);
    overflow: hidden;
    box-shadow: var(--jvg-shadow);
    transition: var(--jvg-transition);
}

.jvgm-collection-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.jvgm-collection-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.jvgm-collection-item-content {
    padding: 15px;
}

.jvgm-collection-item h4 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: var(--jvg-text-dark);
}

/* Bouton collection */
.jvgm-collection-toggle {
    background: var(--jvg-bg-light);
    border: 1px solid var(--jvg-border-color);
    color: var(--jvg-text-dark);
    padding: 8px 16px;
    border-radius: var(--jvg-border-radius);
    cursor: pointer;
    transition: var(--jvg-transition);
    font-size: 14px;
}

.jvgm-collection-toggle:hover {
    background-color: var(--jvg-primary-color);
    color: white;
    border-color: var(--jvg-primary-color);
}

.jvgm-collection-toggle[data-in="1"] {
    background-color: var(--jvg-primary-color);
    color: white;
    border-color: var(--jvg-primary-color);
}

/* === ANNUAIRE DES MEMBRES === */
.jvgm-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.jvgm-member-card {
    background: white;
    border-radius: var(--jvg-border-radius);
    padding: 25px;
    text-align: center;
    box-shadow: var(--jvg-shadow);
    transition: var(--jvg-transition);
    border-top: 3px solid var(--jvg-primary-color);
}

.jvgm-member-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.jvgm-member-card .jvgm-avatar {
    margin-bottom: 15px;
}

.jvgm-member-card h3 {
    margin: 0 0 5px 0;
    color: var(--jvg-text-dark);
}

.jvgm-member-card .jvgm-username {
    color: var(--jvg-text-light);
    font-size: 0.9em;
    margin-bottom: 10px;
}

.jvgm-member-card .jvgm-member-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--jvg-border-color);
}

.jvgm-member-card .jvgm-member-stats span {
    font-size: 0.8em;
    color: var(--jvg-text-light);
}

/* === NOTICES ET ALERTES === */
.jvgm-notice {
    padding: 12px 16px;
    border-radius: var(--jvg-border-radius);
    margin: 15px 0;
    border-left: 4px solid;
}

.jvgm-notice-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.jvgm-notice-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

.jvgm-notice-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #17a2b8;
}

/* === PAGES PERSONNALISEES === */
.jvgm-login-page,
.jvgm-register-page,
.jvgm-dashboard-page {
    padding: 40px 20px;
    min-height: 60vh;
}

.jvgm-form-container {
    max-width: 450px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: var(--jvg-border-radius);
    box-shadow: var(--jvg-shadow);
}

.jvgm-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.jvgm-form-header h1 {
    margin: 0 0 10px 0;
    color: var(--jvg-text-dark);
    font-size: 28px;
    font-weight: 700;
}

.jvgm-form-header p {
    margin: 0;
    color: var(--jvg-text-light);
    font-size: 16px;
}

.jvgm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.jvgm-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.jvgm-form-actions {
    margin-top: 25px;
}

.jvgm-form-actions .jvgm-btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
}

.jvgm-form-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--jvg-border-color);
}

.jvgm-form-footer p {
    margin: 10px 0;
    color: var(--jvg-text-light);
    font-size: 14px;
}

.jvgm-form-footer a {
    color: var(--jvg-primary-color);
    text-decoration: none;
    font-weight: 600;
}

.jvgm-form-footer a:hover {
    text-decoration: underline;
}

/* Dashboard */
.jvgm-dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.jvgm-dashboard-header h1 {
    margin: 0 0 10px 0;
    color: var(--jvg-text-dark);
    font-size: 32px;
    font-weight: 700;
}

.jvgm-dashboard-header p {
    margin: 0;
    color: var(--jvg-text-light);
    font-size: 18px;
}

.jvgm-dashboard-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.jvgm-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.jvgm-stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--jvg-border-radius);
    text-align: center;
    box-shadow: var(--jvg-shadow);
    border-top: 3px solid var(--jvg-primary-color);
    transition: var(--jvg-transition);
}

.jvgm-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.jvgm-stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--jvg-primary-color), #e63946);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    font-size: 24px;
}

.jvgm-stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--jvg-primary-color);
    margin: 10px 0 5px 0;
}

.jvgm-stat-label {
    color: var(--jvg-text-light);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.jvgm-dashboard-actions h2 {
    margin: 0 0 20px 0;
    color: var(--jvg-text-dark);
    font-size: 24px;
    font-weight: 700;
}

.jvgm-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.jvgm-action-card {
    background: white;
    padding: 25px;
    border-radius: var(--jvg-border-radius);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--jvg-shadow);
    transition: var(--jvg-transition);
    border-left: 4px solid var(--jvg-primary-color);
}

.jvgm-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    color: inherit;
}

.jvgm-action-card i {
    font-size: 32px;
    color: var(--jvg-primary-color);
    margin-bottom: 15px;
}

.jvgm-action-card h3 {
    margin: 0 0 10px 0;
    color: var(--jvg-text-dark);
    font-size: 18px;
    font-weight: 700;
}

.jvgm-action-card p {
    margin: 0;
    color: var(--jvg-text-light);
    font-size: 14px;
    line-height: 1.5;
}

.jvgm-dashboard-sidebar .jvgm-widget {
    background: white;
    padding: 25px;
    border-radius: var(--jvg-border-radius);
    box-shadow: var(--jvg-shadow);
    margin-bottom: 25px;
}

.jvgm-dashboard-sidebar .jvgm-widget h3 {
    margin: 0 0 20px 0;
    color: var(--jvg-text-dark);
    font-size: 18px;
    font-weight: 700;
    border-bottom: 2px solid var(--jvg-primary-color);
    padding-bottom: 10px;
}

.jvgm-profile-summary {
    text-align: center;
}

.jvgm-profile-summary .jvgm-avatar {
    margin-bottom: 15px;
}

.jvgm-profile-summary h4 {
    margin: 0 0 5px 0;
    color: var(--jvg-text-dark);
    font-size: 18px;
    font-weight: 700;
}

.jvgm-profile-summary .jvgm-username {
    color: var(--jvg-text-light);
    font-size: 14px;
    margin-bottom: 10px;
}

.jvgm-profile-summary .jvgm-member-since {
    color: var(--jvg-text-light);
    font-size: 12px;
    margin: 0;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
    .jvgm-dashboard-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .jvgm-dashboard-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .jvgm-banner-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .jvgm-banner-meta h1 {
        text-align: center;
    }
    
    .jvgm-tabs {
        padding: 0 10px;
    }
    
    .jvgm-tab {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .jvgm-tab-content {
        padding: 20px 15px;
    }
    
    .jvg-dashboard-actions {
        flex-direction: column;
    }
    
    .jvg-dashboard-actions .button {
        width: 100%;
        text-align: center;
    }
    
    .jvgm-directory-grid {
        grid-template-columns: 1fr;
    }
    
    .jvgm-collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .jvgm-banner {
        padding: 30px 15px;
    }
    
    .jvgm-banner-meta h1 {
        font-size: 2em;
    }
    
    .jvg-header-member-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .jvg-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .jvgm-form-container {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .jvgm-form-row {
        grid-template-columns: 1fr;
    }
    
    .jvgm-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .jvgm-action-grid {
        grid-template-columns: 1fr;
    }
    
    .jvgm-dashboard-header h1 {
        font-size: 24px;
    }
    
    .jvgm-dashboard-header p {
        font-size: 16px;
    }
}

/* === INTEGRATION ADMIN === */
.jvg-members-admin .jvg-admin-header {
    background: white;
    padding: 20px;
    border-radius: var(--jvg-border-radius);
    box-shadow: var(--jvg-shadow);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jvg-admin-stats {
    display: flex;
    gap: 20px;
}

.jvg-admin-stats .stat-card {
    background: var(--jvg-bg-light);
    padding: 15px 20px;
    border-radius: var(--jvg-border-radius);
    text-align: center;
    min-width: 120px;
}

.jvg-admin-stats .stat-card h3 {
    margin: 0 0 5px 0;
    font-size: 1.8em;
    color: var(--jvg-primary-color);
}

.jvg-admin-stats .stat-card p {
    margin: 0;
    font-size: 0.9em;
    color: var(--jvg-text-light);
}

/* Tables admin */
.jvg-members-admin table.wp-list-table {
    border-radius: var(--jvg-border-radius);
    overflow: hidden;
    box-shadow: var(--jvg-shadow);
}

.jvg-members-admin table.wp-list-table th {
    background-color: var(--jvg-primary-color);
    color: white;
    font-weight: 600;
}

.jvg-members-admin table.wp-list-table tr:hover {
    background-color: rgba(240, 81, 107, 0.05);
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jvgm-fade-in {
    animation: fadeInUp 0.5s ease-out;
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    .jvgm-container {
        --jvg-bg-light: #2d3748;
        --jvg-text-dark: #f7fafc;
        --jvg-text-light: #a0aec0;
        --jvg-border-color: #4a5568;
        --jvg-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    
    .jvgm-profile-single,
    .jvgm-form,
    .jvg-jnews-member-dashboard,
    .jvgm-member-card,
    .jvgm-collection-item {
        background: #2d3748;
        color: #f7fafc;
    }
}