/* Pulsar · feuille de style unique (charte thotcomputed.com : crème, vert profond, bordeaux ; Raleway et Fraunces). */
@font-face { font-family: 'Raleway'; src: url('../fonts/Raleway-Regular.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('../fonts/Fraunces-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('../fonts/Fraunces-Italic.ttf') format('truetype'); font-style: italic; font-display: swap; }

:root {
  --bg: #F4F7ED; --card: #FFFFFF; --ink: #142729; --muted: #5E716F; --line: #DCE4D6; --soft: #EAF0E2;
  --teal: #528E88; --mint: #95C6B0; --green: #71A253; --accent: #AB1933; --accent-2: #DC153D;
  --ok: #2E8B57; --warn: #C58A12; --err: #C0263B; --info: #3D6EA8;
  --radius: 14px; --shadow: 0 1px 2px rgba(20, 39, 41, .06), 0 8px 24px rgba(20, 39, 41, .06);
  --side: 15.5rem; --c: var(--teal);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0F1E20; --card: #162A2D; --ink: #EEF3E8; --muted: #9CB0AC; --line: #26403F; --soft: #1C3437;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1E20; --card: #162A2D; --ink: #EEF3E8; --muted: #9CB0AC; --line: #26403F; --soft: #1C3437;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 Raleway, system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: var(--teal); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6rem; }
h1 { font: 400 1.9rem/1.15 Fraunces, Georgia, serif; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8rem; }
small, .muted { color: var(--muted); }
.small { font-size: .85rem; }
code, pre { font-family: ui-monospace, 'JetBrains Mono', Consolas, monospace; font-size: .85em; }
pre { white-space: pre-wrap; background: var(--soft); padding: .8rem; border-radius: 10px; margin: 0 0 .8rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --------------------------------------------------------------- Mise en page */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 1.2rem .9rem; background: var(--ink); color: #EEF3E8; display: flex; flex-direction: column; gap: 1rem; }
:root[data-theme="dark"] .side { background: #0A1617; }
.brand { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; font: 400 1.5rem Fraunces, serif; padding: 0 .4rem; }
.pulse { width: .8rem; height: .8rem; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); position: relative; flex: none; }
.pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--accent-2); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 10px; color: #CFDCD6; text-decoration: none; font-weight: 600; transition: background .15s, color .15s, transform .15s; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; transform: translateX(2px); }
.nav a[aria-current="page"] { background: rgba(149, 198, 176, .16); color: #fff; box-shadow: inset 3px 0 0 var(--mint); }
.nav .ico { width: 1.15rem; text-align: center; opacity: .85; }
.nav-title { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #8FA8A2; padding: .6rem .7rem .2rem; }
.side-foot { margin-top: auto; font-size: .8rem; color: #8FA8A2; padding: 0 .5rem; }
.main { min-width: 0; padding: 1.4rem clamp(1rem, 3vw, 2.4rem) 4rem; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-bottom: 1.2rem; }
.topbar .grow { flex: 1; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.page-head p { margin: 0; color: var(--muted); }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(18rem, 85vw); z-index: 50; transform: translateX(-105%); transition: transform .25s ease; }
  .side.is-open { transform: none; box-shadow: 0 0 0 100vw rgba(0, 0, 0, .35); }
  .menu-toggle { display: inline-flex; }
}

/* --------------------------------------------------------------- Composants */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; }
.card + .card { margin-top: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: .8rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); }
.kpi strong { display: block; font: 400 1.9rem/1.1 Fraunces, serif; }
.kpi span { color: var(--muted); font-size: .85rem; }

button, .btn { font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.3rem; padding: .45rem .95rem; border-radius: 10px; border: 1px solid transparent; background: var(--ink); color: #fff; cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s, opacity .15s; }
:root[data-theme="dark"] button:not(.ghost):not(.danger):not(.primary), :root[data-theme="dark"] .btn:not(.ghost):not(.danger):not(.primary) { background: #2C4A4D; }
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(20, 39, 41, .15); }
button:active, .btn:active { transform: translateY(0); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.ghost:hover { background: var(--soft); }
.danger { background: var(--err); }
.ok-btn { background: var(--ok); }
.tiny { min-height: 1.9rem; padding: .25rem .6rem; font-size: .85rem; border-radius: 8px; }
.link-btn { background: none; border: 0; color: var(--teal); padding: 0; min-height: 0; font-weight: 600; }
.link-btn:hover { transform: none; box-shadow: none; text-decoration: underline; }

label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; min-height: 2.4rem; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(82, 142, 136, .2); }
.field { margin-bottom: .9rem; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.check { display: flex; align-items: flex-start; gap: .5rem; font-weight: 500; }
.check input { margin-top: .25rem; width: 1.05rem; height: 1.05rem; accent-color: var(--teal); flex: none; }
.inline-form { display: inline; }
.error { color: var(--err); font-size: .85rem; margin-top: .25rem; }
.alert { border-radius: 12px; padding: .7rem 1rem; margin-bottom: 1rem; border: 1px solid; }
.alert.ok { background: rgba(46, 139, 87, .08); border-color: rgba(46, 139, 87, .3); }
.alert.err { background: rgba(192, 38, 59, .07); border-color: rgba(192, 38, 59, .3); }
.alert.warn { background: rgba(197, 138, 18, .08); border-color: rgba(197, 138, 18, .35); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--soft); }
.table-wrap { overflow-x: auto; }

.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 700; padding: .12rem .55rem; border-radius: 999px; background: var(--soft); color: var(--ink); white-space: nowrap; }
.badge.s-draft { background: #ECEFEA; color: #526361; }
.badge.s-reviewed { background: #E4EEF7; color: #2E5C8A; }
.badge.s-validated { background: #E1F2E7; color: #1F6E44; }
.badge.s-queued, .badge.s-publishing { background: #FFF4D8; color: #8A5C00; }
.badge.s-published { background: linear-gradient(135deg, #DDF3E5, #CBEBD8); color: #135C37; }
.badge.s-failed { background: #FBE3E7; color: #A11A30; }
.badge.s-done { background: #E7E3F7; color: #4A3C8C; }
.badge.s-cancelled { background: #EEE; color: #888; text-decoration: line-through; }
:root[data-theme="dark"] .badge { filter: saturate(.9) brightness(.85); }
.dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--c); display: inline-block; flex: none; }
.chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; padding: .15rem .55rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); }
.net { font-size: .72rem; font-weight: 800; letter-spacing: .03em; padding: .1rem .45rem; border-radius: 6px; background: var(--soft); color: var(--muted); text-transform: uppercase; }

/* --------------------------------------------------------------- Cockpit */
.day-nav { display: flex; align-items: center; gap: .4rem; }
.day-nav h1 { margin: 0 .4rem; }
.slot { display: grid; grid-template-columns: 4.2rem 1fr; gap: .8rem; margin-bottom: 1rem; }
.slot-time { font: 400 1.25rem Fraunces, serif; color: var(--muted); padding-top: .8rem; }
.post-card { position: relative; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; animation: rise .35s ease both; }
.post-card + .post-card { margin-top: .8rem; }
.post-card.is-validated { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.post-card.is-published { background: linear-gradient(180deg, color-mix(in srgb, var(--ok) 6%, var(--card)), var(--card)); }
.post-card.is-failed { border-color: color-mix(in srgb, var(--err) 50%, var(--line)); }
.post-card.is-blocked .blockers { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pc-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.pc-head .title { font-weight: 700; flex: 1; min-width: 12rem; }
.pc-body { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 1rem; }
@media (max-width: 1100px) { .pc-body { grid-template-columns: 1fr; } }
.pc-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.blockers { display: none; margin: .6rem 0 0; padding: .6rem .8rem; border-radius: 10px; background: rgba(192, 38, 59, .07); color: var(--err); font-size: .85rem; }
.blockers ul { margin: 0; padding-left: 1.1rem; }
.validate-toggle { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; cursor: pointer; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); transition: background .15s; }
.validate-toggle input { width: 1.15rem; height: 1.15rem; accent-color: var(--ok); }
.validate-toggle:has(input:checked) { background: rgba(46, 139, 87, .1); border-color: rgba(46, 139, 87, .4); }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty .big { font: 400 2.2rem Fraunces, serif; color: var(--ink); display: block; margin-bottom: .4rem; }

/* Aperçus fidèles au réseau */
.preview { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; font-size: .88rem; perspective: 900px; }
.preview .pv-head { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; }
.preview .avatar { width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.preview .pv-name { font-weight: 700; line-height: 1.1; }
.preview .pv-sub { color: var(--muted); font-size: .75rem; }
.preview .pv-text { padding: 0 .7rem .6rem; white-space: pre-wrap; word-break: break-word; }
.preview .pv-text .more { color: var(--muted); font-weight: 700; cursor: pointer; }
.preview .pv-img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--soft); }
.preview.net-x .pv-img, .preview.net-bluesky .pv-img, .preview.net-mastodon .pv-img { aspect-ratio: 16 / 10; border-radius: 12px; margin: 0 .7rem .7rem; width: calc(100% - 1.4rem); }
.preview.net-instagram .pv-img, .preview.net-tiktok .pv-img { aspect-ratio: 4 / 5; }
.preview.net-tiktok .pv-img, .preview.net-youtube .pv-img { aspect-ratio: 9 / 16; max-height: 20rem; }
.preview .pv-foot { padding: .4rem .7rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; display: flex; gap: .8rem; }
.preview .pv-comment { padding: .45rem .7rem; background: var(--soft); font-size: .8rem; }
.flip { transition: transform .5s cubic-bezier(.2, .7, .2, 1); transform-style: preserve-3d; }
.flip.is-flipped { transform: rotateY(180deg); }
.thumbs { display: flex; gap: .3rem; flex-wrap: wrap; }
.thumbs img { width: 3.2rem; height: 4rem; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

/* --------------------------------------------------------------- Calendrier */
.cal-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.seg a { padding: .4rem .8rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.seg a[aria-current="true"] { background: var(--ink); color: #fff; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.day-col { background: var(--card); border: 1px solid var(--line); border-radius: 12px; min-height: 12rem; padding: .5rem; transition: background .15s, border-color .15s; }
.day-col.is-today { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.day-col.is-over { background: color-mix(in srgb, var(--teal) 10%, var(--card)); border-style: dashed; border-color: var(--teal); }
.day-col h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: flex; justify-content: space-between; }
.month .day-col { min-height: 6.6rem; padding: .35rem; border-radius: 8px; }
.month .day-col.is-out { opacity: .45; }
.ev { display: block; position: relative; padding: .3rem .45rem .3rem .6rem; margin-bottom: .3rem; border-radius: 8px; background: color-mix(in srgb, var(--c) 12%, var(--card)); border-left: 3px solid var(--c); color: var(--ink); text-decoration: none; font-size: .8rem; line-height: 1.3; cursor: grab; transition: transform .12s, box-shadow .12s; }
.ev:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0, 0, 0, .08); }
.ev.is-dragging { opacity: .5; }
.ev .t { font-weight: 800; font-variant-numeric: tabular-nums; }
.ev img { float: right; width: 1.8rem; height: 2.2rem; object-fit: cover; border-radius: 4px; margin-left: .3rem; }
.ev.st-published { opacity: .75; }
.ev.st-failed { outline: 2px solid var(--err); }
.ev.st-validated::after { content: '✓'; position: absolute; top: .2rem; right: .35rem; color: var(--ok); font-weight: 900; }
.ev.compact { padding: .15rem .35rem; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-link { font-size: .72rem; color: var(--muted); }
.year { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.heat a { aspect-ratio: 1; border-radius: 4px; background: var(--soft); display: block; position: relative; }
.heat a.l1 { background: color-mix(in srgb, var(--teal) 30%, var(--soft)); }
.heat a.l2 { background: color-mix(in srgb, var(--teal) 60%, var(--soft)); }
.heat a.l3 { background: var(--teal); }
.heat a.l4 { background: var(--accent); }
.heat a.today { outline: 2px solid var(--ink); }
.legend { display: flex; gap: .4rem; align-items: center; font-size: .78rem; color: var(--muted); }
.legend i { width: .8rem; height: .8rem; border-radius: 3px; display: inline-block; }

/* --------------------------------------------------------------- Statistiques */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: Raleway, sans-serif; }
.chart .grid-line { stroke: var(--line); }
.bar { transition: opacity .15s; }
.bar:hover { opacity: .8; }
.spark { width: 6rem; height: 1.6rem; }

/* --------------------------------------------------------------- Toasts */
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 70; display: grid; gap: .5rem; width: min(24rem, calc(100vw - 2rem)); }
.toast { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: start; padding: .75rem .9rem; border-radius: 12px; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); animation: toast-in .35s cubic-bezier(.2, .8, .2, 1) both; }
.toast.out { animation: toast-out .3s ease forwards; }
.toast .ti { font-size: 1.1rem; line-height: 1; }
.toast.success { border-left: 5px solid var(--ok); }
.toast.error { border-left: 5px solid var(--err); }
.toast.warning { border-left: 5px solid var(--warn); }
.toast.info { border-left: 5px solid var(--info); }
.toast button { min-height: 0; padding: .1rem .4rem; }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* --------------------------------------------------------------- Divers */
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .55rem .9rem; color: var(--muted); text-decoration: none; font-weight: 700; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 2rem 1fr; gap: .6rem; align-items: start; }
.steps-list li::before { content: counter(s); width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-weight: 800; }
.steps-list li.done::before { content: '✓'; background: var(--ok); color: #fff; }
.progress { height: .5rem; border-radius: 999px; background: var(--soft); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--mint)); width: 0; transition: width .6s ease; }
.pause-banner { background: repeating-linear-gradient(-45deg, var(--accent), var(--accent) 12px, var(--accent-2) 12px, var(--accent-2) 24px); color: #fff; padding: .55rem 1rem; border-radius: 12px; font-weight: 700; margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(1200px 600px at 10% -10%, rgba(149, 198, 176, .35), transparent), radial-gradient(900px 500px at 110% 110%, rgba(171, 25, 51, .15), transparent), var(--bg); }
.auth .card { width: min(26rem, 100%); padding: 2rem; animation: rise .5s ease both; }
.auth .brand { color: var(--ink); justify-content: center; margin-bottom: 1.2rem; font-size: 2rem; }
.code-input { font: 400 2rem/1 Fraunces, serif !important; letter-spacing: .4em; text-align: center; }
details.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: .2rem .9rem; }
details.panel + details.panel { margin-top: .6rem; }
details.panel summary { cursor: pointer; font-weight: 700; padding: .55rem 0; }
.diff-ok { color: var(--ok); }
.diff-ko { color: var(--err); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 14px; border-radius: 2px; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .2; } }

/* Visites guidées (comme Greencelium) */
.tour-dock { position: fixed; left: calc(var(--side) + 1rem); bottom: 1rem; z-index: 45; }
@media (max-width: 900px) { .tour-dock { left: 1rem; } }
.tour-launch { width: 2.75rem; height: 2.75rem; min-height: 0; padding: 0; border-radius: 50%; font-size: 1.2rem; font-weight: 800; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.tour-menu { position: fixed; inset: auto auto 4.3rem calc(var(--side) + 1rem); margin: 0; padding: .8rem; width: min(18rem, calc(100vw - 2rem)); border: 1px solid var(--line); border-radius: 1rem; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.tour-menu:popover-open { display: grid; gap: .45rem; }
.tour-menu-title { margin: 0 0 .2rem; font-weight: 700; }
.tour-menu button { justify-self: stretch; text-align: left; justify-content: flex-start; }
.tour-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(15, 30, 32, .45); }
.tour-spot { position: absolute; z-index: 61; border-radius: .9rem; outline: 3px solid var(--mint); box-shadow: 0 0 0 9999px rgba(15, 30, 32, .45); pointer-events: none; transition: top .25s, left .25s, width .25s, height .25s; }
.tour-card { position: absolute; z-index: 62; width: min(22rem, calc(100vw - 1rem)); padding: 1rem 1.1rem; border-radius: 1rem; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 .6rem 1.6rem rgba(0, 0, 0, .3); }
.tour-card.centered { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.tour-title { margin: 0 0 .4rem; font-size: 1.15rem; }
.tour-text { margin: 0 0 .9rem; }
.tour-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.tour-count { font-size: .8rem; color: var(--muted); }
.tour-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.touring .toasts { visibility: hidden; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  @view-transition { navigation: none; }
}
@media print { .side, .topbar, .toasts, .tour-dock, .pc-actions { display: none !important; } .shell { display: block; } }

/* Sélecteur de projets commun (sous la barre du haut des écrans qui traitent des projets). */
.project-picker { margin: 0 0 1rem; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: .35rem 0; }
.project-picker fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.project-picker legend { float: left; font-size: .8rem; color: var(--muted); margin-right: .3rem; font-weight: 600; }
.pp-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; user-select: none; transition: background .15s, border-color .15s, box-shadow .15s; font-weight: 500; }
.pp-chip:hover { border-color: var(--c, var(--teal)); }
.pp-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pp-chip:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.pp-chip.is-on { border-color: var(--c, var(--ink)); box-shadow: inset 0 0 0 1px var(--c, var(--ink)); background: color-mix(in srgb, var(--c, var(--ink)) 12%, var(--card)); font-weight: 700; }
button.pp-chip { font: inherit; font-size: .85rem; }
.pp-all.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.project-picker.is-busy { opacity: .6; transition: opacity .2s; }
.danger-zone { border-color: rgba(192, 38, 59, .35); }
.project-card { transition: transform .15s, box-shadow .15s; }
.project-card:hover { transform: translateY(-2px); }
.project-grid { align-items: stretch; margin-bottom: 1rem; }
.project-grid > .card { margin: 0; }
a.project-card, a.project-card:hover { text-decoration: none; color: inherit; display: block; }
a.project-card h2 { margin: 0; }
.new-project > summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; }
.new-project > summary::-webkit-details-marker { display: none; }
.new-project[open] > summary { margin-bottom: .8rem; }
.new-project { margin-bottom: 1rem; }
form.card > fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.version-proposal { background: var(--soft); border-radius: 10px; padding: .5rem .6rem; margin-top: .4rem; }
.ai-revise > summary { cursor: pointer; font-weight: 700; list-style: none; }
.ai-revise > summary::-webkit-details-marker { display: none; }
.ai-revise[open] > summary { margin-bottom: .8rem; }
.ai-revise { margin-top: 1rem; }

/* Champs de mot de passe : bouton « œil » (public/js/password.js). */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 2.8rem; }
.pw-wrap .pw-toggle { position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); min-height: 0; padding: .35rem; border: 0; background: transparent; color: var(--muted); border-radius: 8px; box-shadow: none; }
.pw-wrap .pw-toggle:hover, .pw-wrap .pw-toggle:active { transform: translateY(-50%); box-shadow: none; color: var(--ink); }
.pw-wrap .pw-toggle:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.pw-wrap .pw-toggle[aria-pressed="true"] { color: var(--teal); }
