/* ================================================================
   MyKortex 2.0 — Base & Reset
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── Reset ────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Typographie ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p { margin-bottom: var(--space-4); }

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--primary-700); }

small { font-size: var(--text-sm); color: var(--text-secondary); }

/* ─── Listes ───────────────────────────────────────────────── */
ul, ol { list-style: none; }

/* ─── Images ───────────────────────────────────────────────── */
img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ─── Tables ───────────────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

/* ─── Formulaires ──────────────────────────────────────────── */
input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* ─── Focus visible ────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}

/* ─── Scrollbar personnalisé ───────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--border-radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ─── Selection ────────────────────────────────────────────── */
::selection {
    background-color: var(--primary-100);
    color: var(--primary-900);
}
