[x-cloak] { display: none !important; }

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

/* Cibles tactiles confortables sur mobile */
@media (max-width: 767px) {
  input, select, textarea, button { min-height: 44px; }
}

/* Documents imprimables (états de dépôt, rapports) */
@media print {
  aside, header, nav, .no-print { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  main { padding: 0 !important; max-width: none !important; }
  div[class*="md:pl-60"] { padding-left: 0 !important; }
}

/* Fenêtre de confirmation (public/assets/js/confirm.js) */
.lk-confirm { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(28, 25, 23, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: lk-fade .14s ease-out; }
.lk-confirm.lk-out { opacity: 0; transition: opacity .12s ease-in; }
.lk-confirm-card { width: 100%; max-width: 26rem; background: #fff; color: #1c1917; border-radius: 18px; padding: 22px 22px 18px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .35); animation: lk-pop .16s ease-out; }
.lk-confirm-title { margin: 0; font-size: 1.05rem; font-weight: 700; }
.lk-confirm-text { margin: 8px 0 0; font-size: .95rem; line-height: 1.45; color: #57534e; }
.lk-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.lk-btn { font: inherit; font-weight: 600; font-size: .9rem; padding: 9px 16px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; min-height: 40px; }
.lk-btn:focus-visible { outline: 3px solid #cd5962; outline-offset: 2px; }
.lk-btn-ghost { background: #fff; color: #44403c; border-color: #d6d3d1; }
.lk-btn-ghost:hover { background: #f5f5f4; }
.lk-btn-main { background: #b8434d; color: #fff; }
.lk-btn-main:hover { background: #9c3640; }
.dark .lk-confirm-card { background: #1c1917; color: #f5f5f4; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .7); }
.dark .lk-confirm-text { color: #d6d3d1; }
.dark .lk-btn-ghost { background: #292524; color: #e7e5e4; border-color: #44403c; }
.dark .lk-btn-ghost:hover { background: #44403c; }
@media (max-width: 480px) { .lk-confirm { align-items: flex-end; } .lk-confirm-card { border-radius: 18px 18px 0 0; max-width: none; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .lk-confirm-actions { flex-direction: column-reverse; } .lk-btn { width: 100%; } }
@keyframes lk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lk-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lk-confirm, .lk-confirm-card { animation: none; } }

/* ---- Mobile : tableaux en cartes (public/assets/js/mobile.js), page jamais plus large que l'écran ---- */
@media (max-width: 767px) {
  html, body { overflow-x: hidden; }
  .rc-wrap { overflow: visible !important; background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
  table.rc, table.rc tbody, table.rc tfoot { display: block; width: 100% !important; min-width: 0 !important; }
  table.rc caption { display: block; padding: 0 2px .5rem; }
  table.rc thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.rc tr { display: block; margin: 0 0 .75rem; padding: .35rem .9rem .5rem; background: #fff; border: 1px solid #e7e5e4 !important; border-radius: 14px; }
  table.rc tfoot tr { background: #fafaf9; font-weight: 600; }
  table.rc td { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .32rem 0 !important; border: 0 !important; text-align: right; min-width: 0; white-space: normal !important; }
  table.rc td::before { content: attr(data-label); flex: 0 0 auto; max-width: 46%; text-align: left; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #78716c; }
  table.rc td[data-label=""]::before { display: none; }
  table.rc td.rc-title { display: block; text-align: left; padding: .35rem 0 .45rem !important; margin-bottom: .2rem; font-size: 1rem; font-weight: 600; border-bottom: 1px solid #f0efed !important; }
  table.rc td.rc-title::before { display: none; }
  table.rc td.rc-act { display: block; text-align: right; padding-top: .55rem !important; }
  table.rc td.rc-empty { display: none; }
  table.rc td > a, table.rc td > span { max-width: 100%; overflow-wrap: anywhere; }
  table.rc input:not([type=checkbox]):not([type=radio]), table.rc select { max-width: 11rem; }
  .dark table.rc tr { background: #1c1917; border-color: #292524 !important; }
  .dark table.rc tfoot tr { background: #292524; }
  .dark table.rc td::before { color: #a8a29e; }
  .dark table.rc td.rc-title { border-color: #292524 !important; }
}

/* Mobile : champs date / heure et colonnes de grille qui ne dépassent jamais leur cadre (iOS ignore la largeur des champs date) */
@media (max-width: 767px) {
  input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] {
    -webkit-appearance: none; appearance: none; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; text-align: left; line-height: 1.4;
  }
  input[type="date"]::-webkit-date-and-time-value, input[type="datetime-local"]::-webkit-date-and-time-value { text-align: left; min-height: 1.4em; }
  .grid > *, .flex > * { min-width: 0; }
  input, select, textarea { max-width: 100%; }
}

/* Cases à cocher et boutons radio : taille confortable au doigt, jamais écrasés par un texte long (flex), aux couleurs de LIKO */
input[type="checkbox"], input[type="radio"] {
  width: 1.375rem; height: 1.375rem; flex: 0 0 auto; min-width: 1.375rem; min-height: 0; accent-color: #b8434d; cursor: pointer;
}
@media (max-width: 767px) {
  input[type="checkbox"], input[type="radio"] { width: 1.625rem; height: 1.625rem; min-width: 1.625rem; }
}
