/**
 * Styles pour les blocs Medal of Honor - Frontend
 */

/* === VARIABLES CSS === */
:root {
    --moh-primary: #8B4513;
    --moh-secondary: #D2691E;
    --moh-accent: #CD853F;
    --moh-text: #2C1810;
    --moh-bg: #F5F5DC;
    --moh-white: #FFFFFF;
    --moh-gray-light: #F8F9FA;
    --moh-gray: #6C757D;
    --moh-gray-dark: #343A40;
    --moh-success: #28A745;
    --moh-warning: #FFC107;
    --moh-danger: #DC3545;
    --moh-info: #17A2B8;
    
    --moh-border-radius: 8px;
    --moh-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --moh-transition: all 0.3s ease;
}

/* === RESET ET BASE === */
.moh-dashboard-block *,
.moh-medallion-block *,
.moh-auth-block * {
    box-sizing: border-box;
}

/* === BOUTONS === */
.moh-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--moh-border-radius);
    background: var(--moh-primary);
    color: var(--moh-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    transition: var(--moh-transition);
    text-align: center;
}

.moh-button:hover {
    background: color-mix(in srgb, var(--moh-primary) 90%, black);
    text-decoration: none;
    color: var(--moh-white);
    transform: translateY(-2px);
}

.moh-button-secondary {
    background: var(--moh-secondary);
}

.moh-button-secondary:hover {
    background: color-mix(in srgb, var(--moh-secondary) 90%, black);
}

.moh-button-small {
    padding: 8px 16px;
    font-size: 12px;
}

.moh-button-outline {
    background: transparent;
    color: var(--moh-primary);
    border: 2px solid var(--moh-primary);
}

.moh-button-outline:hover {
    background: var(--moh-primary);
    color: var(--moh-white);
}

/* === TABLEAU DE BORD === */
.moh-dashboard-block {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.moh-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, var(--moh-primary), var(--moh-secondary));
    border-radius: var(--moh-border-radius);
    color: var(--moh-white);
    box-shadow: var(--moh-box-shadow);
}

.moh-dashboard-welcome {
    display: flex;
    align-items: center;
    gap: 16px;
}

.moh-dashboard-avatar {
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--moh-white);
}

.moh-dashboard-avatar img {
    width: 64px;
    height: 64px;
    object-fit: cover;
}

.moh-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--moh-gray-light);
    color: var(--moh-gray);
    font-size: 32px;
    border-radius: 50%;
}

.moh-dashboard-title {
    margin: 0 0 4px 0;
    font-size: 28px;
    font-weight: 700;
}

.moh-dashboard-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.moh-dashboard-actions {
    display: flex;
    gap: 12px;
}

/* === STATISTIQUES === */
.moh-dashboard-stats {
    margin-bottom: 32px;
}

.moh-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.moh-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--moh-white);
    border-radius: var(--moh-border-radius);
    box-shadow: var(--moh-box-shadow);
    transition: var(--moh-transition);
}

.moh-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.moh-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--moh-primary), var(--moh-secondary));
    color: var(--moh-white);
    border-radius: 50%;
    font-size: 20px;
}

.moh-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--moh-text);
    line-height: 1.2;
}

.moh-stat-label {
    font-size: 14px;
    color: var(--moh-gray);
    margin-top: 4px;
}

/* === SECTIONS === */
.moh-dashboard-section {
    margin-bottom: 32px;
    background: var(--moh-white);
    border-radius: var(--moh-border-radius);
    box-shadow: var(--moh-box-shadow);
    overflow: hidden;
}

.moh-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E9ECEF;
    background: var(--moh-gray-light);
}

.moh-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--moh-text);
}

.moh-section-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--moh-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--moh-transition);
}

.moh-section-link:hover {
    color: var(--moh-secondary);
    text-decoration: none;
}

/* === LISTE DES MÉDAILLONS === */
.moh-medallions-list {
    padding: 24px;
}

.moh-medallion-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid #E9ECEF;
    border-radius: var(--moh-border-radius);
    margin-bottom: 16px;
    transition: var(--moh-transition);
}

.moh-medallion-item:last-child {
    margin-bottom: 0;
}

