/* Motricité : habillage écran et espacement des fiches de séance. */
@media screen {
    #main-content:has(> .mt-wrapper) { background: #f8f7f1; }
    .mt-wrapper {
        --mt-ink: #233f35;
        --mt-accent: #285743;
        --mt-soft: #617368;
        --mt-paper: #fffefb;
        --mt-tint: #eef2e7;
        --mt-line: #dce2d6;
        --mt-orange: #b06442;
        --text-strong: var(--mt-ink);
        --text-body: #344b40;
        --text-soft: var(--mt-soft);
        --surface: var(--mt-paper);
        --surface-alt: var(--mt-tint);
        --surface-border: var(--mt-line);
        --primary: var(--mt-accent);
        --primary-700: var(--mt-accent);
        max-width: 1280px; padding: 3.5rem 2rem 5rem;
    }
    .mt-wrapper *, .mt-sheet-dialog * { box-sizing: border-box; }
    .mt-wrapper [hidden] { display: none !important; }
    .mt-hero { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 2rem; text-align: left; margin: 0 0 3.7rem; }
    .mt-hero .mt-eyebrow { display: flex; align-items: center; gap: .55rem; margin: 0 0 1.2rem; font-size: .69rem; font-weight: 800; letter-spacing: .12em; color: var(--mt-accent); line-height: 1.6; }
    .mt-eyebrow-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #b06442; box-shadow: 0 0 0 5px #b0644210; }
    .mt-hero h1 { margin: 0 0 1.15rem; font-size: clamp(2.8rem, 5.5vw, 4.7rem); line-height: 1.01; letter-spacing: -.045em; font-weight: 800; color: var(--mt-ink); }
    .mt-hero h1 > span { color: var(--mt-accent); }
    .mt-title-dot { color: var(--mt-orange); }
    .mt-hero .mt-hero-description { max-width: 475px; margin: 0; color: var(--mt-soft); font-size: 1.02rem; line-height: 1.75; }
    .mt-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.35rem; margin: 1.55rem 0 1.8rem; }
    .mt-wrapper .btn { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; border: 1px solid var(--mt-accent); border-radius: 10px; min-height: 44px; padding: .65rem .95rem; background: var(--mt-accent); color: #fff; font: inherit; font-size: .83rem; font-weight: 700; line-height: 1.45; box-shadow: none; text-decoration: none; cursor: pointer; transition: background .18s, transform .18s; }
    .mt-wrapper .btn:hover { background: #193e2f; color: #fff; transform: translateY(-1px); }
    .mt-wrapper .btn-secondary { background: transparent; border-color: var(--mt-line); color: var(--mt-ink); }
    .mt-wrapper .btn-secondary:hover { background: var(--mt-tint); border-color: var(--mt-accent); color: var(--mt-ink); }
    .mt-wrapper .mt-button-primary { padding: .85rem 1.25rem; font-size: .9rem; }
    .mt-wrapper .mt-button-primary span { font-size: 1.2rem; }
    .mt-text-link { color: var(--mt-ink); font-size: .83rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
    .mt-text-link span { margin-left: .3rem; }
    .mt-hero-facts { display: flex; flex-wrap: wrap; gap: 1.1rem 0; border-top: 1px solid var(--mt-line); padding-top: 1.3rem; }
    .mt-hero-facts > div { display: flex; flex-direction: column; gap: .15rem; padding: 0 1.4rem; border-left: 1px solid var(--mt-line); }
    .mt-hero-facts > div:first-child { padding-left: 0; border: 0; }
    .mt-hero-facts strong { font-size: 1.45rem; line-height: 1.25; color: var(--mt-ink); font-weight: 800; }
    .mt-hero-facts small { font-size: .8rem; font-weight: 600; }
    .mt-hero-facts span { color: var(--mt-soft); font-size: .71rem; }
    .mt-playground { position: relative; min-width: 0; padding: 1.7rem 1rem .9rem; border: 1px solid #e0e5d6; border-radius: 45% 45% 24px 24px; background: #f0f2e7; transform: rotate(2deg); }
    .mt-playground-art { display: block; width: 100%; height: auto; }
    .mt-playground-note { display: block; text-align: center; color: #406148; font-size: .83rem; font-weight: 700; letter-spacing: .025em; }
    .mt-playground-label { position: absolute; padding: .65rem .9rem; border: 1px solid #e6e5db; border-radius: 9px; background: #fffefb; color: #344b40; box-shadow: 0 5px 15px #233f3508; font-size: .75rem; font-weight: 700; transform: rotate(-6deg); }
    .mt-playground-label-one { left: -.5rem; top: 38%; }
    .mt-playground-label-two { right: -.4rem; bottom: 7%; transform: rotate(1deg); }
    .mt-section-kicker { margin: 0 0 .4rem; color: var(--mt-soft); font-size: .66rem; letter-spacing: .13em; font-weight: 800; line-height: 1.5; }
    .mt-catalog { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 2rem; align-items: start; scroll-margin-top: 110px; }
    .mt-catalog-results { min-width: 0; }
    .mt-filter-panel { margin: 0; padding: 1.25rem 1.05rem; border: 1px solid var(--mt-line); border-radius: 16px; box-shadow: none; background: var(--mt-paper); }
    .mt-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
    .mt-filter-heading h2 { margin: 0; font-size: 1.15rem; }
    .mt-filter-heading > span { font-size: 1.5rem; color: var(--mt-soft); }
    .mt-filter-intro { margin: .4rem 0 1.4rem; font-size: .76rem; color: var(--mt-soft); line-height: 1.6; }
    .mt-filters { display: grid; gap: 1.4rem; }
    .mt-field { min-width: 0; }
    .mt-field + .mt-field { padding-top: 1.1rem; border-top: 1px solid var(--mt-line); }
    .mt-field > .mt-lbl { margin-bottom: .65rem; color: var(--mt-ink); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }
    .mt-chips { gap: .35rem; }
    #mt-f-obj { display: grid; }
    .mt-chip { border: 1px solid transparent; border-radius: 8px; min-height: 44px; padding: .55rem .7rem; background: transparent; color: var(--mt-soft); font-size: .77rem; font-weight: 600; line-height: 1.45; text-align: left; }
    .mt-chip:hover { background: var(--mt-tint); border-color: var(--mt-line); }
    .mt-chip[aria-pressed="true"] { background: var(--mt-tint); border-color: var(--mt-accent); color: var(--mt-accent); box-shadow: inset 3px 0 0 var(--mt-accent); }
    #mt-f-sec .mt-chip { padding: .55rem .65rem; text-align: center; }
    #mt-f-sec .mt-chip[aria-pressed="true"] { background: var(--mt-accent); color: #fff; box-shadow: none; }
    #mt-f-lieu .mt-chip { border-color: var(--mt-line); }
    .mt-toolbar { align-items: center; margin: .2rem 0 1.2rem; gap: .8rem; }
    .mt-toolbar h2 { margin: 0 0 .15rem; font-size: 1.85rem; line-height: 1.25; color: var(--mt-ink); letter-spacing: -.025em; }
    .mt-count { font-size: .76rem; color: var(--mt-soft); font-weight: 500; }
    .mt-count span { color: var(--mt-accent); font-weight: 700; }
    #mt-week-toggle { background: transparent; color: var(--mt-accent); border-color: var(--mt-accent); font-size: .76rem; }
    #mt-week-toggle:hover, #mt-week-toggle[aria-expanded="true"] { background: var(--mt-accent); color: #fff; }
    .mt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
    .mt-card { --mt-card-color: #386b80; --mt-card-tint: #edf4f5; position: relative; min-width: 0; gap: .8rem; padding: 1.35rem; border: 1px solid var(--mt-line); border-radius: 15px; background: var(--mt-paper); box-shadow: 0 3px 10px #233f3503; transition: border-color .18s, box-shadow .18s, transform .18s; }
    .mt-card[data-objective="equilibres"] { --mt-card-color: #477244; --mt-card-tint: #edf3e7; }
    .mt-card[data-objective="expressif"] { --mt-card-color: #885563; --mt-card-tint: #f7edf0; }
    .mt-card[data-objective="cooperer"] { --mt-card-color: #946528; --mt-card-tint: #faf2df; }
    .mt-card:hover { border-color: var(--mt-card-color); box-shadow: 0 8px 22px #233f350b; transform: translateY(-2px); }
    .mt-card.is-picked { border-color: var(--mt-accent); box-shadow: 0 0 0 2px var(--mt-accent); }
    .mt-card-head { align-items: center; gap: .85rem; }
    .mt-card-emoji { display: grid; place-items: center; width: 50px; height: 54px; background: var(--mt-card-tint); border-radius: 15px 15px 15px 4px; font-size: 1.65rem; line-height: 1.2; }
    .mt-card-category { display: block; margin-bottom: .3rem; color: var(--mt-card-color); font-size: .65rem; font-weight: 700; line-height: 1.35; }
    .mt-card-title { font-size: 1.17rem; font-weight: 800; line-height: 1.25; letter-spacing: -.015em; }
    .mt-badges { gap: .3rem; }
    .mt-badge-sec { border: 1px solid var(--mt-line); border-radius: 5px; padding: .18rem .5rem; background: transparent; color: var(--mt-soft); font-size: .65rem; }
    .mt-card-material { margin: 0; color: var(--mt-soft); font-size: .76rem; line-height: 1.6; overflow-wrap: anywhere; }
    .mt-card-material > span { display: block; margin-bottom: .15rem; color: var(--mt-ink); font-size: .65rem; font-weight: 700; }
    .mt-card-meta { padding: .75rem 0 0; margin-top: auto; border-top: 1px solid var(--mt-line); color: var(--mt-soft); font-size: .72rem; gap: .4rem .8rem; }
    .mt-card-actions { display: grid; grid-template-columns: 1fr auto; margin: 0; padding-top: .15rem; gap: .5rem; }
    .mt-card-actions .btn { padding: .55rem .65rem; font-size: .75rem; }
    .mt-card-actions [data-sheet-show] { justify-content: space-between; }
    .mt-pick { min-height: 44px; background: var(--mt-tint); border-color: var(--mt-line); font-size: .75rem; }
    .mt-empty { border: 1px dashed var(--mt-line); border-radius: 15px; background: var(--mt-paper); font-style: normal; line-height: 1.7; }
    .mt-week-panel { background: var(--mt-tint); border-color: var(--mt-line); border-radius: 15px; box-shadow: none; }
    .mt-week-day { background: var(--mt-paper); border-color: var(--mt-line); }
    .mt-week-option, .mt-week-status { font-size: .8rem; }
    .mt-cycle-section { margin: 3rem 0 1.8rem; padding: 1.8rem; border: 1px solid var(--mt-line); border-radius: 18px; background: var(--mt-tint); box-shadow: none; }
    .mt-cycle-section > h2 { margin: 0 0 1.3rem; font-size: 1.7rem; line-height: 1.3; scroll-margin-top: 120px; }
    .mt-cycle { border: 0; padding: 1.4rem; border-radius: 12px; background: var(--mt-paper); }
    .mt-cycle-heading { display: flex; align-items: center; gap: .85rem; margin-bottom: .8rem; }
    .mt-cycle-symbol { display: grid; place-items: center; width: 52px; height: 52px; flex: 0 0 auto; border-radius: 50%; background: var(--mt-tint); font-size: 1.5rem; }
    .mt-cycle-overline { color: var(--mt-soft); font-size: .6rem; font-weight: 700; letter-spacing: .1em; }
    .mt-cycle h3 { font-size: 1.25rem; margin: .2rem 0 0; }
    .mt-cycle > p { max-width: 850px; color: var(--mt-soft); font-size: .86rem; line-height: 1.7; }
    .mt-cycle-meta { margin: .85rem 0; }
    .mt-cycle-meta span { border-radius: 6px; font-size: .66rem; font-weight: 600; background: var(--mt-tint); }
    .mt-cycle-detail { margin: 1rem 0; border-top: 1px solid var(--mt-line); border-bottom: 1px solid var(--mt-line); }
    .mt-cycle-detail > summary, .mt-programme > summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 0; min-height: 44px; font-size: .84rem; color: var(--mt-ink); font-weight: 700; cursor: pointer; list-style: none; }
    .mt-cycle-detail > summary::-webkit-details-marker, .mt-programme > summary::-webkit-details-marker { display: none; }
    .mt-cycle-detail > summary > span, .mt-programme > summary > span { font-size: 1.3rem; transition: transform .18s; }
    .mt-cycle-detail[open] > summary > span, .mt-programme[open] > summary > span { transform: rotate(45deg); }
    .mt-cycle-detail > p { font-size: .85rem; }
    .mt-cycle-steps { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 2rem; padding-left: 1.5rem; margin-bottom: 1.2rem; }
    .mt-cycle-steps li { font-size: .82rem; line-height: 1.7; padding-left: .25rem; }
    .mt-cycle-steps li::marker { color: var(--mt-accent); font-weight: 800; }
    .mt-cycle-actions { gap: .6rem; }
    .mt-cycle-actions .btn { font-size: .76rem; }
    .mt-resources { border-top: 1px solid var(--mt-line); padding-top: .7rem; }
    .mt-programme { border-bottom: 1px solid var(--mt-line); margin-bottom: .8rem; }
    .mt-programme > summary { font-size: .9rem; }
    .mt-bo { max-width: none; margin: 0 0 1rem; border: 0; border-left: 3px solid var(--mt-accent); background: var(--mt-tint); color: var(--text-body); font-size: .82rem; }
    .mt-reference { margin: 1rem 0; padding: .4rem 0 .4rem .9rem; color: var(--mt-soft); border-left: 2px solid var(--mt-line); font-size: .73rem; line-height: 1.7; }
    .mt-reference a { color: var(--mt-accent); text-decoration: underline; text-underline-offset: 3px; }
    .mt-wrapper :is(a, button, input, summary):focus-visible { outline: 3px solid var(--mt-accent); outline-offset: 4px; }
    .mt-sheet-dialog { border-radius: 18px; }
    .mt-sheet-dialog-head { background: #eef2e7; }
    .mt-sheet-dialog-title { color: #233f35; }
    .mt-sheet-dialog-content { background: #f5f4ee; }
    .mt-sheet-dialog-content .mt-print-sheet { border: 1px solid #e1e2dc; box-shadow: 0 2px 9px #233f3508; }
    [data-theme="dark"] #main-content:has(> .mt-wrapper) { background: #14231e; }
    [data-theme="dark"] .mt-wrapper { --mt-ink: #e8f0e6; --mt-accent: #aed4af; --mt-soft: #b3c2b6; --mt-paper: #1e3027; --mt-tint: #273d30; --mt-line: #425a4a; --mt-orange: #e8ab85; --text-body: #d2dfd3; }
    [data-theme="dark"] .mt-wrapper .btn { background: #aed4af; border-color: #aed4af; color: #173521; }
    [data-theme="dark"] .mt-wrapper .btn:hover { background: #c2e4bf; }
    [data-theme="dark"] .mt-wrapper .btn-secondary, [data-theme="dark"] #mt-week-toggle { background: transparent; color: #d7e8d5; border-color: #66846d; }
    [data-theme="dark"] .mt-wrapper .btn-secondary:hover, [data-theme="dark"] #mt-week-toggle[aria-expanded="true"] { background: #304d38; }
    [data-theme="dark"] .mt-chip[aria-pressed="true"] { background: #344e39; border-color: #aed4af; color: #e0efda; }
    [data-theme="dark"] #mt-f-sec .mt-chip[aria-pressed="true"] { background: #aed4af; color: #173521; }
    [data-theme="dark"] .mt-card { --mt-card-color: #a3cedd; --mt-card-tint: #294752; }
    [data-theme="dark"] .mt-card[data-objective="equilibres"] { --mt-card-color: #bbd9a6; --mt-card-tint: #365039; }
    [data-theme="dark"] .mt-card[data-objective="expressif"] { --mt-card-color: #e1b4c1; --mt-card-tint: #503641; }
    [data-theme="dark"] .mt-card[data-objective="cooperer"] { --mt-card-color: #e5ca91; --mt-card-tint: #51452a; }
    [data-theme="dark"] .mt-playground { background: #e8ecdd; border-color: #83917b; }
    [data-theme="dark"] .mt-bo { background: var(--mt-tint); border-left-color: var(--mt-accent); }
    [data-theme="dark"] .mt-sheet-dialog-head { background: #273d30; }
    [data-theme="dark"] .mt-sheet-dialog-title { color: #edf4e9; }
    [data-theme="dark"] .mt-sheet-dialog-content { background: #14231e; }
    @media (min-width: 1100px) { .mt-filter-panel { position: sticky; top: 110px; } }
    @media (max-width: 1050px) {
        .mt-wrapper { padding: 2.5rem 1.5rem 4rem; }
        .mt-hero { gap: 1.5rem; }
        .mt-catalog { grid-template-columns: 210px minmax(0, 1fr); gap: 1.2rem; }
        .mt-card { padding: 1rem; }
        .mt-card-actions { grid-template-columns: 1fr; }
        .mt-hero-facts > div { padding: 0 1rem; }
    }
    @media (max-width: 800px) {
        .mt-hero { grid-template-columns: 1fr .7fr; gap: .8rem; margin-bottom: 2.6rem; }
        .mt-hero h1 { font-size: 3rem; }
        .mt-playground { padding: 1.2rem .2rem 1rem; }
        .mt-playground-label { font-size: .6rem; padding: .4rem; }
        .mt-playground-label-two { right: 0; bottom: 4%; }
        .mt-hero-facts { gap: .8rem; }
        .mt-hero-facts > div { padding: 0 .8rem 0 0; border: 0; }
        .mt-hero-facts strong { font-size: 1.2rem; }
        .mt-hero-facts span { font-size: .65rem; }
        .mt-catalog { grid-template-columns: 1fr; gap: 1.5rem; }
        .mt-filter-panel { padding: 1.1rem; }
        .mt-filter-intro { margin-bottom: .9rem; }
        .mt-filters { grid-template-columns: 1fr 1fr; gap: .9rem 1.5rem; }
        .mt-field:first-child { grid-column: 1 / -1; }
        #mt-f-obj { display: flex; }
        .mt-field + .mt-field { padding-top: .8rem; }
        .mt-chip { font-size: .74rem; }
        .mt-card-actions { grid-template-columns: 1fr auto; }
    }
    @media (max-width: 560px) {
        .mt-wrapper { padding: 1.8rem 1rem 3rem; }
        .mt-hero { grid-template-columns: 1fr; gap: 1.3rem; margin-bottom: 1.8rem; }
        .mt-hero .mt-eyebrow { font-size: .59rem; letter-spacing: .08em; margin-bottom: 1rem; }
        .mt-hero h1 { font-size: clamp(2.8rem, 12vw, 3.7rem); }
        .mt-hero .mt-hero-description { font-size: .9rem; }
        .mt-hero-actions { gap: .9rem; margin: 1.2rem 0 1.3rem; }
        .mt-wrapper .mt-button-primary { padding: .7rem 1rem; font-size: .82rem; }
        .mt-text-link { font-size: .76rem; }
        .mt-hero-facts { justify-content: space-between; gap: .6rem; padding-top: 1rem; }
        .mt-hero-facts > div { padding: 0; }
        .mt-hero-facts strong { font-size: 1.3rem; }
        .mt-playground { display: none; }
        .mt-filters { gap: .9rem; }
        #mt-f-obj .mt-chip { flex: 1 1 43%; }
        #mt-f-obj .mt-chip:first-child { flex-basis: 100%; }
        .mt-field > .mt-lbl { font-size: .65rem; }
        .mt-chip { font-size: .7rem; padding: .5rem; }
        #mt-f-sec .mt-chip { padding: .5rem; }
        .mt-toolbar { flex-direction: row; align-items: center; }
        .mt-toolbar h2 { font-size: 1.55rem; }
        #mt-week-toggle { font-size: .69rem; padding: .6rem; max-width: 145px; }
        .mt-grid { grid-template-columns: 1fr; gap: .85rem; }
        .mt-card { padding: 1.15rem; }
        .mt-card-title { font-size: 1.25rem; }
        .mt-card-material { font-size: .8rem; }
        .mt-card-meta { font-size: .75rem; }
        .mt-cycle-section { padding: 1rem; margin-top: 2rem; }
        .mt-cycle-section > h2 { font-size: 1.4rem; }
        .mt-cycle { padding: 1rem; }
        .mt-cycle h3 { font-size: 1.1rem; }
        .mt-cycle-steps { grid-template-columns: 1fr; }
        .mt-cycle-actions .btn { width: 100%; }
    }
    @media (prefers-reduced-motion: reduce) {
        .mt-wrapper .btn, .mt-card, .mt-chip, .mt-cycle-detail > summary > span, .mt-programme > summary > span { transition: none; }
        .mt-wrapper .btn:hover, .mt-card:hover { transform: none; }
    }
    @media (forced-colors: active) {
        .mt-chip[aria-pressed="true"] { outline: 2px solid Highlight; border-color: Highlight; }
        .mt-card.is-picked { outline: 3px solid Highlight; }
    }
}

/* Aérer les fiches individuelles, sans modifier les tableaux semaine/cycle. */
@media screen, print {
    .mt-print-sheet:not(.mt-print-week):not(.mt-print-cycle) .mt-print-content { padding-top: .18cm; }
    .mt-print-sheet:not(.mt-print-week):not(.mt-print-cycle) p,
    .mt-print-sheet:not(.mt-print-week):not(.mt-print-cycle) li { line-height: 1.5; margin-top: .14cm; margin-bottom: .14cm; orphans: 3; widows: 3; }
    .mt-print-sheet:not(.mt-print-week):not(.mt-print-cycle) h2 { margin: .48cm 0 .18cm; padding-bottom: .13cm; line-height: 1.35; }
    .mt-print-sheet:not(.mt-print-week):not(.mt-print-cycle) h3 { margin: 0 0 .16cm; line-height: 1.4; }
    .mt-print-sheet:not(.mt-print-week):not(.mt-print-cycle) .mt-print-meta { margin: .12cm 0 .3cm; gap: .18cm .45cm; }
    .mt-print-sheet:not(.mt-print-week):not(.mt-print-cycle) .mt-print-box { padding: .24cm .34cm; margin: .27cm 0; }
    .mt-print-sheet:not(.mt-print-week):not(.mt-print-cycle) .mt-print-box > :first-child { margin-top: 0; }
    .mt-print-sheet:not(.mt-print-week):not(.mt-print-cycle) .mt-print-box > :last-child { margin-bottom: 0; }
    .mt-print-sheet:not(.mt-print-week):not(.mt-print-cycle) p.mt-print-var { margin-top: .12cm; margin-bottom: .12cm; }
    .mt-print-sheet:not(.mt-print-week):not(.mt-print-cycle) p.mt-print-foot { margin-top: .35cm; padding-top: .2cm; font-size: 9.2pt; line-height: 1.45; }
}
@media screen {
    #mt-sheet-dialog-content .mt-print-sheet { padding: .65cm .7cm; }
    #mt-sheet-dialog-content .mt-print-sheet p,
    #mt-sheet-dialog-content .mt-print-sheet li { line-height: 1.65; margin-top: .2cm; margin-bottom: .2cm; }
    #mt-sheet-dialog-content .mt-print-sheet h2 { margin-top: .6cm; margin-bottom: .24cm; padding-bottom: .16cm; }
    #mt-sheet-dialog-content .mt-print-box { padding: .35cm .4cm; margin: .35cm 0; }
    #mt-sheet-dialog-content .mt-print-sheet p.mt-print-var { margin-top: .18cm; margin-bottom: .18cm; }
    @media (max-width: 620px) {
        #mt-sheet-dialog-content .mt-print-sheet { padding: .4cm .3cm; }
    }
}
