/**
 * 🔧 CSS pour l'Analyse Technique Approfondie
 * Phase 2 du SaaS GSC Avancé
 */

/* ========== STATISTIQUES ========== */

.tech-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tech-stat {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.tech-stat:hover {
    transform: translateY(-2px);
    border-color: rgba(66, 133, 244, 0.4);
}

.tech-stat.warning {
    border-color: rgba(251, 188, 5, 0.4);
    background: rgba(251, 188, 5, 0.1);
}

.tech-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
}

.tech-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.25rem;
}

.tech-stat-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.tech-stat-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ========== RECOMMANDATIONS ========== */

.tech-recommendations {
    margin-bottom: 1.5rem;
}

.tech-recommendations h4 {
    color: #fff;
    margin-bottom: 0.75rem;
}

.tech-rec-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid;
}

.tech-rec-card.critical {
    border-left-color: #EA4335;
    background: rgba(234, 67, 53, 0.1);
}

.tech-rec-card.warning {
    border-left-color: #FBBC05;
    background: rgba(251, 188, 5, 0.1);
}

.tech-rec-card.info {
    border-left-color: #4285F4;
    background: rgba(66, 133, 244, 0.1);
}

.tech-rec-card strong {
    color: #fff;
    display: block;
    margin-bottom: 0.25rem;
}

.tech-rec-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0 0 0.5rem 0;
}

.rec-action {
    color: #4285F4;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ========== GRAPHIQUE DE MAILLAGE ========== */

.link-graph-section {
    margin-bottom: 1.5rem;
}

.link-graph-section h4 {
    color: #fff;
    margin-bottom: 1rem;
}

.link-graph-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1rem;
    height: 300px;
}

.graph-legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ========== TABLEAUX ========== */

.tech-tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.tech-table-section h4 {
    color: #fff;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.tech-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.tech-table th,
.tech-table td {
    padding: 0.6rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-table th {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: 0.8rem;
}

.tech-table td {
    color: rgba(255, 255, 255, 0.85);
}

.tech-table a {
    color: #4285F4;
    text-decoration: none;
}

.tech-table a:hover {
    text-decoration: underline;
}

.tech-table .highlight {
    color: #34A853;
    font-weight: 600;
}

.tech-table .warning-text {
    color: #EA4335;
}

.issue-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.empty-text {
    text-align: center;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ========== CRAWL BUDGET ========== */

.crawl-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
}

.crawl-summary.excellent {
    border: 1px solid rgba(52, 168, 83, 0.5);
    background: rgba(52, 168, 83, 0.1);
}

.crawl-summary.good {
    border: 1px solid rgba(66, 133, 244, 0.5);
    background: rgba(66, 133, 244, 0.1);
}

.crawl-summary.warning {
    border: 1px solid rgba(251, 188, 5, 0.5);
    background: rgba(251, 188, 5, 0.1);
}

.crawl-summary.critical {
    border: 1px solid rgba(234, 67, 53, 0.5);
    background: rgba(234, 67, 53, 0.1);
}

.crawl-summary p {
    color: #fff;
    margin: 0;
    flex: 1;
}

.savings {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.tech-section {
    margin-bottom: 1.5rem;
}

.tech-section h4 {
    color: #fff;
    margin-bottom: 0.75rem;
}

.category-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(66, 133, 244, 0.2);
    color: #4285F4;
    border-radius: 4px;
    font-size: 0.75rem;
}

.rec-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ========== ROBOTS.TXT ========== */

.robots-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
}

.robots-section .hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.robots-code {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.8rem;
    color: #34A853;
    overflow-x: auto;
    white-space: pre;
    margin-bottom: 1rem;
    max-height: 300px;
}

.copy-btn {
    background: linear-gradient(135deg, #4285F4 0%, #1A5DC9 100%);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
}

/* ========== CORE WEB VITALS ========== */

.cwv-score-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.cwv-grade {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
}

.cwv-score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.cwv-score-message {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.cwv-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cwv-metric-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cwv-metric-card.good {
    border-color: rgba(52, 168, 83, 0.4);
}

.cwv-metric-card.needs_improvement {
    border-color: rgba(251, 188, 5, 0.4);
}

.cwv-metric-name {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.cwv-metric-status {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cwv-metric-status.good {
    color: #34A853;
}

.cwv-metric-status.needs_improvement {
    color: #FBBC05;
}

.cwv-metric-issues {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.cwv-metric-threshold {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.5rem;
}

/* ========== QUICK WINS ========== */

.cwv-section {
    margin-bottom: 1.5rem;
}

.cwv-section h4 {
    color: #fff;
    margin-bottom: 1rem;
}

.quick-wins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.quick-win-card {
    background: linear-gradient(135deg, rgba(52, 168, 83, 0.15) 0%, rgba(52, 168, 83, 0.05) 100%);
    border: 1px solid rgba(52, 168, 83, 0.3);
    border-radius: 10px;
    padding: 1rem;
}

.win-impact {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.win-impact.high {
    background: rgba(52, 168, 83, 0.2);
    color: #34A853;
}

.quick-win-card h5 {
    color: #fff;
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.quick-win-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0 0 0.5rem 0;
}

.win-category {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(66, 133, 244, 0.2);
    color: #4285F4;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* ========== CHECKLIST DÉVELOPPEUR ========== */

.dev-checklist {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checklist-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
}

.checklist-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.task-priority {
    background: rgba(66, 133, 244, 0.2);
    color: #4285F4;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.task-impact,
.task-difficulty {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.task-impact.high {
    background: rgba(234, 67, 53, 0.2);
    color: #EA4335;
}

.task-impact.medium {
    background: rgba(251, 188, 5, 0.2);
    color: #FBBC05;
}

.task-difficulty.easy {
    background: rgba(52, 168, 83, 0.2);
    color: #34A853;
}

.task-difficulty.medium {
    background: rgba(251, 188, 5, 0.2);
    color: #FBBC05;
}

.task-difficulty.hard {
    background: rgba(234, 67, 53, 0.2);
    color: #EA4335;
}

.task-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.task-title {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.task-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.code-details {
    margin-bottom: 0.75rem;
}

.code-details summary {
    color: #4285F4;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.25rem 0;
}

.code-example {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.75rem;
    color: #34A853;
    overflow-x: auto;
    white-space: pre;
    margin-top: 0.5rem;
    max-height: 200px;
}

.task-affected {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
    .tech-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tech-tables-grid {
        grid-template-columns: 1fr;
    }
    
    .crawl-summary {
        flex-direction: column;
        text-align: center;
    }
    
    .cwv-score-card {
        flex-direction: column;
        text-align: center;
    }
    
    .cwv-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


