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

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
    list-style: none;
}

/* Set core root defaults */
html:focus-within {
    scroll-behavior: smooth;
}

html {
    overflow-y: scroll;
}

@supports (scrollbar-gutter: stable) {
    html {
        overflow-y: auto;
        scrollbar-gutter: stable;
    }
}

/* Set core body defaults */
body {
    min-height: 100vh;
    min-height: 100svh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
    max-width: 100%;
    display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}
:root {
        color-scheme: light dark;
        --line: color-mix(in srgb, currentColor 25%, transparent);
    }

    #main {
        font-family: system-ui, sans-serif;
        font-size: 1.125rem;
        line-height: 1.7;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        min-height: 100vh;
        min-height: 100svh;
    }

    .recipe {
        width: 100%;
        max-width: 44rem;
    }

    /* Le reset doit rester avant la règle d'espacement */
    .recipe :where(p, ul, ol, dl, figure, table) {
        margin-block: 0;
    }

    .recipe > * + *,
    .recipe-card > * + *,
    .myth > * + * {
        margin-block-start: 1.25rem;
    }

    /* Titres */
    .recipe h1,
    .recipe h2,
    .recipe h3,
    .recipe h4 {
        margin-block-end: 0;
        line-height: 1.2;
        text-wrap: balance;
    }

    .recipe h1 {
        font-size: clamp(1.75rem, 1.2rem + 2.5vw, 2.5rem);
    }

    .recipe h2 {
        font-size: 1.75rem;
    }

    .recipe h3 {
        margin-block-start: 2rem;
        font-size: 1.35rem;
    }

    .recipe h4 {
        margin-block-start: 1.5rem;
        font-size: 1.1rem;
    }

    .recipe-meta {
        font-size: 0.9rem;
        color: color-mix(in srgb, currentColor 75%, transparent);
    }

    /* Mise au point sur le dinosaure */
    .myth {
        padding: 1.5rem;
        border-inline-start: 0.5rem solid currentColor;
        background: color-mix(in srgb, canvastext 5%, canvas);
    }

    .myth figure {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .myth img {
        display: block;
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 24rem;
        object-fit: contain;
    }

    .myth figcaption {
        font-size: 0.9rem;
        font-style: italic;
        text-align: center;
    }

    /* Fiches recette */
    .recipe-card {
        padding: 1.5rem;
        border: 2px solid currentColor;
        border-radius: 0.5rem;
        background: color-mix(in srgb, canvastext 5%, canvas);
    }

    .rating-stars {
        color: #b45309;
        letter-spacing: 0.1em;
    }

    .recipe-times {
        width: 100%;
        border-collapse: collapse;
    }

    .recipe-times caption {
        padding-block-end: 0.5rem;
        font-weight: 600;
        text-align: start;
    }

    .recipe-times th,
    .recipe-times td {
        padding: 0.5rem 0.75rem;
        border-block-end: 1px solid var(--line);
        text-align: start;
        vertical-align: top;
    }

    .recipe-times th {
        width: 45%;
        font-weight: 600;
    }

    .recipe ul,
    .recipe ol {
        padding-inline-start: 1.5rem;
    }

    .recipe li + li {
        margin-block-start: 0.5rem;
    }

    .nutrition {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0.25rem 1rem;
    }

    .nutrition dt {
        font-weight: 600;
    }

    .nutrition dd {
        margin: 0;
    }

    /* Commentaires */
    .comments > * + * {
        margin-block-start: 1.25rem;
    }

    .recipe .comment-list {
        padding-inline-start: 0;
        list-style: none;
    }

    .recipe .comment-list > li + li {
        margin-block-start: 1.5rem;
    }

    .comment {
        padding-block-start: 1rem;
        border-block-start: 1px solid var(--line);
    }

    .comment > * + * {
        margin-block-start: 0.75rem;
    }

    .comment h3 {
        margin-block-start: 0;
        font-size: 1.1rem;
    }

    .comment-meta {
        font-size: 0.9rem;
        color: color-mix(in srgb, currentColor 75%, transparent);
    }

    .comment-reply {
        padding-inline-start: 1rem;
        border-inline-start: 0.25rem solid var(--line);
    }

    .comment-reply > * + * {
        margin-block-start: 0.5rem;
    }