/* ===== CSS Variables & Theming ===== */
:root[data-theme="light"] {
    --bg-color: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #e2e8f0;
    --secondary-hover: #cbd5e1;
    --secondary-text: #334155;
    --accent: #8b5cf6;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.07);

    /* Indicator Colors */
    --ai-high: rgba(239, 68, 68, 0.25);
    --ai-high-solid: #ef4444;
    --ai-med: rgba(245, 158, 11, 0.25);
    --ai-med-solid: #f59e0b;
    --ai-low: transparent;
    --ai-low-solid: #10b981;

    --input-bg: rgba(255, 255, 255, 0.8);
    --input-border: #cbd5e1;
    --orb-opacity: 0.6;
}

:root[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --secondary: #1e293b;
    --secondary-hover: #334155;
    --secondary-text: #cbd5e1;
    --accent: #a78bfa;

    /* Glassmorphism */
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Indicator Colors */
    --ai-high: rgba(248, 113, 113, 0.3);
    --ai-high-solid: #f87171;
    --ai-med: rgba(251, 191, 36, 0.3);
    --ai-med-solid: #fbbf24;
    --ai-low: transparent;
    --ai-low-solid: #34d399;

    --input-bg: rgba(15, 23, 42, 0.8);
    --input-border: #334155;
    --orb-opacity: 0.3;
}

/* ===== Global Reset & Basics ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.hidden {
    display: none !important;
}

/* ===== Background Effects ===== */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: var(--orb-opacity);
    animation: float 20s infinite alternate;
}

.orb-1 {
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--primary), transparent 70%);
    top: -10%;
    left: -10%;
}

.orb-2 {
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.orb-3 {
    width: 25vw;
    height: 25vw;
    background: radial-gradient(circle, #38bdf8, transparent 70%);
    top: 40%;
    left: 40%;
    animation-duration: 25s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(5%, 5%) scale(1.1);
    }

    100% {
        transform: translate(-5%, 10%) scale(0.9);
    }
}

/* ===== Glass Components ===== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
}

.glass-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ===== Header ===== */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 36px;
    width: 36px;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--primary);
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
}

.icon-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
    background: var(--secondary);
}

/* ===== Hero Section ===== */
.hero-section {
    text-align: center;
    padding: 60px 0 40px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* ===== App Workspace ===== */
.app-workspace {
    padding: 30px;
    margin-bottom: 50px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-main);
    background: var(--secondary);
}

.tab-btn.active {
    color: var(--primary);
    background: var(--secondary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Inputs ===== */
.input-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

textarea {
    width: 100%;
    min-height: 250px;
    padding: 20px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 1.05rem;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

textarea:focus {
    outline: none;
}

textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.word-count {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    background: var(--glass-bg);
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* ===== File Drop ===== */
.file-drop-area {
    min-height: 250px;
    border: 2px dashed var(--input-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--input-bg);
    transition: all 0.3s;
    text-align: center;
    position: relative;
    padding: 20px;
}

.file-drop-area.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.01);
}

.drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.drop-icon {
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.8;
}

.drop-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--secondary);
    padding: 16px 24px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 400px;
}

.file-type-icon {
    font-size: 2rem;
    color: var(--accent);
}

.file-info {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Buttons & Options ===== */
.btn {
    font-family: inherit;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    filter: brightness(1.1);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--text-muted);
    box-shadow: none;
}

