/* ── Theme variables ─────────────────────── */
:root {
    --bg:        #edf2fb;
    --surface:   #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f3f4f6;
    --surface-4: #f9fafb;
    --text:      #111827;
    --text-2:    #374151;
    --text-3:    #4b5563;
    --text-4:    #6b7280;
    --text-5:    #9ca3af;
    --border:    #d1d5db;
    --border-2:  #e5e7eb;
    --border-3:  #f1f5f9;
    --shadow-sm: rgba(15, 23, 42, 0.05);
    --shadow:    rgba(15, 23, 42, 0.08);
    --shadow-md: rgba(15, 23, 42, 0.12);
    --shadow-lg: rgba(15, 23, 42, 0.22);
    --overlay:   rgba(15, 23, 42, 0.55);
    --header-h:  81px;
}

[data-theme="dark"] {
    --bg:        #0f172a;
    --surface:   #1e293b;
    --surface-2: #162032;
    --surface-3: #334155;
    --surface-4: #293548;
    --text:      #f1f5f9;
    --text-2:    #e2e8f0;
    --text-3:    #94a3b8;
    --text-4:    #64748b;
    --text-5:    #475569;
    --border:    #334155;
    --border-2:  #293548;
    --border-3:  #1e293b;
    --shadow-sm: rgba(0, 0, 0, 0.2);
    --shadow:    rgba(0, 0, 0, 0.3);
    --shadow-md: rgba(0, 0, 0, 0.4);
    --shadow-lg: rgba(0, 0, 0, 0.5);
    --overlay:   rgba(0, 0, 0, 0.7);
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

.app-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
    padding-top: calc(var(--header-h) + 24px);
}

header {
    margin-bottom: 24px;
}

.logo-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-logo {
    height: 44px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
}

.subtitle {
    color: var(--text-3);
    margin-top: 4px;
    font-size: 0.85rem;
}

.card {
    background: var(--surface);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 16px 40px var(--shadow);
    margin-bottom: 20px;
}

.card-centered {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 14px 22px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    background: #4f46e5;
    color: white;
}

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

.btn-google {
    background: #4285f4;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-apple {
    background: #111827;
    color: white;
}

.auth-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.landing-status {
    display: grid;
    gap: 12px;
    text-align: center;
}

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

.form-grid.compact {
    grid-template-columns: 1fr 1fr;
}

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

@media (max-width: 600px) {
    .form-grid.compact {
        grid-template-columns: 1fr;
    }
}

label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-2);
}

input,
select,
textarea {
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 0.95rem;
    outline: none;
    background: var(--surface);
    color: var(--text);
}

textarea {
    resize: vertical;
}

::placeholder {
    color: var(--text-5);
    opacity: 1;
}

select option {
    background: var(--surface);
    color: var(--text);
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.full-width {
    width: 100%;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.gauge-container {
    width: 100%;
    max-width: 380px;
    margin: 0 auto 8px;
}

#gaugeSvg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

#gaugeNeedleGroup {
    transform-origin: 110px 120px;
    transition: transform 1s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.barometer-info {
    text-align: center;
    display: grid;
    gap: 6px;
}

/* Header commun à tous les écrans ───────── */
.card-screen-header {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-2);
}
.card-screen-header h2 {
    margin: 0 0 5px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}
.card-screen-header p,
.card-screen-header .view-subtitle {
    margin: 0;
    color: var(--text-3);
    font-size: 0.85rem;
    line-height: 1.5;
    display: block;
}

/* paywall header: same style as other screens */

/* Conserver pour compatibilité éventuelle */
.barometer-eyebrow { display: none; }

.barometer-score-display {
    display: flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1;
}

#barometerScore {
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.score-unit {
    font-size: 1.3rem;
    color: var(--text-5);
    font-weight: 600;
}

.barometer-state-label {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.barometer-detail-text {
    margin: 0;
    color: var(--text-3);
    font-size: 0.95rem;
    line-height: 1.6;
}


@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ai-comment-card {
    border: 1px solid #e0e7ff;
    background: linear-gradient(135deg, #f8faff 0%, #faf5ff 100%);
    position: relative;
    overflow: hidden;
    animation: fadeSlideIn 0.35s ease;
}

.ai-comment-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7c3aed, #4f46e5, #2563eb);
}

.ai-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.ai-subtitle {
    font-size: 0.78rem;
    color: var(--text-5);
    font-style: italic;
}

.ai-comment-text {
    color: var(--text-2);
    line-height: 1.75;
    margin: 0;
    font-size: 0.95rem;
    white-space: pre-line;
}

.history-list {
    display: flex;
    flex-direction: column;
}

.history-empty {
    padding: 20px;
    color: var(--text-4);
    text-align: center;
}

.history-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px 0 4px;
    color: var(--text-3);
    font-size: 0.875rem;
    font-weight: 500;
}

.history-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--border-2);
}