.moh-medallion-item:hover {
    border-color: var(--moh-primary);
    box-shadow: var(--moh-box-shadow);
}

.moh-medallion-thumbnail {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.moh-medallion-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--moh-border-radius);
}

.moh-medallion-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--moh-gray-light);
    color: var(--moh-gray);
    border-radius: var(--moh-border-radius);
    font-size: 32px;
}

.moh-medallion-status {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.moh-status-publish {
    background: var(--moh-success);
    color: var(--moh-white);
}

.moh-status-draft {
    background: var(--moh-warning);
    color: var(--moh-text);
}

.moh-status-private {
    background: var(--moh-info);
    color: var(--moh-white);
}

.moh-medallion-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.moh-medallion-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.moh-medallion-title a {
    color: var(--moh-text);
    text-decoration: none;
    transition: var(--moh-transition);
}

.moh-medallion-title a:hover {
    color: var(--moh-primary);
    text-decoration: none;
}

.moh-medallion-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--moh-gray);
}

.moh-medallion-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.moh-medallion-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

/* === TÉMOIGNAGES === */
.moh-testimonies-list {
    padding: 24px;
}

.moh-testimony-item {
    padding: 16px;
    border-left: 4px solid var(--moh-primary);
    background: var(--moh-gray-light);
    border-radius: 0 var(--moh-border-radius) var(--moh-border-radius) 0;
    margin-bottom: 16px;
}

.moh-testimony-item:last-child {
    margin-bottom: 0;
}

.moh-testimony-text {
    font-style: italic;
    margin-bottom: 12px;
    color: var(--moh-text);
    line-height: 1.6;
}

.moh-testimony-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--moh-gray);
}

.moh-testimony-meta a {
    color: var(--moh-primary);
    text-decoration: none;
}

.moh-testimony-meta a:hover {
    text-decoration: underline;
}

/* === ÉTAT VIDE === */
.moh-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--moh-gray);
}

.moh-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.moh-empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: var(--moh-text);
}

.moh-empty-state p {
    margin: 0 0 24px 0;
    line-height: 1.6;
}

/* === ACTIONS RAPIDES === */
.moh-dashboard-quick-actions {
    margin-top: 32px;
    padding: 24px;
    background: var(--moh-white);
    border-radius: var(--moh-border-radius);
    box-shadow: var(--moh-box-shadow);
}

.moh-dashboard-quick-actions h3 {
    margin: 0 0 16px 0;
    color: var(--moh-text);
}

.moh-quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.moh-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--moh-gray-light);
    border: 2px solid transparent;
    border-radius: var(--moh-border-radius);
    color: var(--moh-text);
    text-decoration: none;
    transition: var(--moh-transition);
}

.moh-quick-action:hover {
    border-color: var(--moh-primary);
    background: var(--moh-white);
    text-decoration: none;
    color: var(--moh-primary);
    transform: translateY(-2px);
}

.moh-quick-action .dashicons {
    font-size: 24px;
}

/* === CONNEXION REQUISE === */
.moh-login-required {
    text-align: center;
    padding: 48px 24px;
    background: var(--moh-white);
    border-radius: var(--moh-border-radius);
    box-shadow: var(--moh-box-shadow);
}

.moh-login-prompt {
    max-width: 400px;
    margin: 0 auto;
}

.moh-login-icon {
    font-size: 48px;
    color: var(--moh-gray);
    margin-bottom: 16px;
}

.moh-login-prompt h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: var(--moh-text);
}

.moh-login-prompt p {
    margin: 0 0 24px 0;
    color: var(--moh-gray);
    line-height: 1.6;
}

.moh-login-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .moh-dashboard-block {
        padding: 16px;
    }
    
    .moh-dashboard-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .moh-dashboard-actions {
        justify-content: center;
    }
    
    .moh-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .moh-medallion-item {
        flex-direction: column;
        text-align: center;
    }
    
    .moh-medallion-thumbnail {
        align-self: center;
    }
    
    .moh-quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .moh-login-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .moh-section-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .moh-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .moh-quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .moh-dashboard-welcome {
        flex-direction: column;
        text-align: center;
    }
}