.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-text);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.actions-area {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.analysis-options {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 800px;
    justify-content: center;
}

@media (max-width: 600px) {
    .analysis-options {
        flex-direction: column;
    }
}

.radio-label {
    cursor: pointer;
    flex: 1;
}

.radio-label input {
    display: none;
}

.radio-card {
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
    height: 100%;
}

.radio-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.radio-text {
    display: flex;
    flex-direction: column;
}

.radio-text strong {
    font-size: 1.05rem;
    color: var(--text-main);
}

.radio-text span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.radio-label input:checked+.radio-card {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.radio-label input:checked+.radio-card .radio-icon {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

/* ===== Loading State ===== */
.loading-state {
    text-align: center;
    padding: 40px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--secondary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#loading-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

#loading-desc {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.progress-bar-container {
    height: 8px;
    background: var(--secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 24px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--primary), var(--accent));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    background: var(--input-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--input-border);
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.step.active {
    color: var(--text-main);
    font-weight: 500;
}

.step .fa-check {
    color: var(--ai-low-solid);
}

.step .fa-circle {
    font-size: 0.8em;
}

/* ===== Report Dashboard ===== */
.report-dashboard {
    animation: fadeIn 0.5s ease;
    padding-bottom: 60px;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-span-2 {
    grid-column: span 3;
}

@media (min-width: 900px) {
    .grid-span-2 {
        grid-column: span 2;
    }
}

.grid-span-full {
    grid-column: 1 / -1;
}

/* Score Card */
.score-card {
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-overall {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

@media (max-width: 600px) {
    .score-overall {
        flex-direction: column;
        text-align: center;
    }
}

.circular-progress {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: conic-gradient(var(--ai-high-solid) 0%, var(--secondary) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

:root[data-theme="dark"] .circular-progress {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.circular-progress::before {
    content: "";
    position: absolute;
    width: 116px;
    height: 116px;
    background: var(--glass-bg);
    border-radius: 50%;
}

.score-value {
    position: relative;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
}

.score-details h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--ai-high-solid);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--ai-med-solid);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--ai-low-solid);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.score-verdict {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Chart & Metrics Cards */
.chart-card,
.metrics-card,
.text-analysis-card {
    padding: 24px;
}

.chart-card h3,
.metrics-card h3,
.card-header h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.metric-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
}

.metric-definition {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 4px;
}

.metric-bar-bg {
    height: 6px;
    background: var(--secondary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.metric-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

.metric-feedback-area {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-top: 4px;
}

.metric-feedback {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    flex: 1;
}

.source-link {
    font-size: 0.75rem;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    text-decoration: none;
}

.source-link:hover {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-hover);
}

/* Highlighted Text Card */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.card-header h3 {
    border: none;
    margin: 0;
    padding: 0;
}

.legend {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.color-box {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.color-box.ai-high {
    background-color: var(--ai-high);
    border: 1px solid var(--ai-high-solid);
}

.color-box.ai-med {
    background-color: var(--ai-med);
    border: 1px solid var(--ai-med-solid);
}

.color-box.ai-low {
    background-color: var(--ai-low);
    border: 1px solid var(--ai-low-solid);
}

.highlighted-text {
    line-height: 1.8;
    font-size: 1.05rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Custom Scrollbar for Text Area */
.highlighted-text::-webkit-scrollbar {
    width: 6px;
}

.highlighted-text::-webkit-scrollbar-track {
    background: transparent;
}

.highlighted-text::-webkit-scrollbar-thumb {
    background: var(--secondary-hover);
    border-radius: 10px;
}

.sentence {
    display: block;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    border-left: 4px solid var(--glass-border);
    background-color: rgba(0, 0, 0, 0.02);
    transition: all 0.2s;
    cursor: default;
}

:root[data-theme="dark"] .sentence {
    background-color: rgba(255, 255, 255, 0.02);
}

.sentence:hover {
    filter: brightness(0.95);
}

.sentence.sus-high {
    background-color: rgba(239, 68, 68, 0.08);
    border-left-color: var(--ai-high-solid);
}

.sentence.sus-med {
    background-color: rgba(245, 158, 11, 0.08);
    border-left-color: var(--ai-med-solid);
}

.sentence.sus-low {
    border-left-color: var(--ai-low-solid);
}

/* ===== Footer ===== */
.glass-footer {
    margin-top: auto;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    background: var(--glass-bg);
}

/* ===== Utilities ===== */
.pdf-container {
    background: var(--bg-color);
    border-radius: 8px;
}

/* ===== PDF Export Mode (Bypass html2canvas glassmorphism bugs while keeping theme) ===== */
/* Light Mode PDF */
:root[data-theme="light"] body.pdf-export-mode {
    background: #ffffff !important;
    color: #0f172a !important;
}

:root[data-theme="light"] body.pdf-export-mode .glass-panel,
:root[data-theme="light"] body.pdf-export-mode .score-card,
:root[data-theme="light"] body.pdf-export-mode .chart-card,
:root[data-theme="light"] body.pdf-export-mode .metrics-card,
:root[data-theme="light"] body.pdf-export-mode .text-analysis-card,
:root[data-theme="light"] body.pdf-export-mode .card-header {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    color: #0f172a !important;
}

:root[data-theme="light"] body.pdf-export-mode .circular-progress::before {
    background-color: #ffffff !important;
}

/* Dark Mode PDF */
:root[data-theme="dark"] body.pdf-export-mode {
    background: #0f172a !important;
    color: #f8fafc !important;
}

:root[data-theme="dark"] body.pdf-export-mode .glass-panel,
:root[data-theme="dark"] body.pdf-export-mode .score-card,
:root[data-theme="dark"] body.pdf-export-mode .chart-card,
:root[data-theme="dark"] body.pdf-export-mode .metrics-card,
:root[data-theme="dark"] body.pdf-export-mode .text-analysis-card,
:root[data-theme="dark"] body.pdf-export-mode .card-header {
    background: #1e293b !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid #334155 !important;
    box-shadow: none !important;
    color: #f8fafc !important;
}

:root[data-theme="dark"] body.pdf-export-mode .circular-progress::before {
    background-color: #1e293b !important;
}

/* Universal PDF text resets */
body.pdf-export-mode h2,
body.pdf-export-mode h3,
body.pdf-export-mode p,
body.pdf-export-mode span,
body.pdf-export-mode div {
    text-shadow: none !important;
}

body.pdf-export-mode .metric-tooltip-icon,
body.pdf-export-mode .radio-icon {
    display: none !important;
}

body.pdf-export-mode .highlighted-text {
    max-height: none !important;
    overflow: visible !important;
}

/* Compacting Whitespace for PDF Formats */
body.pdf-export-mode .dashboard-grid {
    gap: 15px !important;
}

body.pdf-export-mode .glass-panel,
body.pdf-export-mode .score-card,
body.pdf-export-mode .chart-card,
body.pdf-export-mode .metrics-card,
body.pdf-export-mode .text-analysis-card,
body.pdf-export-mode .card-header {
    padding: 12px !important;
}

body.pdf-export-mode .score-overall {
    gap: 10px !important;
}

body.pdf-export-mode .circular-progress {
    width: 100px !important;
    height: 100px !important;
    box-shadow: none !important;
    border: 1px solid var(--glass-border) !important;
}

body.pdf-export-mode .circular-progress::before {
    width: 80px !important;
    height: 80px !important;
    box-shadow: none !important;
}

body.pdf-export-mode .score-value {
    font-size: 1.8rem !important;
    filter: none !important;
}

body.pdf-export-mode .chart-container {
    height: 200px !important;
    /* Mieux pour l'impression */
}

body.pdf-export-mode .metric-item {
    gap: 2px !important;
}

body.pdf-export-mode .metric-feedback-area {
    margin-top: 0 !important;
}

body.pdf-export-mode .metric-definition {
    font-size: 0.75rem !important;
}

body.pdf-export-mode .sentence {
    page-break-inside: avoid;
    /* Important pour ne pas couper une phrase à la ligne d'impression */
    padding: 6px 10px !important;
    /* Compresse un peu le padding des phrases */
}

body.pdf-export-mode .pdf-only-header {
    display: flex !important;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #6366f1;
}

body.pdf-export-mode .pdf-only-header h2 {
    margin: 0;
    flex: 1;
}

/* Print Specific Adjustments */
@media print {
    .pdf-only-header {
        display: flex !important;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--primary);
    }

    .pdf-only-header h2 {
        margin: 0;
        flex: 1;
    }

    .glass-panel {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        background: #fff !important;
        break-inside: avoid;
    }

    body {
        background: white;
        color: black;
    }

    .highlighted-text {
        max-height: none !important;
        overflow: visible !important;
    }
}