Files
design-system/reset.css

99 lines
1.9 KiB
CSS

/* ==========================================================================
@transformer/ui — reset.css
Reset moderne minimal. À importer APRÈS tokens.css.
Vit dans @layer tf-reset : le CSS d'un site (non-layeré) gagne toujours.
========================================================================== */
@layer tf-reset {
*,
*::before,
*::after {
box-sizing: border-box;
}
* {
margin: 0;
}
html {
-webkit-text-size-adjust: 100%;
hanging-punctuation: first last;
}
body {
min-height: 100svh;
background: var(--bg);
color: var(--text);
font-family: var(--font-body);
font-size: var(--fs-base);
line-height: var(--lh-base);
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
font-family: var(--font-heading);
line-height: var(--lh-tight);
text-wrap: balance;
overflow-wrap: break-word;
}
p, li, blockquote {
overflow-wrap: break-word;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
height: auto;
}
input, button, textarea, select {
font: inherit;
color: inherit;
}
a {
color: var(--link);
}
a:hover {
color: var(--link-hover);
}
code, pre, kbd, samp {
font-family: var(--font-mono);
}
/* Focus visible partout, jamais supprimé sans remplacement */
:focus-visible {
outline: 2px solid var(--focus-ring);
outline-offset: 2px;
border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) {
outline: none;
}
/* Défilement doux uniquement si l'utilisateur accepte le mouvement */
@media (prefers-reduced-motion: no-preference) {
html {
scroll-behavior: smooth;
}
}
/* Reduced motion : coupe tout mouvement non essentiel, globalement */
@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;
}
}
} /* @layer tf-reset */