.history-row:last-child { border-bottom: none; }
.history-row:nth-child(odd)  { background: var(--surface); }
.history-row:nth-child(even) { background: var(--surface-2); }

.hr-date {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-2);
    min-width: 88px;
    flex-shrink: 0;
    padding-top: 3px;
    text-transform: capitalize;
}

.hr-chips {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    min-width: 0;
}

.hr-chip {
    background: var(--surface-3);
    color: var(--text-2);
    font-size: 0.76rem;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.hr-comment {
    width: 100%;
    order: 10;
    font-size: 0.8rem;
    color: var(--text-4);
    font-style: italic;
    padding-top: 2px;
    padding-left: 102px;
}

.history-row .delete-entry {
    flex-shrink: 0;
    align-self: flex-start;
    padding: 5px 12px;
    font-size: 0.78rem;
    background: transparent;
    border: 1.5px solid #fecaca;
    color: #ef4444;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}
.history-row .delete-entry:hover,
.history-row .delete-entry.btn-danger-confirm {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.history-row .edit-entry {
    flex-shrink: 0;
    align-self: flex-start;
    padding: 5px 12px;
    font-size: 0.78rem;
}

.hint {
    color: var(--text-4);
    margin-top: 14px;
}


.modal {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    display: grid;
    place-items: center;
    z-index: 50;
    padding: 16px;
}

.modal.hidden {
    display: none !important;
}

.modal-dialog {
    width: min(520px, 100%);
    background: var(--surface);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 24px 64px var(--shadow-lg);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    border: none;
    background: transparent;
    font-size: 1.6rem;
    color: var(--text-2);
    cursor: pointer;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}


.site-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1100px;
    z-index: 200;
    background: var(--surface);
    box-shadow: 0 2px 8px var(--shadow-sm);
}

.top-nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.top-nav a {
    color: var(--text-2);
    text-decoration: none;
    font-weight: 600;
}

.top-nav a:hover {
    color: #4f46e5;
}

.connected-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-btn {
    position: relative;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-btn:hover {
    color: var(--text);
    background: var(--surface-3);
}

.nav-btn.active {
    color: #4f46e5;
    background: #ede9fe;
}

.nav-btn-entry {
    padding-right: 20px;
}

.nav-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 1.5px solid var(--surface);
}

.nav-btn-account svg {
    flex-shrink: 0;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    margin-left: 8px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.15s;
}
.logo-link:hover { opacity: 0.8; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-logout {
    background: transparent;
    border: 1.5px solid var(--border-2);
    border-radius: 8px;
    padding: 7px 9px;
    cursor: pointer;
    color: var(--text-4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.btn-logout:hover {
    color: #ef4444;
    border-color: #fecaca;
    background: #fff1f1;
}

/* ── Theme toggle ────────────────────────── */
.btn-theme-toggle {
    background: var(--surface-3);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    padding: 7px 10px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.15s;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-theme-toggle:hover {
    background: var(--border-2);
}

.landing {
    max-width: 100%;
    padding: 40px 24px;
    text-align: left;
    box-shadow: none;
    background: transparent;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 40px;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(2.5rem, 4vw, 4rem);
    line-height: 1.05;
}

.hero-copy p {
    max-width: 620px;
    color: var(--text-3);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-top: 18px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    color: #6d28d9;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.82rem;
}

.hero-visual {
    display: grid;
    gap: 16px;
}

.hero-illus {
    width: 100%;
    border-radius: 22px;
    display: block;
    object-fit: cover;
}

.hero-illus--main {
    max-height: 340px;
    object-position: top;
}

.hero-illus--sub {
    max-height: 200px;
}

.landing-section {
    margin-top: 40px;
}

.landing-section h2 {
    font-size: 2rem;
    margin-bottom: 22px;
}

.feature-grid,
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.feature-card,
.step-card {
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: 22px;
    padding: 20px;
    min-height: 160px;
}

.feature-card h3,
.step-card strong {
    margin: 0 0 12px;
    display: block;
    color: var(--text);
}

.feature-card p,
.step-card p {
    margin: 0;
    color: var(--text-3);
    line-height: 1.7;
}

/* ── Footer ─────────────────────────────── */
.site-footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 2px solid var(--border);
}

.footer-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 48px;
    padding-bottom: 32px;
}

.footer-col h4 { font-size: 0.76rem; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col ul li a { color: var(--text-3); text-decoration: none; font-size: 0.9rem; transition: color 0.15s; }
.footer-col ul li a:hover { color: var(--text); }
.footer-tagline { color: var(--text-3); font-size: 0.88rem; line-height: 1.6; margin: 0; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
.footer-badge { background: var(--surface-3); color: var(--text-2); font-size: 0.76rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.footer-disclaimer { color: var(--text-4); font-size: 0.82rem; line-height: 1.65; margin: 0; }
.footer-disclaimer strong { color: var(--text-2); }

.footer-bottom {
    border-top: 1px solid var(--border-2);
    padding: 16px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-copyright {
    font-size: 0.82rem;
    color: var(--text-5);
    margin: 0;
}

/* ── Landing enrichments ─────────────────── */
.hero-lead { max-width: 580px; color: var(--text-2); font-size: 1.05rem; line-height: 1.8; margin-top: 18px; }
.hero-sub { max-width: 520px; color: var(--text-4); font-size: 0.95rem; line-height: 1.7; margin-top: 6px; }

.section-lead {
    color: var(--text-3);
    font-size: 1rem;
    max-width: 580px;
    margin: -8px 0 28px;
    line-height: 1.7;
}

.feature-icon { font-size: 1.8rem; margin-bottom: 10px; }

.stats-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--border-2);
    border-radius: 18px;
    overflow: hidden;
    margin: 36px 0;
}
.stat-item { background: var(--surface); padding: 24px 20px; display: grid; gap: 6px; }
.stat-item strong { font-size: 2rem; font-weight: 800; color: #4f46e5; line-height: 1; display: block; }
.stat-item span { color: var(--text-4); font-size: 0.85rem; line-height: 1.5; }
.stat-item span em { font-style: normal; color: var(--text-5); font-size: 0.78rem; display: block; margin-top: 2px; }

.insight-section { background: var(--surface-2); border-radius: 24px; padding: 40px; }
.insight-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.insight-text { display: grid; gap: 16px; align-content: start; }
.insight-text h2 { margin: 0; font-size: 1.8rem; }
.insight-text p { margin: 0; color: var(--text-3); line-height: 1.75; }
.insight-cta { margin-top: 8px; width: fit-content; }

.insight-cards { display: grid; gap: 16px; }
.insight-card { border-radius: 16px; padding: 20px; }
.insight-card strong { display: block; font-size: 0.95rem; margin-bottom: 12px; }
.insight-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.insight-card ul li { font-size: 0.87rem; color: var(--text-2); padding-left: 14px; position: relative; line-height: 1.5; }
.insight-card ul li::before { content: '–'; position: absolute; left: 0; color: var(--text-5); }
.insight-red { background: #fff1f1; border: 1px solid #fecaca; }
.insight-red strong { color: #dc2626; }
.insight-amber { background: #fffbeb; border: 1px solid #fde68a; }
.insight-amber strong { color: #d97706; }

.step-number {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white; font-size: 1.2rem; font-weight: 800;
    display: grid; place-items: center; margin-bottom: 14px;
}
.step-card h3 { margin: 0 0 8px; font-size: 1rem; }

.cta-section { text-align: center; }
.cta-block {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
    border-radius: 24px; padding: 52px 40px;
    display: grid; gap: 16px; justify-items: center;
}
.cta-block h2 { margin: 0; color: white; font-size: 2rem; }
.cta-block p { margin: 0; color: rgba(255,255,255,0.85); font-size: 1rem; max-width: 480px; }
.btn-cta { margin-top: 8px; padding: 16px 32px; font-size: 1rem; }

/* ── Paywall ─────────────────────────────── */
.paywall-screen {
    padding: 0 0 40px;
}

.paywall-card {
    width: 100%;
}

.paywall-card .card-screen-header h2 { font-size: 1.25rem; }

.paywall-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto 20px;
}

.plan-card {
    border: 1.5px solid var(--border-2);
    border-radius: 18px;
    padding: 22px 20px;
    text-align: left;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan-card h3 { margin: 0; font-size: 1rem; }
.plan-price { font-size: 1.8rem; font-weight: 800; color: var(--text); line-height: 1; }
.plan-period { font-size: 0.9rem; font-weight: 400; color: var(--text-5); }
.plan-saving { font-size: 0.8rem; color: #16a34a; font-weight: 600; }
.plan-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.plan-features li { font-size: 0.85rem; color: var(--text-2); padding-left: 18px; position: relative; }
.plan-features li::before { content: '✓'; position: absolute; left: 0; color: #4f46e5; font-weight: 700; }
.plan-card .btn { margin-top: auto; width: 100%; justify-content: center; }

.plan-card.plan-featured {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}
.plan-card.plan-featured .plan-features li::before { color: #4f46e5; }

.plan-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: #4f46e5;
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.paywall-footer-text { font-size: 0.8rem; color: var(--text-5); margin: 0; text-align: center; }
.paywall-footer-text a { color: #4f46e5; }

/* ── Trial banner ────────────────────────── */
.trial-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    color: #92400e;
    flex-wrap: wrap;
}

.trial-hint {
    font-size: 0.78rem;
    color: var(--text-4);
    margin: 6px 0 0;
}

/* ── Pricing section ─────────────────────── */
.pricing-section { }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.pricing-card {
    border: 1.5px solid var(--border-2);
    border-radius: 18px;
    padding: 24px 20px;
    display: grid;
    gap: 12px;
    align-content: start;
}

.pricing-card h3 { margin: 0; font-size: 1.1rem; }
.pricing-price { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1; }
.pricing-period { font-size: 0.9rem; font-weight: 400; color: var(--text-5); }
.pricing-saving { font-size: 0.82rem; color: #16a34a; font-weight: 600; }
.pricing-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.pricing-features li { font-size: 0.87rem; color: var(--text-2); padding-left: 18px; position: relative; line-height: 1.4; }
.pricing-features li::before { content: '✓'; position: absolute; left: 0; color: var(--text-5); font-weight: 700; }

.pricing-card.pricing-featured {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}
.pricing-card.pricing-featured .pricing-features li::before { color: #4f46e5; }

.pricing-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-5);
    margin-bottom: -4px;
}

.pricing-tag-featured { color: #4f46e5; }

.pricing-note {
    font-size: 0.85rem;
    color: var(--text-5);
    text-align: center;
    margin: 0;
}
.pricing-note a { color: #4f46e5; }

/* ── Score evolution chart ───────────────── */
.score-chart-card { margin-top: 0; }

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

.chart-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-2);
}

.chart-select {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 0.82rem;
    color: var(--text-2);
    background: var(--surface-4);
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

.chart-select:focus { border-color: #4f46e5; }

.score-chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Entry form date header ─────────────── */
.entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.entry-title-block h2 { margin: 0 0 4px; }

.entry-date-label,
.entry-header .view-subtitle {
    font-size: 0.82rem;
    color: var(--text-4);
    font-weight: 500;
}

.entry-date-picker {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.88rem;
    color: var(--text-2);
    background: var(--surface-4);
    cursor: pointer;
    outline: none;
    flex-shrink: 0;
}

.entry-date-picker:focus {
    border-color: #4f46e5;
    background: var(--surface);
}

.entry-form-actions {
    display: flex !important;
    gap: 12px;
    justify-content: flex-end;
}

/* ── Account form sections ───────────────── */
.account-form { display: grid; gap: 0; }

.form-group {
    padding: 28px 0;
    border-bottom: 1px solid var(--border-3);
}

.form-group:last-of-type { border-bottom: none; }

.form-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-5);
    margin-bottom: 20px;
}

.form-group .form-grid {
    grid-template-columns: 1fr 1fr;
    display: grid;
    gap: 20px;
}

.account-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
}

/* ── Button states ───────────────────────── */
.btn-success {
    background: #16a34a !important;
    color: white !important;
    transition: background 0.3s ease;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-danger:hover { background: #dc2626; }

/* ── Danger zone ─────────────────────────── */
.danger-zone {
    margin-top: 32px;
    padding: 22px;
    border: 1.5px solid #fecaca;
    border-radius: 16px;
    background: #fff8f8;
}
.danger-zone h4 {
    margin: 0 0 8px;
    color: #dc2626;
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.danger-zone > p {
    margin: 0 0 16px;
    color: var(--text-4);
    font-size: 0.85rem;
    line-height: 1.65;
}
.delete-confirm-text {
    font-size: 0.88rem;
    color: var(--text-2);
    margin: 0 0 14px;
    line-height: 1.5;
}
.delete-confirm-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Language switcher (footer) ──────────── */
.lang-switcher--footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.lang-switcher--footer .lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-4);
    background: var(--surface-3);
    border: 1.5px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.lang-switcher--footer .lang-btn:hover {
    color: #4f46e5;
    background: #ede9fe;
}

.lang-switcher--footer .lang-btn--active {
    color: #4f46e5;
    background: #ede9fe;
    border-color: #c4b5fd;
}

/* ── Hamburger ───────────────────────────── */
#hamburgerBtn {
    display: none;
    position: relative;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    flex-shrink: 0;
}
#hamburgerBtn span:not(#hamburgerBadge) {
    display: block; width: 24px; height: 2px;
    background: var(--text-2); border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
#hamburgerBtn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#hamburgerBtn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#hamburgerBtn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
#hamburgerBtn.open #hamburgerBadge { display: none !important; }

.contact-success {
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 18px;
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    color: #065f46;
}

.contact-errors {
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 18px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.contact-errors ul {
    margin: 0;
    padding-left: 1.2rem;
}

/* ── Dark mode component overrides ──────── */
[data-theme="dark"] .ai-comment-card {
    border-color: #312e81;
    background: linear-gradient(135deg, #1e1b4b 0%, #2e1065 100%);
}

[data-theme="dark"] .plan-card.plan-featured,
[data-theme="dark"] .pricing-card.pricing-featured {
    background: linear-gradient(135deg, #1e1b4b 0%, #2e1065 100%);
}

[data-theme="dark"] .nav-btn.active {
    background: #312e81;
    color: #a5b4fc;
}

[data-theme="dark"] .lang-switcher--footer .lang-btn:hover,
[data-theme="dark"] .lang-switcher--footer .lang-btn--active {
    background: #312e81;
    color: #a5b4fc;
    border-color: #4338ca;
}

[data-theme="dark"] .trial-banner {
    background: #451a03;
    border-color: #92400e;
    color: #fcd34d;
}

[data-theme="dark"] .danger-zone {
    background: #1c0a0a;
    border-color: #7f1d1d;
}

[data-theme="dark"] .insight-red {
    background: #3b0d0d;
    border-color: #7f1d1d;
}

[data-theme="dark"] .insight-amber {
    background: #451a03;
    border-color: #92400e;
}

[data-theme="dark"] .btn-logout:hover {
    background: #3b0d0d;
}

[data-theme="dark"] .contact-success {
    background: #052e16;
    border-color: #166534;
    color: #86efac;
}

/* ── Dark mode: gauge ────────────────────── */
[data-theme="dark"] #gaugeTrack        { stroke: #1e293b; }
[data-theme="dark"] #gaugeNeedleLine   { stroke: #e2e8f0; }
[data-theme="dark"] #gaugeNeedleTip    { fill:   #e2e8f0; }
[data-theme="dark"] #gaugeHubOuter     { fill:   #e2e8f0; }
[data-theme="dark"] #gaugeHubInner     { fill:   #0f172a; }
[data-theme="dark"] .gauge-tick        { stroke: #0f172a; }

[data-theme="dark"] .site-header {
    background: #000000;
    border-bottom-color: #1a1a1a;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 1060px) {
    .footer-cols {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    .footer-col--wide {
        grid-column: 1 / -1;
    }
}

@media (max-width: 860px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    .insight-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #hamburgerBtn {
        display: flex;
    }

    /* Les deux navs se comportent comme un dropdown mobile */
    .top-nav,
    .connected-nav {
        display: none !important;
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        background: var(--surface);
        border-top: 1px solid var(--border-2);
        box-shadow: 0 8px 32px var(--shadow-md);
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px 20px;
        gap: 4px;
        z-index: 100;
    }

    .top-nav.nav-open,
    .connected-nav.nav-open {
        display: flex !important;
    }

    .top-nav a {
        padding: 12px 14px;
        border-radius: 10px;
        font-size: 1rem;
        display: block;
    }
    .top-nav a:hover { background: var(--surface-3); }

    .connected-nav .nav-btn {
        padding: 12px 14px;
        font-size: 1rem;
        width: 100%;
        text-align: left;
        justify-content: flex-start;
    }

    .connected-nav .btn-sm {
        margin-left: 0;
        margin-top: 8px;
        border-radius: 10px;
        padding: 12px 14px;
        text-align: left;
        width: 100%;
    }

    .stats-strip {
        grid-template-columns: 1fr;
    }

    .cta-block {
        padding: 36px 24px;
    }
    .cta-block h2 { font-size: 1.6rem; }

    .footer-cols {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        padding-bottom: 20px;
    }

    .footer-col--wide {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding-bottom: 16px;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .hero-copy h1 {
        font-size: 2.2rem;
    }
    .insight-section {
        padding: 24px;
    }
    .paywall-plans {
        grid-template-columns: 1fr;
    }
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}
