/* GEO Vertex - Theme Fnac/Darty */

:root {
    --fnac-primary: #E75638;
    --fnac-dark-teal: #003c44;
    --fnac-dark-gray: #4b4952;
    --fnac-teal: #006e67;
    --fnac-navy: #0F3355;
    --fnac-blue: #005a81;
    --fnac-light-blue: #5b87b5;
    --fnac-lavender: #b29ccf;
    --fnac-rose: #d4b1ac;
    --fnac-ice-blue: #c8d5e9;
    --fnac-cream: #f2e2a8;

    --bg: #f9fafb;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* === HEADER === */
.header {
    background: linear-gradient(135deg, #E75638 0%, #c43e22 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.header-logo {
    height: 36px;
    width: auto;
}
.header h1 {
    font-size: 1.25rem;
    font-weight: 700;
}
.header-subtitle {
    font-size: .8rem;
    font-weight: 400;
    opacity: .85;
    margin-left: .25rem;
}
.header nav a {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: .9rem;
    transition: color .2s;
}
.header nav a:hover { color: white; }
.header nav a.active { color: white; border-bottom: 2px solid var(--fnac-primary); padding-bottom: 2px; }

/* === LAYOUT === */
.container { max-width: 1280px; margin: 0 auto; padding: 2rem; }
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card h2 { color: var(--fnac-dark-teal); margin-bottom: 1rem; font-size: 1.2rem; }
.card h3 { color: var(--fnac-blue); margin-bottom: .75rem; font-size: 1rem; }

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: .6rem 1.2rem;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all .2s;
}
.btn-primary { background: var(--fnac-primary); color: white; }
.btn-primary:hover { background: #d04a2e; }
.btn-teal { background: var(--fnac-teal); color: white; }
.btn-teal:hover { background: #005b56; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-outline:hover { background: #f3f4f6; }
.btn-sm { padding: .4rem .8rem; font-size: .8rem; }

/* === FORMS === */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: .4rem;
    color: var(--fnac-dark-teal);
    font-size: .9rem;
}
textarea, input[type="file"] {
    width: 100%;
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: .9rem;
}
textarea { min-height: 120px; resize: vertical; }
.separator {
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-weight: 600;
}

/* === KPI GRID === */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}
.kpi-value { font-size: 2rem; font-weight: 800; }
.kpi-label { font-size: .8rem; color: var(--text-secondary); margin-top: .25rem; }
.kpi-card.p0 { border-left: 4px solid #991B1B; }
.kpi-card.p0 .kpi-value { color: #991B1B; }
.kpi-card.p1 { border-left: 4px solid #9A3412; }
.kpi-card.p1 .kpi-value { color: #9A3412; }
.kpi-card.ok { border-left: 4px solid #065F46; }
.kpi-card.ok .kpi-value { color: #065F46; }

/* === BADGES === */
.badge {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 12px;
    font-size: .75rem;
    font-weight: 600;
}
.badge-google { background: #DBEAFE; color: #1E40AF; }
.badge-llm { background: #EDE9FE; color: #5B21B6; }
.badge-p0 { background: #FEE2E2; color: #991B1B; }
.badge-p1 { background: #FFEDD5; color: #9A3412; }
.badge-p2 { background: #DBEAFE; color: #1E40AF; }
.badge-p3 { background: #F3F4F6; color: #6B7280; }
.badge-ok { background: #D1FAE5; color: #065F46; }
.badge-reject { background: #FEE2E2; color: #991B1B; }
.badge-flag { background: #FEF3C7; color: #92400E; }

/* === TABLES === */
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f9fafb; font-weight: 600; color: var(--fnac-dark-teal); position: sticky; top: 0; }
tr:hover { background: #f9fafb; }

/* === PROGRESS === */
.progress-bar-container {
    background: #e5e7eb;
    border-radius: 12px;
    height: 24px;
    overflow: hidden;
    margin: 1rem 0;
}
.progress-bar-fill {
    background: linear-gradient(90deg, var(--fnac-teal), var(--fnac-primary));
    height: 100%;
    border-radius: 12px;
    transition: width .3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: .8rem;
    font-weight: 600;
}

/* === JSON-LD CODE BLOCK === */
.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: .8rem;
    line-height: 1.5;
    position: relative;
}
.code-block .copy-btn {
    position: absolute;
    top: .5rem;
    right: .5rem;
    background: rgba(255,255,255,.1);
    color: #94a3b8;
    border: none;
    padding: .3rem .6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: .75rem;
}
.code-block .copy-btn:hover { background: rgba(255,255,255,.2); color: white; }

/* === MATRIX === */
.matrix-wrapper { overflow-x: auto; }
.matrix-table th { font-size: .75rem; writing-mode: vertical-lr; text-align: start; min-width: 40px; }
.matrix-table td { text-align: center; min-width: 40px; padding: .4rem; }
.matrix-cell {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 700;
    cursor: default;
}
.matrix-cell.present { background: #C6EFCE; color: #006100; }
.matrix-cell.incomplete { background: #FFEB9C; color: #9C6500; }
.matrix-cell.missing { background: #FFC7CE; color: #9C0006; }
.matrix-cell.none { background: #f3f4f6; color: #9ca3af; }

/* === DATA-TOOLTIP (CSS hover) === */
[data-tooltip] {
    position: relative;
}
[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #f1f5f9;
    padding: .4rem .6rem;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 400;
    white-space: nowrap;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* === LEGEND === */
.legend {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    color: var(--text-secondary);
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}
.dot.status-present { background: #C6EFCE; }
.dot.status-incomplete { background: #FFEB9C; }
.dot.status-missing { background: #FFC7CE; }
.dot.status-none { background: #f3f4f6; border: 1px solid var(--border); }
.dot.prop-present { background: #C6EFCE; }
.dot.prop-mandatory-missing { background: #FFC7CE; }
.dot.prop-optional-missing { background: #FFEB9C; }

/* === PROPERTY MATRIX === */
.prop-matrix-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.prop-cell {
    padding: .25rem .5rem;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 500;
    position: relative;
}
.prop-cell.prop-present { background: #C6EFCE; color: #006100; }
.prop-cell.prop-mandatory-missing { background: #FFC7CE; color: #9C0006; }
.prop-cell.prop-optional-missing { background: #FFEB9C; color: #9C6500; }

/* === URL LINKS === */
.url-link {
    color: var(--fnac-teal);
    text-decoration: none;
}
.url-link:hover {
    text-decoration: underline;
    color: var(--fnac-primary);
}

/* === SCORE BARS === */
.score-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .25rem 0;
}
.score-bar-track {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}
.score-bar-fill-google {
    height: 100%;
    background: var(--fnac-blue);
    border-radius: 4px;
    transition: width .3s;
}
.score-bar-fill-llm {
    height: 100%;
    background: var(--fnac-lavender);
    border-radius: 4px;
    transition: width .3s;
}
.score-value { font-size: .8rem; font-weight: 700; min-width: 35px; }

/* === ACCORDION === */
details { margin-bottom: .5rem; }
details summary {
    cursor: pointer;
    padding: .75rem 1rem;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-size: 1.2rem; color: var(--text-secondary); }
details[open] summary::after { content: "-"; }
details[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
details .detail-content {
    border: 1px solid var(--border);
    border-top: none;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    padding: 1rem;
}

/* === TABS === */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1rem; }
.tab-btn {
    padding: .6rem 1.2rem;
    cursor: pointer;
    border: none;
    background: none;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
}
.tab-btn.active { color: var(--fnac-primary); border-bottom-color: var(--fnac-primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* === JIRA TICKET === */
.jira-ticket {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
}
.jira-ticket-header {
    padding: .75rem 1rem;
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.jira-ticket-body { padding: 1rem; font-size: .85rem; }
.jira-ticket-body pre { white-space: pre-wrap; }
.jira-ticket-description h4 { color: var(--fnac-blue); margin: .75rem 0 .35rem; font-size: .9rem; }
.jira-ticket-description ul { margin-left: 1.25rem; margin-bottom: .5rem; }
.jira-ticket-description li { margin-bottom: .2rem; }
.jira-jsonld-section { margin-top: .75rem; }

/* === JIRA TOOLBAR === */
.jira-toolbar { padding: 1rem 1.5rem; }
.jira-toolbar-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.jira-toolbar-group {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.jira-select {
    padding: .35rem .6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .8rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
}

/* === JIRA SUMMARY === */
.jira-summary { padding: 1rem 1.5rem; }
.jira-summary-grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.jira-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}
.jira-summary-value { font-size: 1.5rem; font-weight: 800; color: var(--fnac-dark-teal); }
.jira-summary-label { font-size: .75rem; color: var(--text-secondary); }
.jira-summary-item.p0 .jira-summary-value { color: #991B1B; }
.jira-summary-item.p1 .jira-summary-value { color: #9A3412; }
.jira-summary-item.p2 .jira-summary-value { color: #1E40AF; }
.jira-summary-item.p3 .jira-summary-value { color: #6B7280; }

/* === JSON-LD SYNTAX HIGHLIGHTING === */
.json-key { color: #7dd3fc; }
.json-string { color: #86efac; }
.json-number { color: #fbbf24; }
.json-placeholder { color: #f472b6; font-weight: 700; }
.json-comment { color: #94a3b8; font-style: italic; }

/* === REFERENCE === */
.reference-search {
    margin-top: .5rem;
}
.reference-search input {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .95rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}
.reference-search input:focus {
    border-color: var(--fnac-primary);
}
.reference-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.reference-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-bottom: none;
    text-decoration: none;
    color: var(--text);
    transition: background .15s;
    background: var(--card-bg);
}
.reference-list-item:first-child { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.reference-list-item:last-child { border-bottom: 1px solid var(--border); border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.reference-list-item:hover { background: #f9fafb; }
.reference-list-main { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 0; }
.reference-type-name { color: var(--fnac-dark-teal); font-size: .95rem; }
.reference-type-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reference-list-badges { display: flex; gap: .5rem; flex-shrink: 0; margin-left: 1rem; }
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 0;
}

/* === FILTER BAR === */
.filter-bar {
    display: flex;
    gap: .75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.filter-btn {
    padding: .4rem .8rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    font-size: .8rem;
    transition: all .2s;
}
.filter-btn.active {
    background: var(--fnac-dark-teal);
    color: white;
    border-color: var(--fnac-dark-teal);
}

/* === ALERT === */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: .9rem;
}
.alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-info { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }

/* === REPORTS LIST === */
.reports-list { margin-top: 1.5rem; }
.reports-list a {
    display: block;
    padding: .6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: .5rem;
    text-decoration: none;
    color: var(--text);
    transition: background .2s;
}
.reports-list a:hover { background: #f9fafb; }

/* === REPORT HEADER === */
.report-header-card {
    border-left: 4px solid var(--fnac-primary);
}
.report-header-top {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}
.report-logo {
    height: 48px;
    width: auto;
}

/* === FOOTER === */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: .8rem;
}
.footer-logo {
    height: 28px;
    width: auto;
    opacity: .5;
    margin-bottom: .5rem;
}

/* === PRINT === */
@media print {
    .header, .footer, .btn, nav, form { display: none; }
    .container { max-width: 100%; padding: 0; }
    .card { border: 1px solid #ddd; page-break-inside: avoid; }
    .report-header-card { display: flex; align-items: center; }
    .report-logo { height: 40px; }
    .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

/* === UTILITIES === */
.text-sm { font-size: .85rem; }
.text-xs { font-size: .75rem; }
.text-muted { color: var(--text-secondary); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
