/*
 * StylesReset — remise à zéro complète des styles par défaut des navigateurs
 * À charger en premier, avant StylesCommun.css et app.css
 */

/* Modèle de boîte */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Marges, paddings, bordures */
* {
    margin: 0;
    padding: 0;
    border: 0 solid transparent;
}

/* Racine document */
html {
    block-size: 100%;
    hanging-punctuation: first last;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        interpolate-size: allow-keywords;
    }
}

/* Corps de page */
body {
    block-size: 100%;
    min-block-size: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Typographie — héritage */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: inherit;
    text-wrap: balance;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

p {
    text-wrap: pretty;
}

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

/* Liens */
a {
    color: inherit;
    text-decoration: none;
}

/* Médias */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-inline-size: 100%;
    block-size: auto;
}

svg {
    fill: currentColor;
}

/* Formulaires — héritage typographique */
input,
button,
textarea,
select,
optgroup,
label {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
}

button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
    cursor: pointer;
    background: none;
    appearance: none;
    -webkit-appearance: none;
}

input,
textarea,
select {
    appearance: none;
    -webkit-appearance: none;
    border-radius: 0;
}

textarea {
    resize: vertical;
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
    cursor: not-allowed;
}

fieldset {
    min-inline-size: 0;
    border: 0;
}

legend {
    padding: 0;
}

/* Tableaux */
table {
    border-collapse: collapse;
    border-spacing: 0;
    inline-size: 100%;
}

caption {
    text-align: start;
}

th,
td {
    text-align: start;
    vertical-align: top;
}

/* Citations */
blockquote,
q {
    quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
    content: none;
}

/* Séparateur */
hr {
    block-size: 0;
    color: inherit;
    border-block-start-width: 1px;
    overflow: visible;
}

/* Code */
pre,
code,
kbd,
samp {
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
    font-size: 1em;
}

pre {
    overflow: auto;
}

/* Indices et exposants */
sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    inset-block-end: -0.25em;
}

sup {
    inset-block-start: -0.5em;
}

/* Abréviations */
abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

/* Éléments interactifs */
summary {
    cursor: pointer;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

dialog {
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    max-inline-size: calc(100% - 2rem);
    max-block-size: calc(100% - 2rem);
}

iframe {
    border: 0;
}

/* Attribut hidden */
[hidden] {
    display: none !important;
}

/* Focus — accessibilité clavier */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Sélection de texte */
::selection {
    background-color: Highlight;
    color: HighlightText;
}

/* Scroll fluide (respecte prefers-reduced-motion via media query si besoin) */
@media (prefers-reduced-motion: no-preference) {
    html:focus-within {
        scroll-behavior: smooth;
    }
}

/* Impression — base neutre */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    img,
    svg,
    video,
    canvas {
        break-inside: avoid;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        break-after: avoid;
    }

    p,
    li {
        orphans: 3;
        widows: 3;
    }
}
