/* Gommettes : palette AssMat, relief réservé aux actions, mouvements brefs. */
.button, button:not(.link-button):not(.day-panel__close), .secondary-button {
  border-radius: .65rem .65rem 1.1rem .65rem;
}
.button, button:not(.secondary-button):not(.link-button):not(.day-panel__close) {
  background-color: var(--primary-dark);
  box-shadow: 2px 3px 0 #b9ded9;
}
.button, button:not(.link-button):not(.day-panel__close) {
  position: relative;
  transition: transform .14s ease, box-shadow .14s ease;
}
.button::after, button[type=submit]:not(.secondary-button):not(.link-button)::after {
  content: ''; position: absolute; bottom: 0; right: 0; width: .55rem; height: .55rem;
  background: var(--primary-bg); border-radius: .45rem 0 .9rem 0; pointer-events: none;
}
.salary-actions button::after { display: none; }
button[aria-busy=true], a[aria-busy=true] { opacity: .8; cursor: wait; }
button[aria-busy=true]::before, a[aria-busy=true]::before {
  content: ''; display: inline-block; width: .8rem; height: .8rem; margin-right: .45rem;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  vertical-align: middle; animation: button-wait .7s linear infinite;
}
@keyframes button-wait { to { transform: rotate(360deg); } }
.message.success { animation: sticker-arrive .24s ease-out; }
@keyframes sticker-arrive { from { transform: translateY(3px); opacity: .6; } to { transform: none; opacity: 1; } }
.mobile-planning-list { display: none; }
.planning-full-grid > summary { display: none; }
.button:active, button:not(.link-button):active, .secondary-button:active {
  transform: translateY(2px); box-shadow: none;
}
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--violet); outline-offset: 3px;
}
.mobile-nav { display: none; }
.audit-events-mobile { display: none; }
.console-main { overflow-wrap: anywhere; }
.audit-filters, .audit-filters .field { min-width: 0; }
.audit-filters input, .audit-filters select { min-width: 0; max-width: 100%; }
.console-menu { min-width: 0; position: sticky; top: 5.5rem; }
.console-menu > summary { display: none; }
.console-menu .console-nav { position: static; }
.console-nav { display: block; }
.console-nav a { display: block; min-height: 44px; padding-block: .7rem; }
.console-nav-group { border-top: 1px solid var(--border); margin-top: .4rem; padding-top: .25rem; }
.console-nav-group > summary { display: flex; justify-content: space-between; align-items: center; gap: .6rem; min-height: 44px; padding: .5rem .65rem; cursor: pointer; color: var(--muted); font-weight: 700; font-size: .8rem; list-style: none; }
.console-nav-group > summary::-webkit-details-marker { display: none; }
.console-nav-group > summary::after { content: '+'; font-size: 1rem; }
.console-nav-group[open] > summary::after { content: '−'; }
.console-nav-group:has(a.active) > summary { color: var(--primary-dark); }
.console-nav-group > div { padding: 0 .25rem .3rem .65rem; }
.console-menu-caption { color: var(--muted); font-size: .75rem; font-weight: 500; margin-left: auto; }
.context-help { margin: .5rem 0 1rem; color: var(--muted); font-size: .9rem; }
.context-help > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: .5rem; color: var(--primary-dark); font-weight: 600; }
.context-help > summary::before { content: '+'; }
.context-help[open] > summary::before { content: '−'; }
.context-help p { margin: .25rem 0 .75rem; }
.week-day-overview { margin: 0; font-size: .9rem; font-weight: 600; }
.week-day-extra > summary { cursor: pointer; font-size: .85rem; min-height: 44px; display: flex; align-items: center; }
.week-day-extra { min-width: 0; }
.compact-actions > summary { cursor: pointer; padding: .65rem .8rem; min-height: 44px; color: var(--primary-dark); }
.compact-actions .actions { padding: .5rem 0; }
.salary-figures > :first-child { border-top-color: var(--primary); }
.salary-actions { margin: 1rem 0 1.5rem; }
.defense-quick-test { margin: .5rem 0 1rem; }
.defense-quick-test > summary { min-height: 44px; cursor: pointer; color: var(--primary-dark); font-weight: 600; }
.defense-quick-test > summary span { font-size: .85rem; font-weight: 400; }
.form-submit-status { color: var(--primary-dark); font-size: .9rem; }
.stepper li.is-pending { color: #775217; background: #fff0d4; border-color: transparent; }
.stepper li.is-pending::before { content: "!"; background: #ac711e; color: white; }
.week-day-gap { margin: 0; color: #775217; font-size: .85rem; font-weight: 600; }
.week-review-next { display: grid; gap: .6rem; margin-top: .9rem; }
.week-review-next .help-text { margin: 0; }
.week-review-next .button, .week-review-next form button { width: 100%; text-align: center; }
.unreviewed-warning { flex-basis: 100%; margin: 0; color: #775217; font-size: .85rem; font-weight: 600; }
.copy-button { min-height: 44px; padding: .35rem .6rem; font-size: .8rem; margin-left: .35rem; }
.messages--floating { position: fixed; z-index: 70; left: 1rem; right: 1rem; top: 5rem; margin: 0; }
.week-day-reviewed { white-space: nowrap; }
.table-wrapper { max-width: 100%; }

@media (max-width: 900px) {
  /* Le journal et les derniers événements de l'accueil partagent ce composant. */
  .audit-events-desktop { display: none; }
  .audit-events-mobile { display: grid; gap: .75rem; min-width: 0; }
  .audit-event-card {
    min-width: 0; padding: .85rem 1rem; background: var(--surface);
    border: 1px solid var(--border); border-radius: .8rem;
    border-left: 3px solid var(--primary); overflow-wrap: anywhere;
  }
  .audit-event-card time { display: block; font-size: .8rem; color: var(--muted); }
  .audit-event-card h3 { margin: .3rem 0 .65rem; font-size: 1rem; line-height: 1.4; }
  .audit-event-context { display: grid; grid-template-columns: 3.5rem minmax(0,1fr); gap: .3rem .5rem; margin: 0; font-size: .85rem; }
  .audit-event-card dt { color: var(--muted); }
  .audit-event-card dd { min-width: 0; margin: 0; white-space: normal; }
  .audit-event-details { margin-top: .65rem; border-top: 1px solid var(--border); }
  .audit-event-details summary { display: flex; align-items: center; gap: .5rem; min-height: 44px; cursor: pointer; color: var(--primary-dark); font-weight: 600; font-size: .85rem; list-style: none; }
  .audit-event-details summary::-webkit-details-marker { display: none; }
  .audit-event-details summary::before { content: '+'; }
  .audit-event-details[open] summary::before { content: '−'; }
  .audit-event-details dl { margin: .2rem 0 0; font-size: .85rem; }
  .audit-event-details dt { margin-top: .65rem; font-weight: 600; }
  .audit-event-details dt:first-child { margin-top: 0; }
  .audit-event-details code { font: inherit; font-family: ui-monospace, monospace; white-space: normal; overflow-wrap: anywhere; }
  .console-menu { position: static; border: 1px solid var(--border); background: white; border-radius: .7rem; }
  .console-menu > summary { display: flex; justify-content: space-between; gap: .5rem; align-items: center; min-height: 48px; padding: .65rem .85rem; cursor: pointer; font-weight: 600; font-size: .9rem; }
  .console-menu > summary::after { content: '⌄'; }
  .console-menu[open] > summary::after { content: '⌃'; }
  .console-menu .console-nav { border: 0; border-radius: 0; padding: .25rem .5rem .5rem; }
  .console-menu .console-nav { display: block; }
  .console-nav-group > summary { font-size: .9rem; color: var(--ink); }
  .console-nav-group > div { border-left: 2px solid var(--primary-bg); margin-left: .6rem; padding-left: .5rem; }
  .console-nav-group a { font-weight: 500; font-size: .9rem; }
  .console-nav-group a.active { font-weight: 700; }
  .console-menu .console-nav .eyebrow { display: none; }
  .console { gap: 1rem; }
}

@media (max-width: 760px) {
  :root { --mobile-nav-height: calc(66px + env(safe-area-inset-bottom, 0px)); }
  html { scroll-padding-top: 70px; scroll-padding-bottom: var(--mobile-nav-height); }
  body.has-mobile-nav { padding-bottom: var(--mobile-nav-height); }
  .site-header { flex-direction: row; align-items: center; gap: .5rem; min-height: 56px; padding: .55rem 1rem; animation: none; }
  .site-header .desktop-nav, .has-mobile-nav .site-header > .install-button { display: none; }
  .site-header .brand { font-size: 1.2rem; }
  .brand-mark { width: 1.8rem; height: 1.8rem; animation: none; }
  .site-background { display: none; }
  body { background: var(--background); }
  main.container { margin: 1rem auto; }
  .container { width: calc(100% - 2rem); }
  h1 { font-size: 1.4rem; overflow-wrap: anywhere; margin: .3rem 0 .5rem; }
  h2 { font-size: 1.1rem; }
  .page-heading { gap: .6rem; margin-bottom: .8rem; }
  .page-heading > div { min-width: 0; width: 100%; }
  .page-heading p { margin: .25rem 0; }
  .page-heading .actions { gap: .5rem; }
  .page-heading .eyebrow { font-size: .7rem; }
  .form-card, .stat-card, .list-card, .auth-card, .quick-start, .empty-state { padding: 1rem; border-radius: .8rem; }
  .form-card { margin-bottom: 1rem; }
  .form-card > :first-child { margin-top: 0; }
  .form-card > :last-child { margin-bottom: 0; }
  details.form-card > summary { padding: 1rem; }
  .details-body { padding: 0 1rem 1rem; }
  .notice, .message { padding: .7rem .8rem; font-size: .9rem; }
  .notice ul { padding-left: 1.15rem; }
  .button, button, .secondary-button, input:not([type=checkbox]):not([type=radio]), select { min-height: 44px; }
  input, select, textarea { font-size: 16px; }
  .button, button, .secondary-button { font-size: .9rem; padding: .65rem .85rem; }
  .actions { gap: .6rem; flex-wrap: wrap; }
  .actions form { max-width: 100%; }
  .mobile-nav { position: fixed; z-index: 80; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); align-items: stretch; gap: .2rem; background: white; border-top: 1px solid var(--border); padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -3px 16px #2234380c; }
  .mobile-nav--account { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mobile-nav > a, .mobile-more > summary { min-height: 54px; padding: .3rem; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .1rem; color: var(--muted); font-size: .73rem; font-weight: 650; text-shadow: none; text-decoration: none; border-radius: .65rem; cursor: pointer; list-style: none; }
  .mobile-more > summary::-webkit-details-marker { display: none; }
  .mobile-nav > a > span, .mobile-more > summary > span { font-size: 1.2rem; line-height: 1.2; }
  .mobile-nav > a[aria-current=page], .mobile-more > summary.is-active, .mobile-more[open] > summary { color: var(--primary-dark); background: var(--primary-bg); }
  .mobile-nav > a:hover { transform: none; }
  .mobile-menu { position: absolute; bottom: calc(100% + .5rem); left: .6rem; right: .6rem; max-height: min(70dvh, 32rem); overflow-y: auto; overscroll-behavior: contain; background: white; padding: 1rem; border: 1px solid var(--border); border-radius: 1rem; box-shadow: 0 8px 40px #22343830; }
  .mobile-menu a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: var(--ink); text-shadow: none; border-radius: .4rem; padding: .65rem .5rem; min-height: 44px; font-size: .9rem; font-weight: 500; }
  .mobile-menu a::after { content: '›'; color: var(--primary-dark); }
  .mobile-menu a:hover { background: var(--primary-bg); transform: none; }
  .mobile-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-bottom: .25rem; }
  .mobile-nav .mobile-menu button.mobile-menu-close { color: var(--primary-dark); background: var(--primary-bg); width: 44px; height: 44px; padding: 0; font-size: 1.5rem; border: 0; border-radius: .65rem; box-shadow: none; }
  .mobile-menu-group { border-top: 1px solid var(--border); margin-top: .5rem; padding-top: .5rem; }
  .mobile-menu-group h2 { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .4rem .5rem; }
  .mobile-menu form { margin-top: .6rem; }
  .mobile-menu [hidden] { display: none; }
  .mobile-menu form button { width: 100%; }
  .section-heading { align-items: flex-start; flex-wrap: wrap; gap: .5rem; }
  .section-heading h2 { margin: .25rem 0; }
  .view-toggle { display: flex; flex-wrap: wrap; gap: .25rem; }
  .view-toggle a { padding: .6rem .65rem; font-size: .8rem; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; gap: .25rem; padding: .2rem 0 .6rem; }
  .tabs a { flex: 0 0 auto; white-space: nowrap; padding: .65rem .75rem; font-size: .85rem; }
  .stepper { gap: .25rem; margin-bottom: .75rem; }
  .stepper li { font-size: .72rem; gap: .2rem; padding: .3rem .4rem; }
  .stepper li::before { width: 1.1rem; height: 1.1rem; font-size: .65rem; }
  .month-row { display: grid; gap: .6rem; }
  .month-row .stepper { display: none; }
  .month-row__who h2 { font-size: 1.15rem; }
  .month-row__who p { font-size: .8rem; }
  .month-row__action { display: flex; flex-wrap: wrap; gap: .5rem; }
  .month-row__action > .button { width: 100%; text-align: center; }
  .month-row__action > .secondary-button { border: 0; padding: .4rem 0; box-shadow: none; font-size: .8rem; }
  .week-navigation { margin: .6rem 0; gap: .4rem; display: grid; grid-template-columns: auto 1fr auto; }
  .week-navigation h3 { order: 0; font-size: .8rem; text-align: center; }
  .week-navigation a { font-size: .8rem; padding: .5rem .6rem; }
  .week-days { grid-template-columns: 1fr; gap: .5rem; }
  .week-day { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .3rem .6rem; padding: .65rem .75rem; border-radius: .65rem; }
  .week-day h4 { font-size: .9rem; }
  .week-day h4 span { display: inline; margin: 0 0 0 .25rem; }
  .week-day .day-event { grid-column: 1; font-size: .73rem; width: fit-content; padding: .15rem .4rem; }
  .week-day-overview { grid-column: 1; font-size: .8rem; }
  .week-day-extra { grid-column: 1; grid-row: 2; }
  .week-day-extra[open] { grid-column: 1 / -1; grid-row: 3; }
  .week-day-extra > summary { min-height: 44px; font-size: .75rem; gap: .35rem; flex-wrap: wrap; }
  .week-day-gap, .week-day-note { grid-column: 1 / -1; margin: 0; }
  .period-actions--sticky { position: sticky; bottom: var(--mobile-nav-height); z-index: 5; gap: .35rem; margin: 0 -1rem 1rem; padding: .55rem 1rem; background: var(--background); border-top: 1px solid var(--border); }
  .todo-list__item > .button { display: block; text-align: center; margin-bottom: .35rem; }
  .week-day-details { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem .6rem; }
  .week-day-details dt { margin: 0; }
  .week-day-actions { grid-column: 2; grid-row: 1 / 3; align-self: start; display: flex; align-items: center; gap: .35rem; min-width: 0; }
  .week-day-actions .review-label { display: none; }
  .week-day-actions form button { min-width: 44px; }
  .week-day-actions button, .week-day-actions a { min-height: 44px; padding: .4rem .6rem; font-size: .8rem; }
  .week-day-reviewed { padding: .3rem .5rem; }
  .week-day > .help-text { font-size: .8rem; margin: 0; }
  .week-day > .week-day-add { grid-column: 2; grid-row: 1 / 3; width: auto; padding: .4rem .6rem; }
  .day-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom,0px)); overflow-y: auto; }
  .day-panel__header { padding-right: 3rem; }
  .day-actions { grid-template-columns: 1fr; }
  .day-panel .actions { position: sticky; bottom: -1rem; background: white; padding: .8rem 0; z-index: 2; border-top: 1px solid var(--border); }
  .day-panel .actions > button { width: 100%; }
  .salary-figures { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .salary-figures > :first-child { grid-column: 1 / -1; }
  .salary-figures > :first-child strong { font-size: 2rem; }
  .salary-figures .stat-card { padding: .8rem; }
  .salary-figures .stat-card strong { font-size: 1.25rem; overflow-wrap: anywhere; }
  .salary-figures .stat-card span { font-size: .8rem; }
  .salary-actions { display: grid; }
  .salary-actions button, .salary-actions .button { width: 100%; text-align: center; }
  .salary-actions form button { border-radius: .65rem; box-shadow: none; }
  .copy-list { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .7rem; font-size: .9rem; }
  .copy-list dd { margin: 0; text-align: right; }
  .detail-grid dl { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: .5rem; font-size: .9rem; }
  dd { margin-left: 0; overflow-wrap: anywhere; }
  .defense-summary { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
  .defense-summary .stat-card { padding: .5rem .65rem; flex: 1 1 85px; }
  .console-main .defense-summary .stat-card { padding: .5rem .65rem; }
  .console-main .defense-summary .stat-card strong { font-size: 1rem; }
  .defense-summary .stat-card span { font-size: .75rem; }
  .defense-tabs { flex-wrap: nowrap; overflow-x: auto; padding: .2rem 0 .6rem; }
  .defense-tabs a { white-space: nowrap; flex: 0 0 auto; font-size: .85rem; padding: .6rem .75rem; }
  .defense-item { padding: .85rem 0; }
  .defense-item h3 { font-size: 1rem; }
  .defense-item p { font-size: .85rem; }
  .defense-item form { margin-top: .75rem; }
  .defense-item form button { margin-top: .4rem; }
  .auth-card { margin: 1.5rem auto; }
  .auth-illustration { width: 4rem; height: 4rem; }
  .family-children .actions { gap: .4rem; }
  .table-wrapper { border-radius: .5rem; }
  th, td { padding: .6rem .7rem; font-size: .85rem; }
  .planning-toolbar { padding: .65rem; }
  .planning-toolbar .toolbar-row { flex-wrap: wrap; gap: .5rem; }
  .rhythm-calendar__viewport { max-height: 24rem; }
  .mobile-planning-list { display: grid; gap: .5rem; }
  .mobile-planning-list .form-card { margin: 0; padding: .75rem; }
  .mobile-planning-list h3 { margin: 0; font-size: .95rem; }
  .mobile-planning-list p { margin: .3rem 0 0; font-size: .85rem; }
  .planning-full-grid { margin: .75rem 0; }
  .planning-full-grid > summary { display: flex; align-items: center; min-height: 44px; color: var(--primary-dark); cursor: pointer; }
  .onboarding__next { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  button[aria-busy=true]::before { animation: none; }
  .message.success { animation: none; }
  .button, button, .secondary-button { transition: none; }
  .button:active, button:active, .secondary-button:active { transform: none; }
}

/* Adaptation commune : aucun contenu coupé pour faire tenir la page. */
.mobile-cell-label, .mobile-day-picker, .mobile-calendar-date { display: none; }
@media (max-width: 900px) {
  main, section, article, form, fieldset, .field, .details-body,
  .form-card, .form-grid > *, .detail-grid > *, .console-main { min-width: 0; }
  main { overflow-wrap: anywhere; }
  input, select, textarea { min-width: 0; max-width: 100%; }
  fieldset { margin-inline: 0; }
  legend { max-width: 100%; white-space: normal; }
  pre, code, .error-trace { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
  img, svg, canvas { max-width: 100%; }
  .actions > *, .button, .secondary-button, button { max-width: 100%; white-space: normal; }
  .tabs, .defense-tabs { flex-wrap: wrap; overflow: visible; gap: .35rem; }
  .tabs a, .defense-tabs a { flex: 1 1 8rem; white-space: normal; text-align: center; min-width: 0; }
  .pagination { flex-wrap: wrap; gap: .5rem; }
  .table-wrapper { min-width: 0; }
  .table-wrapper table { table-layout: fixed; overflow-wrap: anywhere; }
  .mobile-card-table, .mobile-card-table tbody { display: block; width: 100%; }
  .mobile-card-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mobile-card-table tbody tr { display: block; padding: .65rem .8rem; border-bottom: 3px solid var(--border); }
  .mobile-card-table tbody tr:last-child { border-bottom: 0; }
  .mobile-card-table tbody td, .mobile-card-table tbody th {
    display: block; width: auto; min-width: 0; padding: .45rem 0; border: 0;
    text-align: left; white-space: normal; font-size: .9rem;
  }
  .mobile-card-table tbody th { color: var(--primary-dark); font-size: 1rem; }
  .mobile-card-table td + td { border-top: 1px solid var(--border); }
  .mobile-cell-label { display: block; color: var(--muted); font-size: .75rem; font-weight: 600; margin-bottom: .2rem; }
  .mobile-cell-value { min-width: 0; }
  .mobile-cell-value a { display: inline-block; padding-block: .35rem; }
  .mobile-card-table caption { display: block; text-align: left; padding: .75rem; }
  .month-calendar, .month-calendar--rhythms { min-width: 0; }
  .month-calendar-header { display: none; }
  .month-calendar-row, .month-calendar--rhythms .month-calendar-row { display: grid; grid-template-columns: minmax(0,1fr); }
  .month-calendar-row + .month-calendar-row { border-top: 3px solid var(--primary-bg); }
  .month-calendar-cell { min-width: 0; min-height: 0; padding: .65rem; }
  .month-calendar-cell.is-outside { display: none; }
  .month-calendar-rhythm .visually-hidden { position: static; width: auto; height: auto; clip: auto; clip-path: none; white-space: normal; }
  .month-calendar-rhythm label { display: block; margin-bottom: .4rem; }
  .desktop-calendar-date { display: none; }
  .mobile-calendar-date { display: inline; }
  .month-calendar-date { display: block; margin-bottom: .35rem; }
  .month-calendar-cell .day-event, .month-calendar-cell .day-add { min-height: 44px; }
  .mobile-day-picker { display: grid; gap: .4rem; margin: .6rem 0; }
  .rhythm-calendar__grid { min-width: 0; grid-template-columns: 3.25rem minmax(0,1fr); }
  .rhythm-calendar__header:not(.is-mobile-day), .rhythm-calendar__day:not(.is-mobile-day) { display: none; }
  .planning-grid { min-width: 0; grid-template-columns: 3.25rem minmax(0,1fr); }
  .planning-grid-header { grid-template-columns: 3.25rem minmax(0,1fr); }
  .planning-grid-header > span:not(:first-child):not(.is-mobile-day), .planning-day-column:not(.is-mobile-day) { display: none; }
  .rhythm-calendar__viewport, .planning-scroll { max-width: 100%; }
  .time-slot-row, .schedule-row, .meal-row { grid-template-columns: minmax(0,1fr); }
  .field-with-action { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
  .field-with-action .field { flex: none; width: 100%; }
  .week-day-actions form { flex: 0 0 auto; min-width: 44px; }
}
@media (max-width: 760px) {
  .form-grid, .detail-grid, .audit-filters { grid-template-columns: minmax(0,1fr); }
  .week-navigation { grid-template-columns: auto minmax(0,1fr) auto; }
  .copy-list { grid-template-columns: minmax(0,1fr); }
  .copy-list dd { text-align: left; margin-bottom: .5rem; }
  .rule-content { padding-left: 0; }
  .month-nav { min-width: 0; }
  .month-nav strong { flex: 1; min-width: 0; text-align: center; }
}

/* Le style blanc de .link-button est réservé à l'en-tête coloré. */
main .link-button:not(.danger-link) { color: var(--primary-dark); text-shadow: none; text-decoration: underline; }
main .link-button { background: none; box-shadow: none; }
.day-event-short, .day-event-check { display: none; }
.rule-group > summary { list-style: none; }
.rule-group > summary::-webkit-details-marker { display: none; }
.rule-group > summary h2 { display: inline; }
@media (max-height: 500px) { .site-header { position: static; } }
@media (max-width: 900px) {
  /* Le calendrier des journées reste une vraie grille du mois. */
  .month-calendar.day-month-calendar { min-width: 0; }
  .day-month-calendar .month-calendar-header { display: grid; }
  .day-month-calendar .month-calendar-row { grid-template-columns: repeat(7, minmax(0,1fr)); }
  .day-month-calendar .month-calendar-row + .month-calendar-row { border-top: 1px solid var(--border); }
  .day-month-calendar .month-calendar-header span { padding: .3rem 0; font-size: .7rem; text-align: center; }
  .day-month-calendar .month-calendar-cell { display: block; min-height: 4.2rem; padding: .1rem; }
  .day-month-calendar .month-calendar-cell.is-outside { display: block; }
  .day-month-calendar .desktop-calendar-date { display: inline; }
  .day-month-calendar .mobile-calendar-date { display: none; }
  .day-month-calendar .month-calendar-date { margin: 0; text-align: center; font-size: .75rem; }
  .day-month-calendar .day-event, .day-month-calendar .day-add { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: .1rem; font-size: .66rem; line-height: 1.15; text-align: center; overflow-wrap: normal; }
  .day-month-calendar .day-event-label { display: none; }
  .day-month-calendar .day-event-short, .day-month-calendar .day-event-check { display: block; }
}
@media (max-width: 760px) {
  .period-employer { display: none; }
  .week-nav-label { display: none; }
  .week-navigation a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  /* Liste : une ligne par journée, les détails s'ajoutent seulement s'ils diffèrent. */
  .day-table, .day-table tbody { display: block; width: 100%; }
  .day-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .day-table tbody tr { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; align-items: center; gap: 0 .4rem; padding: .35rem .55rem; border-bottom: 1px solid var(--border); }
  .day-table tbody tr:last-child { border-bottom: 0; }
  .day-table td { display: block; padding: 0; border: 0; font-size: .85rem; }
  .day-table__date { grid-column: 1; grid-row: 1; font-weight: 700; }
  .day-table__type { grid-column: 1; grid-row: 2; color: var(--muted); font-size: .78rem !important; }
  .day-table__actual { grid-column: 2; grid-row: 1 / 3; white-space: nowrap; font-weight: 600; }
  .day-table__review { grid-column: 3; grid-row: 1 / 3; }
  .day-table__action { grid-column: 4; grid-row: 1 / 3; }
  .day-table__amount, .day-table .is-same { display: none !important; }
  .day-table__planned, .day-table__extra { grid-column: 1 / -1; color: #775217; font-weight: 600; font-size: .8rem !important; }
  .day-table__planned::before { content: "Prévu "; }
  .day-table__extra::before { content: "En plus "; }
  .day-table .review-label { display: none; }
  .day-table button { min-width: 44px; padding: .3rem .5rem; }
  .day-table .week-day-reviewed { display: inline-block; padding: .3rem .5rem; }
  .day-table__action a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: .3rem; font-size: .8rem; }
  /* Zones tactiles et alignements communs. */
  .back-link { display: inline-flex; align-items: center; min-height: 44px; margin: -.65rem 0 -.25rem; }
  .step-button { width: 44px; height: 44px; }
  .view-toggle a { display: inline-flex; align-items: center; min-height: 44px; }
  .tabs a, .defense-tabs a { display: flex; align-items: center; justify-content: center; min-height: 44px; }
  main summary { min-height: 44px; box-sizing: border-box; padding-block: .6rem; }
  .mobile-cell-value a, .section-heading a, .audit-event-card h3 a, main .actions a, .family-children a, .list-card .actions a { display: inline-flex; align-items: center; min-height: 44px; }
  .actions .button, .actions .secondary-button, .salary-actions a { justify-content: center; text-align: center; }
  .salary-actions--pair { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .salary-actions--pair > .unreviewed-warning { grid-column: 1 / -1; }
  .copy-list dd[data-copy] { display: flex; align-items: center; gap: .4rem; }
  .copy-button { flex: none; margin-left: auto; }
  .todo-list__item > a:not(.button) { display: flex; align-items: center; min-height: 44px; }
  .mobile-cell-value a { min-width: 44px; }
  .leave-stats { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: .5rem; }
  .leave-stats .stat-card { padding: .7rem .8rem; margin: 0; }
  .leave-stats .stat-card strong { font-size: 1.25rem; }
  .leave-stats .stat-card span { font-size: .78rem; }
  .rule-group { border-bottom: 1px solid var(--border); }
  .rule-group > summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; cursor: pointer; }
  .rule-group > summary::after { content: '+'; color: var(--primary-dark); font-weight: 700; }
  .rule-group[open] > summary::after { content: '−'; }
  .rule-group > summary h2 { display: block; margin: 0; font-size: 1rem; }
}

/* Utilisateurs : trois colonnes utiles, l'identité dispose de la place principale. */
.accounts-table td { vertical-align: top; }
.accounts-table .account-email { margin: .4rem 0; overflow-wrap: anywhere; }
.accounts-table .badge { margin-block: .15rem; }
.accounts-table time { white-space: nowrap; }
@media (min-width: 901px) {
  .accounts-table { table-layout: fixed; }
  .accounts-table th, .accounts-table td { padding: .85rem .75rem; }
  .accounts-table th:first-child { width: 40%; }
  .accounts-table th:nth-child(2) { width: 32%; }
  .accounts-table th:nth-child(3) { width: 28%; }
}

/* Les rôles restent lisibles quel que soit leur nombre. */
.role-cards { display: grid; grid-template-columns: minmax(0,1fr); gap: 1rem; }
.role-card { min-width: 0; margin: 0; }
.role-card-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.role-card-heading > div { flex: 1 1 12rem; min-width: 0; }
.role-card-heading h2 { margin: 0; overflow-wrap: anywhere; }
.role-card-heading p { margin: .4rem 0; }
.role-permissions { margin-top: .65rem; border-top: 1px solid var(--border); }
.role-permissions summary { min-height: 44px; padding-block: .65rem; cursor: pointer; color: var(--primary-dark); font-weight: 600; }
.role-permissions ul { list-style: none; margin: 0; padding: 0; }
.role-permissions li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .3rem 1rem; padding-block: .65rem; border-top: 1px solid var(--border); }
.role-permissions li > :first-child { flex: 1 1 14rem; min-width: 0; }
.role-permission-yes { color: var(--primary-dark); font-weight: 600; }
.role-permission-no { color: var(--muted); }
@media (min-width: 1200px) { .role-cards { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; } }

/* Erreurs : chaque signalement utilise la largeur disponible. */
.error-report-list { display: grid; gap: 1rem; }
.error-report-card { min-width: 0; margin: 0; }
.error-report-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.error-report-heading > div { flex: 1 1 16rem; min-width: 0; }
.error-report-heading time { color: var(--muted); font-size: .85rem; }
.error-report-heading h2 { margin: .3rem 0; font-size: 1.1rem; }
.error-report-heading p { margin: .3rem 0; }
.error-report-fields { margin: .85rem 0 0; border-top: 1px solid var(--border); }
.error-report-fields dt { margin-top: .75rem; font-size: .8rem; }
.error-report-fields dd { margin: .2rem 0 0; font-weight: 500; overflow-wrap: anywhere; }
.error-report-fields code { white-space: pre-wrap; overflow-wrap: anywhere; }
.console-main .error-trace { white-space: pre-wrap; overflow-wrap: anywhere; }
