/* ==========================================================================
   Base Layout & Typographie — s'appuie sur les jetons de css/theme.css
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.55;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
    letter-spacing: -0.02em;
    color: var(--text);
    text-wrap: balance;
}

p,
li,
dd {
    overflow-wrap: break-word;
}

[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-shell {
    min-height: 100vh;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: transparent;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.22);
    flex-shrink: 0;
    overflow: hidden;
}

.brand-mark-sm {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
    margin-bottom: 0;
    border-radius: 9px;
}

.brand-logo-svg {
    display: block;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.brand-word-lead {
    font-weight: 700;
    color: var(--text);
}

.brand-word-accent {
    font-weight: 800;
    color: var(--primary);
}

[data-theme="dark"] .brand-word-accent {
    color: #2dd4bf;
}

/* --- Dashboard Layout --- */
.dashboard-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-main {
    width: 100%;
    max-width: 1060px;
    margin: 1.75rem auto 2.75rem;
    padding: 0 1.5rem;
    flex: 1 1 auto;
}

.dashboard-main.dashboard-main-wide {
    max-width: 1440px;
}

.eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
}

.info-grid {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.9rem;
}

.info-item {
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
}

.info-item dt {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-soft);
    margin-bottom: 0.2rem;
}

.info-item dd {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}

.workspace-section {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.panel-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.section-title {
    margin: 0 0 0.85rem;
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.section-subtitle {
    margin: -0.45rem 0 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.section-heading {
    margin: 0 0 0.85rem;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.section-heading-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.section-heading-row .section-heading {
    margin: 0;
}

@media (max-width: 600px) {
    .dashboard-main {
        margin: 1rem auto 2rem;
        padding: 0 0.9rem;
    }
}

/* --- Discreet App Footer (Support / Signalement de bug) --- */
.app-footer {
    width: 100%;
    border-top: 1px solid var(--border);
    background: var(--surface);
    margin-top: auto;
}

.app-footer-inner {
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.app-footer-brand {
    font-weight: 600;
    color: var(--text-soft);
}

.app-footer-links {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
}

.app-footer-support-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.app-footer-support-link:hover,
.app-footer-support-link:focus-visible {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

[data-theme="dark"] .app-footer-support-link:hover,
[data-theme="dark"] .app-footer-support-link:focus-visible {
    color: #2dd4bf;
}

@media (max-width: 600px) {
    .app-footer-inner {
        padding: 0.7rem 0.9rem;
        justify-content: center;
        text-align: center;
    }
}
