/* Styles frontend pour WordPress Energy Tests */

/* Variables CSS */
:root {
    --primary-color: #0073aa;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 6px;
    --box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Conteneurs principaux */
.pwt-tests-container,
.pwt-results-container,
.pwt-synthesis-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Boutons */
.pwt-btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 5px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    font-size: 14px;
    line-height: 1.5;
}

.pwt-btn-primary {
    background: var(--primary-color);
    color: white;
}

.pwt-btn-primary:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,115,170,0.3);
}

.pwt-btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.pwt-btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.pwt-btn-success {
    background: var(--success-color);
    color: white;
}

.pwt-btn-success:hover {
    background: #218838;
}

.pwt-btn-danger {
    background: var(--danger-color);
    color: white;
}

.pwt-btn-danger:hover {
    background: #c82333;
}

.pwt-btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.pwt-btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Cartes */
.pwt-test-card,
.pwt-result-card,
.pwt-recommendation-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.pwt-test-card:hover,
.pwt-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Grilles */
.pwt-tests-grid,
.pwt-elements-grid,
.pwt-levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pwt-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

/* Statistiques */
.pwt-stat-item {
    text-align: center;
    padding: 20px;
    background: var(--light-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.pwt-stat-number {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.pwt-stat-label {
    color: var(--secondary-color);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Barres de progression */
.pwt-energy-bar,
.pwt-element-bar,
.pwt-level-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.pwt-energy-fill,
.pwt-element-fill,
.pwt-level-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #005a87);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Scores circulaires */
.pwt-score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.2em;
    position: relative;
    background: conic-gradient(var(--primary-color) 0deg, var(--primary-color) calc(var(--score) * 3.6deg), #e9ecef calc(var(--score) * 3.6deg));
}

.pwt-score-circle::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
}

.pwt-score-text {
    position: relative;
    z-index: 1;
}

/* Modal */
.pwt-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.pwt-modal-content {
    background-color: white;
    margin: 20px auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.pwt-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    background: var(--light-color);
    border-radius: 12px 12px 0 0;
}

.pwt-modal-header h2 {
    margin: 0;
    color: var(--dark-color);
}

.pwt-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--secondary-color);
    transition: var(--transition);
}

.pwt-modal-close:hover {
    color: var(--danger-color);
}

.pwt-modal-body {
    padding: 20px;
}

.pwt-modal-footer {
    padding: 20px;
    border-top: 1px solid #dee2e6;
    text-align: right;
    background: var(--light-color);
    border-radius: 0 0 12px 12px;
}

/* Messages */
.pwt-no-tests,
.pwt-no-results,
.pwt-no-synthesis {
    text-align: center;
    padding: 60px 20px;
    background: var(--light-color);
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    color: var(--secondary-color);
}

.pwt-no-tests p,
.pwt-no-results p,
.pwt-no-synthesis p {
    font-size: 1.1em;
    margin: 10px 0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .pwt-tests-grid,
    .pwt-elements-grid,
    .pwt-levels-grid {
        grid-template-columns: 1fr;
    }
    
    .pwt-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pwt-modal-content {
        width: 95%;
        margin: 10px auto;
    }
    
    .pwt-btn {
        width: 100%;
        margin: 5px 0;
    }
    
    .pwt-test-card,
    .pwt-result-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .pwt-tests-container,
    .pwt-results-container,
    .pwt-synthesis-container {
        padding: 10px;
    }
    
    .pwt-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .pwt-modal-header {
        padding: 15px;
    }
    
    .pwt-modal-body {
        padding: 15px;
    }
    
    .pwt-modal-footer {
        padding: 15px;
    }
}

/* États spécifiques */
.pwt-status-completed {
    border-left: 4px solid var(--success-color);
}

.pwt-status-new {
    border-left: 4px solid var(--info-color);
}

.pwt-priority-high {
    border-left-color: var(--danger-color) !important;
}

.pwt-priority-medium {
    border-left-color: var(--warning-color) !important;
}

.pwt-priority-low {
    border-left-color: var(--success-color) !important;
}

/* Éléments spécifiques aux tests */
.pwt-test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pwt-test-header h3 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.3em;
}

.pwt-test-badge {
    background: var(--info-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
}

.pwt-test-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* Éléments spécifiques aux résultats */
.pwt-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pwt-result-info h3 {
    margin: 0 0 5px 0;
    color: var(--dark-color);
}

.pwt-result-date {
    color: var(--secondary-color);
    font-size: 0.9em;
    margin: 0;
}

.pwt-result-score {
    text-align: center;
}

.pwt-result-details {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: start;
}

.pwt-result-energy h4 {
    margin: 0 0 15px 0;
    color: var(--dark-color);
}

.pwt-mini-energy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.pwt-mini-energy-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pwt-mini-energy-name {
    font-size: 0.8em;
    font-weight: bold;
    color: var(--dark-color);
}

.pwt-mini-energy-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.pwt-mini-energy-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #005a87);
    border-radius: 2px;
}

.pwt-mini-energy-value {
    font-size: 0.8em;
    color: var(--secondary-color);
    text-align: right;
}

.pwt-result-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Actions globales */
.pwt-global-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

/* Informations */
.pwt-synthesis-info {
    text-align: center;
    color: var(--secondary-color);
    margin-top: 20px;
    font-size: 0.9em;
}

/* Recommandations */
.pwt-recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pwt-recommendation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pwt-recommendation-header h3 {
    margin: 0;
    color: var(--dark-color);
}

.pwt-recommendation-type {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
}

.pwt-recommendation-description {
    color: var(--secondary-color);
    line-height: 1.6;
    margin-bottom: 15px;
}

.pwt-recommendation-actions h4 {
    margin: 0 0 10px 0;
    color: var(--dark-color);
    font-size: 1em;
}

.pwt-recommendation-actions ul {
    margin: 0;
    padding-left: 20px;
}

.pwt-recommendation-actions li {
    margin-bottom: 5px;
    color: var(--dark-color);
}

/* Section de synthèse */
.pwt-overview-section,
.pwt-profile-section,
.pwt-recommendations-section {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--box-shadow);
}

.pwt-assessment-card {
    background: linear-gradient(135deg, var(--light-color) 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #dee2e6;
}

.pwt-assessment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.pwt-assessment-info h3 {
    margin: 0 0 10px 0;
    color: var(--dark-color);
    font-size: 1.8em;
    text-transform: capitalize;
}

.pwt-assessment-info p {
    color: var(--secondary-color);
    font-size: 1.1em;
    margin: 0;
}

.pwt-score-large {
    width: 120px !important;
    height: 120px !important;
    font-size: 1.5em !important;
}

.pwt-balance-card,
.pwt-elements-card,
.pwt-levels-card {
    background: var(--light-color);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.pwt-balance-card h3,
.pwt-elements-card h3,
.pwt-levels-card h3 {
    margin: 0 0 20px 0;
    color: var(--dark-color);
}

.pwt-balance-bar {
    height: 40px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pwt-yin-section {
    background: linear-gradient(90deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.pwt-yang-section {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.pwt-balance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pwt-balance-label {
    font-weight: bold;
    color: var(--dark-color);
}

.pwt-balance-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    background: #d4edda;
    color: #155724;
}

.pwt-element-item,
.pwt-level-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pwt-element-icon {
    font-size: 2em;
    min-width: 50px;
    text-align: center;
}

.pwt-element-info,
.pwt-level-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pwt-element-name,
.pwt-level-name {
    font-weight: bold;
    color: var(--dark-color);
}

.pwt-element-value,
.pwt-level-value {
    font-weight: bold;
    color: var(--dark-color);
    text-align: right;
}
