/* YESBY CALENDAR — styles communs, clair / sombre automatique. */
:root { color-scheme: light dark; font: 16px/1.5 system-ui, sans-serif; --accent: #3282db; --danger: #c0392b; --line: #7f8a9b50; --panel: light-dark(#fff, #1e293b); }
* { box-sizing: border-box; }
body { margin: 0; background: light-dark(#f6f8fc, #121720); color: light-dark(#172032, #f1f5f9); }
a { color: var(--accent); }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 14px 24px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; color: inherit; text-decoration: none; letter-spacing: .02em; }
.topbar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.topbar nav a { color: inherit; text-decoration: none; }
.topbar nav a.active { color: var(--accent); font-weight: 700; }
main { max-width: 1100px; margin: 32px auto; padding: 0 20px; }
h1 { margin: 0 0 18px; }
h2 { margin: 0 0 14px; font-size: 1.2rem; }
h3 { margin: 22px 0 10px; font-size: 1rem; }
.panel { padding: 22px; margin-bottom: 22px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; }
.panel.narrow { max-width: 460px; margin: 40px auto; }
.muted { color: light-dark(#5b6678, #94a3b8); font-size: .92em; }
.flash { padding: 12px 16px; border-radius: 10px; border: 1px solid; }
.flash-success { color: light-dark(#14633a, #86efac); border-color: #22c55e80; background: light-dark(#f0fdf4, #052e1680); }
.flash-error { color: light-dark(#a1251b, #fca5a5); border-color: #ef444480; background: light-dark(#fef2f2, #450a0a80); }
.form { display: grid; gap: 14px; }
.form.grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); align-items: end; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
input, select { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: light-dark(#fff, #0f172a); color: inherit; }
input[type=color] { padding: 2px; height: 42px; }
input[type=checkbox] { width: 18px; height: 18px; }
/* Les champs s'adaptent à leur colonne au lieu de déborder (grilles de formulaires). */
label { min-width: 0; }
label:not(.check) > input, label:not(.check) > select, label > textarea { width: 100%; min-width: 0; }
.btn { display: inline-block; font: inherit; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.danger { color: var(--danger); border-color: #c0392b80; }
.btn.small { padding: 4px 10px; font-size: .88rem; }
button.link { font: inherit; border: 0; background: none; padding: 0; color: inherit; cursor: pointer; }
form.inline, details.inline { display: inline-block; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.actions { white-space: nowrap; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: #7f8a9b30; }
.role-owner { background: #3282db30; } .role-admin { background: #a855f730; } .role-editor { background: #22c55e30; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; }
.calendar-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { font-weight: 600; }
.trash-empty { margin-top: 16px; text-align: right; }
.checks { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.checks .ok { color: light-dark(#14633a, #86efac); } .checks .ko { color: var(--danger); font-weight: 700; }
input.copy { width: 100%; font-family: ui-monospace, monospace; font-size: .9rem; }
.link-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.connect { margin-top: 14px; }
.conflict { color: var(--danger); }
.topbar nav a[href*="page=conflicts"] { color: var(--danger); font-weight: 700; }
table.compare th[scope], table.compare tbody th { width: 120px; color: light-dark(#5b6678, #94a3b8); font-weight: 600; }
table.compare td { width: 44%; overflow-wrap: anywhere; }
table.compare tr.diff td { background: light-dark(#fff7e6, #3b2a0a); }
.conflict-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 14px; }
@media (max-width: 640px) { .topbar { padding: 12px 16px; } main { margin: 20px auto; padding: 0 12px; } .panel { padding: 16px; } }
