/* ═══════════════════════════════════════════════════════════════════
   CortyKids — Base & Typographie
   Fichier: public/assets/css/base.css
   
   Reset moderne + typographie + scrollbar + accessibilité.
   À charger EN PREMIER (avant components, layout).
   ═══════════════════════════════════════════════════════════════════ */

/* ─── IMPORT GOOGLE FONTS ─── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ─── RESET MODERNE ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: var(--ck-font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ck-dark);
    background-color: var(--ck-off-white);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── TYPOGRAPHIE ─── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--ck-font-title);
    font-weight: 700;
    line-height: 1.2;
    color: var(--ck-navy);
    margin-bottom: 0.5em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: 1em;
    color: var(--ck-gray-700);
}

a {
    color: var(--ck-gold);
    text-decoration: none;
    transition: color var(--ck-dur-fast) var(--ck-ease);
}

a:hover {
    color: var(--ck-gold-light);
}

strong, b { font-weight: 600; }
em, i { font-style: italic; }

small {
    font-size: 0.875rem;
    color: var(--ck-gray-500);
}

code, pre {
    font-family: var(--ck-font-mono);
    font-size: 0.875em;
}

code {
    background: var(--ck-gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--ck-navy);
}

pre {
    background: var(--ck-navy);
    color: var(--ck-gray-100);
    padding: 16px;
    border-radius: var(--ck-radius);
    overflow-x: auto;
    line-height: 1.5;
}

pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* ─── LISTES ─── */
ul, ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

li {
    margin-bottom: 0.25em;
}

/* ─── FORMULAIRES (reset) ─── */
input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

/* ─── IMAGES ─── */
img, svg, video, canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ─── TABLES ─── */
table {
    width: 100%;
    border-collapse: collapse;
}

/* ─── SCROLLBAR PERSONNALISÉE ─── */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--ck-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--ck-gold);
    border-radius: var(--ck-radius-full);
    border: 2px solid var(--ck-gray-100);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ck-gold-light);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--ck-gold) var(--ck-gray-100);
}

/* ─── SÉLECTION TEXTE ─── */
::selection {
    background: var(--ck-gold);
    color: var(--ck-navy);
}

/* ─── FOCUS ACCESSIBLE ─── */
:focus-visible {
    outline: 3px solid var(--ck-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── ACCESSIBILITÉ : réduire les animations ─── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ─── UTILITAIRES ─── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-gold   { color: var(--ck-gold); }
.text-navy   { color: var(--ck-navy); }
.text-mint   { color: var(--ck-mint); }
.text-muted  { color: var(--ck-gray-500); }