/* En Règle — papier, encre, tampon. */
@font-face { font-family: Fraunces; src: url(/fonts/fraunces/fraunces-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Fraunces; src: url(/fonts/fraunces/fraunces-latin-wght-italic.woff2) format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url(/fonts/public-sans/public-sans-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #f5f1e8; --paper-2: #ece6d8; --surface: #fffdf8; --ink: #1b2a2f; --muted: #5a6767; --line: #dcd5c4; --line-soft: #e9e3d4;
  --green: #1d5a48; --green-dark: #143f33; --green-soft: #e1eee6;
  --red: #b23a1c; --red-soft: #f9e3da; --amber: #8f5f0a; --amber-soft: #f7ebcd; --slate: #44586a; --slate-soft: #e4eaee;
  --plum: #6b3d69; --rust: #a04e24; --teal: #1c6b73; --blue: #2b5a88;
  --serif: Fraunces, Georgia, 'Times New Roman', serif;
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 10px; --shadow: 0 1px 0 rgba(27, 42, 47, .04), 0 8px 24px -16px rgba(27, 42, 47, .25);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; line-height: 1.15; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0 0 .8em; text-wrap: pretty; }
a { color: var(--green); text-underline-offset: 2px; }
a:hover { color: var(--green-dark); }
small { font-size: .84rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: .6rem 0; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }
mark { background: var(--amber-soft); color: var(--amber); padding: 0 .25em; border-radius: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: #fff; padding: .5rem .8rem; border-radius: 6px; z-index: 100; }
.skip:focus { left: .5rem; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; }
.muted { color: var(--muted); }
.text-late { color: var(--red); }
.text-warn { color: var(--amber); }
.opt { color: var(--muted); font-weight: 400; font-size: .82em; }
.eyebrow { font-size: .78rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--green); margin: 0 0 .7rem; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: 600 .94rem/1 var(--sans); padding: .68rem 1rem; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--green); color: var(--green-dark); }
.btn-quiet { background: transparent; color: var(--green); }
.btn-quiet:hover { background: var(--green-soft); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-quiet { background: transparent; color: var(--red); }
.btn-danger-quiet:hover { background: var(--red-soft); }
.btn-lg { padding: .9rem 1.35rem; font-size: 1.02rem; }
.btn-sm { padding: .45rem .7rem; font-size: .84rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 0; background: transparent; color: var(--ink); border-radius: 8px; cursor: pointer; position: relative; flex: none; font-size: 1.3rem; }
.icon-btn:hover { background: var(--paper-2); }
.icon-btn .icon { width: 1.3rem; height: 1.3rem; }
.icon-danger { color: var(--red); }

/* Logo */
.brand { text-decoration: none; color: var(--ink); }
.logo { display: inline-flex; align-items: center; gap: .5rem; font: 620 1.3rem/1 var(--serif); letter-spacing: -.02em; }
.logo svg { width: 1.65rem; height: 1.65rem; color: var(--green); }

/* Étiquettes d'état : esprit tampon */
.badge { display: inline-block; font: 700 .68rem/1 var(--sans); letter-spacing: .07em; text-transform: uppercase; padding: .32rem .5rem; border-radius: 4px; border: 1px solid currentColor; white-space: nowrap; }
.badge-late { color: var(--red); background: var(--red-soft); }
.badge-todo { color: var(--slate); background: var(--slate-soft); }
.badge-progress { color: var(--blue); background: #e2ecf6; }
.badge-soon { color: var(--amber); background: var(--amber-soft); }
.badge-ok { color: var(--green); background: var(--green-soft); }
.badge-na { color: #7c8585; background: transparent; border-style: dashed; }
.stamp { display: inline-block; font: 800 .8rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--green); border: 2.5px solid currentColor; border-radius: 6px; padding: .5rem .7rem; transform: rotate(-4deg); box-shadow: inset 0 0 0 1.5px var(--surface), inset 0 0 0 2.5px currentColor; }
.stamp-late { color: var(--red); } .stamp-todo { color: var(--slate); } .stamp-progress { color: var(--blue); } .stamp-soon { color: var(--amber); } .stamp-na { color: #7c8585; }

/* Couleur de chaque référentiel */
.fw-plum, .meter-plum, .fwb-plum { --c: var(--plum); } .fw-rust, .meter-rust, .fwb-rust { --c: var(--rust); }
.fw-teal, .meter-teal, .fwb-teal { --c: var(--teal); } .fw-blue, .meter-blue, .fwb-blue { --c: var(--blue); } .fw-ink, .fwb-ink { --c: var(--ink); }
.fw { display: inline-block; font: 700 .7rem/1 var(--sans); letter-spacing: .04em; color: var(--c); border-left: 3px solid var(--c); padding: .18rem 0 .18rem .4rem; }
.meter { display: block; height: 6px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--c, var(--green)); border-radius: 99px; }

/* ---------- Site public ---------- */
.site-header { display: flex; align-items: center; gap: 1.5rem; max-width: 1180px; margin: 0 auto; padding: 1.1rem 1.25rem; }
.site-nav { display: flex; gap: 1.6rem; margin-left: 1.5rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--green); }
.site-actions { margin-left: auto; display: flex; gap: .4rem; }
.public main { display: block; }
.public main > .flash { max-width: 1180px; margin: 0 auto 1rem; }

.hero { max-width: 1180px; margin: 0 auto; padding: 3.5rem 1.25rem 4.5rem; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); font-weight: 520; letter-spacing: -.025em; }
.hero h1 em { font-style: italic; color: var(--green); }
.lead { font-size: 1.16rem; color: #36464a; max-width: 34rem; margin: 1.4rem 0 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-note { color: var(--muted); font-size: .9rem; margin-top: 1rem; }
.hero-visual { position: relative; padding: 1rem 0 2.5rem; }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 60px -35px rgba(27, 42, 47, .45), 0 2px 0 var(--line-soft); padding: 1.3rem 1.4rem; transform: rotate(1.2deg); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; font: 600 1.25rem var(--serif); padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.sheet-rows { list-style: none; margin: 0; padding: 0; }
.sheet-rows li { display: grid; grid-template-columns: 7.2rem 1fr auto; gap: .7rem; align-items: center; padding: .72rem 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.sheet-rows b { font-weight: 550; } .sheet-rows i { font-style: normal; color: var(--muted); font-size: .8rem; }
.sheet-rows .badge { justify-self: start; }
.sheet-foot { display: flex; align-items: center; gap: .8rem; padding-top: 1rem; font-size: .85rem; font-weight: 600; color: var(--green); }
.sheet-foot .meter { flex: 1; }
.note-card { position: absolute; right: -.5rem; bottom: 0; background: var(--ink); color: #fff; border-radius: 12px; padding: .8rem 1rem; display: flex; gap: .7rem; align-items: center; box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .6); transform: rotate(-2deg); max-width: 19rem; }
.note-card .icon { width: 1.4rem; height: 1.4rem; color: #f2c96b; }
.note-card b { display: block; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: #f2c96b; }
.note-card span { font-size: .88rem; }

.band { background: var(--ink); color: #eef0ea; padding: 3.5rem 1.25rem; }
.band h2 { max-width: 1180px; margin: 0 auto 2rem; font-size: clamp(1.6rem, 3vw, 2.2rem); color: #fff; }
.risks { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.risks article { border-top: 1px solid rgba(255, 255, 255, .22); padding-top: 1rem; }
.risks h3 { margin-bottom: .6rem; }
.risks .fw { color: #fff; border-color: #f2c96b; font-size: .82rem; }
.risks p { font-size: .92rem; color: #c9d0cc; margin: 0; }

.section { max-width: 1180px; margin: 0 auto; padding: 4.5rem 1.25rem; }
.section-alt { max-width: none; background: var(--surface); border-block: 1px solid var(--line); padding-inline: max(1.25rem, calc((100% - 1180px) / 2 + 1.25rem)); }
.section h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); max-width: 26ch; }
.section-lead { font-size: 1.08rem; color: #36464a; max-width: 44rem; margin-top: 1rem; }
.section-note { color: var(--muted); margin-top: 1.5rem; }
.fw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.2rem; }
.fw-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 1.3rem; display: flex; flex-direction: column; }
.fw-card h3 { font-size: 1.6rem; color: var(--c); }
.fw-tagline { font-weight: 600; margin: .3rem 0 .6rem; }
.fw-card p { font-size: .92rem; }
.fw-card dl { display: flex; gap: 1.1rem; margin: .4rem 0 1rem; }
.fw-card dt { font: 600 1.5rem/1 var(--serif); } .fw-card dd { margin: .15rem 0 0; font-size: .76rem; color: var(--muted); }
.fw-legal { font-size: .76rem !important; color: var(--muted); margin: auto 0 0; padding-top: .8rem; border-top: 1px dashed var(--line); }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-top: 2.5rem; }
.features .icon { width: 2rem; height: 2rem; color: var(--green); margin-bottom: .8rem; }
.features h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.features p { font-size: .95rem; color: #36464a; }
.daily { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: center; margin-top: 3.5rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.daily h3 { font-size: 1.6rem; margin-bottom: .7rem; }
.mini-log { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem 1rem; font-size: .92rem; }
.mini-log p { display: grid; grid-template-columns: 3.2rem 1fr auto; gap: .6rem; margin: 0; padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.mini-log p:last-child { border: 0; }
.mini-log span { color: var(--muted); font-variant-numeric: tabular-nums; } .mini-log b { font-weight: 550; } .mini-log i { font-style: normal; font-weight: 650; color: var(--green); }
.mini-log .warn i { color: var(--red); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2.5rem; align-items: start; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem; position: relative; }
.plan-featured, .plan-current { border: 2px solid var(--green); box-shadow: var(--shadow); }
.plan-flag { position: absolute; top: -.75rem; left: 1.4rem; background: var(--green); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .6rem; border-radius: 4px; margin: 0; }
.plan h3 { font-size: 1.5rem; }
.plan-pitch { color: var(--muted); font-size: .92rem; min-height: 2.8em; margin: .4rem 0 1rem; }
.price strong { font: 560 2.6rem/1 var(--serif); } .price span { color: var(--muted); font-size: .9rem; }
.plan ul { list-style: none; padding: 0; margin: 1.2rem 0 1.5rem; font-size: .93rem; }
.plan li { padding: .38rem 0 .38rem 1.6rem; position: relative; }
.plan li::before { content: ''; position: absolute; left: .15rem; top: .72rem; width: .7rem; height: .38rem; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.plan li.off { color: #9aa3a0; text-decoration: line-through; } .plan li.off::before { border-color: #c5cbc6; width: .6rem; height: 0; border-left: 0; transform: none; top: .95rem; }
.plan .btn { width: 100%; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; max-width: 50rem; }
.faq summary { font: 560 1.15rem var(--serif); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::after { content: '+'; color: var(--green); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: .8rem 0 0; color: #36464a; }
.faq h2 { margin-bottom: 1.5rem; }
.cta-final { text-align: center; padding: 5rem 1.25rem; }
.cta-final h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0 auto .6rem; }
.cta-final p { color: var(--muted); font-size: 1.1rem; margin-bottom: 1.6rem; }
.site-footer { border-top: 1px solid var(--line); max-width: 1180px; margin: 0 auto; padding: 2.2rem 1.25rem 3rem; display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; color: var(--muted); font-size: .9rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: start; }
.site-footer .logo { font-size: 1.1rem; margin-bottom: .4rem; }
.fineprint { grid-column: 1 / -1; font-size: .78rem; margin: 0; }
.prose { max-width: 46rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.prose h1 { font-size: 2.3rem; margin-bottom: 1.2rem; } .prose h2 { font-size: 1.3rem; margin: 1.8rem 0 .5rem; }
.prose .note { background: var(--amber-soft); color: var(--amber); padding: .6rem .9rem; border-radius: 6px; }
.narrow { max-width: 36rem; margin: 0 auto; padding: 5rem 1.25rem; } .center { text-align: center; }
.narrow h1 { font-size: 2.2rem; margin-bottom: 1rem; }

.auth { max-width: 60rem; margin: 0 auto; padding: 2rem 1.25rem 5rem; display: flex; gap: 3.5rem; align-items: flex-start; justify-content: center; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 2rem; width: 100%; max-width: 27rem; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.9rem; margin-bottom: .5rem; }
.auth-alt { text-align: center; font-size: .9rem; margin: 1.2rem 0 0; color: var(--muted); }
.auth-aside { max-width: 19rem; padding-top: 2.5rem; }
.auth-aside h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.auth-aside ol { padding-left: 1.2rem; color: #36464a; } .auth-aside li { margin-bottom: .7rem; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 1rem; }
.form > .btn { justify-self: start; }
.form > .btn-block { justify-self: stretch; }
label { display: block; font-weight: 600; font-size: .9rem; }
label > input, label > select, label > textarea { display: block; margin-top: .35rem; }
label > small { display: block; margin-top: .3rem; font-weight: 400; color: var(--muted); }
input, select, textarea { font: 400 1rem/1.4 var(--sans); color: var(--ink); background: #fff; border: 1px solid #c9c2b0; border-radius: 7px; padding: .6rem .7rem; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
input[disabled], select[disabled] { background: var(--paper); color: var(--muted); }
input[type=checkbox] { width: 1.15rem; height: 1.15rem; accent-color: var(--green); flex: none; margin: .15rem 0 0; padding: 0; }
input[type=file] { padding: .5rem; background: var(--paper); border-style: dashed; }
textarea { resize: vertical; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0; } legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: .5rem; }
.inline-checks { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 1rem; align-items: start; }
.span-2 { grid-column: span 2; }
.form-error, .flash { padding: .75rem 1rem; border-radius: 8px; font-size: .94rem; margin: 0 0 1rem; border: 1px solid; }
.form-error, .flash-error { background: var(--red-soft); color: #8a2a12; border-color: #e9b9a8; }
.flash-ok { background: var(--green-soft); color: var(--green-dark); border-color: #b9d6c6; }
.form-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.narrow-form { max-width: 40rem; }
.hint { font-size: .88rem; color: var(--muted); margin: .8rem 0 0; }

/* ---------- Application ---------- */
.topbar { display: none; }
.shell { display: grid; grid-template-columns: 16.5rem 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 1.3rem .9rem 1rem; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 0 .6rem; }
.org-name { margin: .9rem .6rem 1.1rem; font-size: .84rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar nav { display: grid; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: .7rem; padding: .58rem .6rem; border-radius: 8px; color: #35454a; text-decoration: none; font-weight: 500; font-size: .94rem; }
.sidebar nav a:hover { background: var(--paper); }
.sidebar nav a.active { background: var(--green-soft); color: var(--green-dark); font-weight: 650; }
.sidebar nav .count { margin-left: auto; }
.count { display: inline-block; min-width: 1.5rem; text-align: center; font: 700 .74rem/1 var(--sans); padding: .28rem .45rem; border-radius: 99px; background: var(--paper-2); color: var(--ink); }
.count-late, .sidebar nav .count { background: var(--red); color: #fff; }
.logout { margin-top: auto; display: flex; align-items: center; gap: .5rem; padding: .8rem .2rem 0 .6rem; border-top: 1px solid var(--line); }
.who { flex: 1; font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { padding: 2rem 2.2rem 4rem; max-width: 78rem; width: 100%; min-width: 0; }
.banner { background: var(--amber-soft); color: #6b4705; border: 1px solid #e6d199; border-radius: 8px; padding: .7rem 1rem; margin-bottom: 1rem; font-size: .93rem; }
.banner-late { background: var(--red-soft); color: #8a2a12; border-color: #e9b9a8; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
.subtitle { color: var(--muted); margin: .35rem 0 0; max-width: 46rem; }
.back { display: inline-flex; align-items: center; gap: .3rem; font-size: .86rem; text-decoration: none; margin-bottom: .5rem; color: var(--muted); }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin-bottom: 1.1rem; }
.card > h2, .card-head h2 { font-size: 1.22rem; }
.card > h2 { margin-bottom: .9rem; display: flex; align-items: center; gap: .5rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .7rem; flex-wrap: wrap; }
.card-head a { font-size: .88rem; }
.empty { text-align: center; padding: 3rem 1rem; border: 1px dashed #c9c2b0; border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 1.3rem; margin-bottom: .5rem; }

/* Lignes */
.rows { display: grid; }
.row { display: flex; align-items: center; gap: .9rem; padding: .78rem .2rem; border-top: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); min-width: 0; }
.rows > .row:first-child { border-top: 0; }
a.row:hover { background: var(--paper); margin-inline: -.6rem; padding-inline: .8rem; border-radius: 8px; border-color: transparent; }
a.row:hover + .row { border-color: transparent; }
.row > .icon { color: var(--muted); }
.row-state { flex: none; width: 7.4rem; display: flex; flex-direction: column; gap: .25rem; align-items: flex-start; }
.row-main { flex: 1; min-width: 0; display: grid; gap: .2rem; }
.row-main b { font-weight: 600; } .row-main b a { color: inherit; }
.row-main small { color: var(--muted); display: flex; flex-wrap: wrap; gap: .1rem .45rem; align-items: center; }
.row-due { text-align: right; flex: none; display: grid; font-size: .9rem; }
.row-due small { color: var(--muted); } .row-due.is-late, .row-due.is-late small { color: var(--red); }
.row-new { background: #fbf6e6; }
.row-form { margin: 0; }
.more { display: inline-block; margin-top: .7rem; font-size: .9rem; }
.quiet-ok { color: var(--green); display: flex; gap: .4rem; align-items: center; margin: 0; }

/* Tableau de bord */
.dash { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: start; }
.dash .card { margin: 0; }
.score-card { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 1.8rem; align-items: center; }
.score-card h2 { font-size: 1.45rem; margin-bottom: .3rem; }
.gauge { width: 8.5rem; height: 8.5rem; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--green) calc(var(--pct) * 1%), var(--paper-2) 0); }
.gauge > span { width: 6.9rem; height: 6.9rem; border-radius: 50%; background: var(--surface); display: grid; place-items: center; grid-auto-flow: column; align-content: center; justify-content: center; }
.gauge b { font: 560 2.4rem/1 var(--serif); } .gauge small { font-weight: 600; color: var(--muted); align-self: end; padding-bottom: .35rem; }
.fw-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .9rem; margin-top: 1rem; }
.fw-score { display: grid; gap: .35rem; text-decoration: none; color: var(--ink); padding: .65rem .75rem; border: 1px solid var(--line-soft); border-radius: 8px; }
.fw-score:hover { border-color: var(--c); }
.fw-score-head { display: flex; justify-content: space-between; align-items: center; }
.fw-score small { color: var(--muted); }
.today-card { grid-column: 1 / -1; background: var(--ink); color: #fff; border-color: var(--ink); }
.today-card h2 { color: #fff; } .today-card h2 .icon { color: #f2c96b; }
.today-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .6rem; }
.today-list a { display: grid; grid-template-columns: 1fr auto; gap: .1rem .6rem; align-items: center; background: rgba(255, 255, 255, .08); border-radius: 8px; padding: .7rem .9rem; color: #fff; text-decoration: none; }
.today-list a:hover { background: rgba(255, 255, 255, .16); }
.today-list small { grid-column: 1; color: #c2cbc8; } .today-list .icon { grid-row: 1 / 3; grid-column: 2; }

/* Filtres */
.filters { margin-bottom: 1.1rem; display: grid; gap: .8rem; }
.tabs { display: flex; gap: 1.4rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: .55rem 0; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--ink); border-color: var(--green); }
.tabs span, .chips span { font-weight: 500; color: var(--muted); font-size: .82em; }
.filter-row { display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chips a { padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--ink); font-size: .86rem; background: var(--surface); }
.chips a.active { background: var(--ink); color: #fff; border-color: var(--ink); } .chips a.active span { color: #cdd3d0; }
.search input { width: 15rem; max-width: 100%; padding: .45rem .7rem; font-size: .92rem; }

/* Fiche d'obligation */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 19.5rem; gap: 1.1rem; align-items: start; }
.stamp-line { display: flex; gap: 1.3rem; align-items: center; margin: .3rem 0 1.2rem; }
.stamp-line p { margin: 0; }
.prose-sm p { color: #2f3f43; }
.callout { background: var(--paper); border-left: 3px solid var(--green); padding: .8rem 1rem; border-radius: 0 8px 8px 0; margin: 1rem 0; }
.callout b { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--green); } .callout p { margin: .25rem 0 0; }
.legal { font-size: .84rem; color: var(--muted); margin: 0; }
.add-proof { margin-top: .9rem; }
.add-proof > summary { cursor: pointer; color: var(--green); font-weight: 600; font-size: .92rem; display: inline-flex; gap: .4rem; align-items: center; list-style: none; }
.add-proof > summary::-webkit-details-marker { display: none; }
.add-proof[open] > summary { margin-bottom: 1rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1rem .6rem; display: grid; gap: .15rem; }
.timeline li::before { content: ''; position: absolute; left: -1.56rem; top: .35rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--green); border: 2px solid var(--surface); }
.timeline small { color: var(--muted); } .timeline p { margin: .2rem 0 0; font-size: .92rem; }
.meta dl, .usage { margin: 0; display: grid; gap: .7rem; }
.meta dl > div { display: grid; gap: .1rem; } .meta dt, .usage dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); } .meta dd, .usage dd { margin: 0; font-size: .92rem; }
.meta form { margin-top: 1rem; }
.usage { grid-template-columns: repeat(3, 1fr); margin: .6rem 0 1.2rem; } .usage dd { font: 560 1.4rem var(--serif); }

/* Calendrier */
.cal-nav { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.cal-nav h2 { font-size: 1.5rem; min-width: 11rem; text-align: center; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.cal-dow { padding: .55rem .6rem; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--paper); }
.cal-day { min-height: 6.6rem; padding: .35rem; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.is-empty { background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(27, 42, 47, .025) 7px 8px); }
.cal-num { font-size: .82rem; font-weight: 600; color: var(--muted); padding: .1rem .3rem; align-self: flex-start; }
.is-today .cal-num { background: var(--green); color: #fff; border-radius: 99px; }
.is-past .cal-num { opacity: .6; }
.cal-ev { display: flex; align-items: center; gap: .2rem; font-size: .74rem; line-height: 1.25; padding: .2rem .35rem; border-radius: 4px; text-decoration: none; background: var(--slate-soft); color: var(--slate); border-left: 3px solid var(--c, var(--slate)); min-width: 0; }
.cal-ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev .icon { width: .85rem; height: .85rem; }
.cal-late { background: var(--red-soft); color: #8a2a12; } .cal-soon { background: var(--amber-soft); color: #6b4705; }
.cal-ok, .cal-done { background: var(--green-soft); color: var(--green-dark); } .cal-progress { background: #e2ecf6; color: var(--blue); }
.cal-planned { background: transparent; color: var(--muted); outline: 1px dashed #c9c2b0; outline-offset: -1px; }
.cal-more { font-size: .72rem; color: var(--muted); padding-left: .3rem; }
.agenda-day { margin-top: 1rem; } .agenda-day h3 { font: 700 .78rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.legend { display: flex; gap: .6rem; flex-wrap: wrap; font-size: .8rem; }
.legend .cal-ev { border-left-width: 0; padding: .25rem .5rem; }

/* Tableaux */
.table-wrap { overflow-x: auto; margin-inline: -.3rem; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: .5rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .7rem .6rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table small { color: var(--muted); }
.tr-alert td { background: #fdf3ee; }
.td-actions { white-space: nowrap; text-align: right; } .td-actions form { display: inline; }
.hash { font-family: ui-monospace, monospace; font-size: .74rem; }

/* Audit, modèles */
.lead-sm { color: #36464a; max-width: 48rem; margin-bottom: 1.3rem; }
.audit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 1.1rem; align-items: start; }
.audit-card { margin: 0; display: grid; gap: .8rem; }
.audit-card .card-head { margin: 0; }
.audit-score { margin: 0; } .audit-score b { font: 560 1.8rem var(--serif); }
.audit-facts { list-style: none; margin: 0; padding: 0; font-size: .92rem; display: grid; gap: .25rem; }
.audit-card details summary { cursor: pointer; font-size: .88rem; color: var(--green); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); gap: .8rem; }
.tpl { border: 1px solid var(--line-soft); border-radius: 8px; padding: 1rem; display: flex; flex-direction: column; gap: .4rem; background: var(--paper); margin: 0; }
.tpl h3 { font-size: 1.05rem; } .tpl p { font-size: .87rem; color: var(--muted); flex: 1; margin: 0; } .tpl .btn { align-self: flex-start; margin-top: .4rem; background: var(--surface); }

/* Éditeur de document */
.editor-bar { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: .2rem 0 .7rem; display: grid; gap: .7rem; }
.editor-title input { font: 560 1.2rem var(--serif); }
.toolbar { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.toolbar button { font: 600 .82rem var(--sans); border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: .4rem .6rem; cursor: pointer; color: var(--ink); min-width: 2.2rem; }
.toolbar button:hover { border-color: var(--green); }
.toolbar .sep { width: 1px; height: 1.4rem; background: var(--line); margin: 0 .3rem; }
.doc-paper { background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); padding: clamp(1.2rem, 5vw, 3.2rem); min-height: 28rem; font: 1rem/1.6 Georgia, 'Times New Roman', serif; overflow-x: auto; }
.doc-paper:focus { outline: 2px solid var(--green); }
.doc-paper h1 { font: 600 1.7rem/1.2 var(--serif); margin: 0 0 .8rem; } .doc-paper h2 { font: 600 1.25rem/1.25 var(--serif); margin: 1.5rem 0 .5rem; } .doc-paper h3 { font: 600 1.05rem/1.3 var(--serif); margin: 1.1rem 0 .4rem; }
.doc-paper table { border-collapse: collapse; width: 100%; margin: .8rem 0; font-size: .88rem; font-family: var(--sans); }
.doc-paper th, .doc-paper td { border: 1px solid #9aa3a0; padding: .35rem .5rem; text-align: left; vertical-align: top; min-width: 2rem; }
.doc-paper th { background: var(--paper); }
.editor-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1rem; position: sticky; bottom: 0; background: var(--paper); padding: .7rem 0; }
.editor-status { font-size: .86rem; }
.danger-line { margin-top: 1.5rem; }
.danger-zone { border-color: #e9b9a8; }

/* Réglages */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .7rem; }
.choice { display: flex; gap: .7rem; border: 1px solid var(--line); border-radius: 8px; padding: .9rem; cursor: pointer; font-weight: 400; background: var(--surface); }
.choice:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.choice-body { display: grid; gap: .15rem; } .choice-body b { font: 600 1.15rem var(--serif); } .choice-body small { color: var(--muted); }
.onboarding { max-width: 52rem; }
.copy-line input { font-family: ui-monospace, monospace; font-size: .84rem; background: var(--paper); }
.copy-line { margin-bottom: .6rem; }
.row-menu { position: relative; }
.row-menu > summary { list-style: none; cursor: pointer; } .row-menu > summary::-webkit-details-marker { display: none; }
.menu { position: absolute; right: 0; top: calc(100% + .3rem); z-index: 10; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: .9rem; width: 17rem; display: grid; gap: .7rem; }
.plans-app { margin-top: 1.6rem; }

/* ---------- Petits écrans ---------- */
@media (max-width: 1080px) {
  .fw-grid, .features, .risks { grid-template-columns: repeat(2, 1fr); }
  .detail { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 2rem; gap: 2rem; }
  .site-nav { display: none; }
  .plans, .daily { grid-template-columns: 1fr; }
  .auth { flex-direction: column; align-items: center; gap: 1rem; } .auth-aside { padding-top: 0; }
  .topbar { display: flex; align-items: center; gap: .4rem; position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); padding: .45rem .6rem; }
  .topbar .brand { flex: 1; } .topbar .logo { font-size: 1.15rem; }
  .bell .dot { position: absolute; top: .2rem; right: .1rem; background: var(--red); color: #fff; font: 700 .62rem/1 var(--sans); padding: .15rem .3rem; border-radius: 99px; }
  .shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(18rem, 86vw); z-index: 50; transform: translateX(-100%); transition: transform .2s ease; height: 100dvh; }
  .menu-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .35); }
  .scrim { position: fixed; inset: 0; background: rgba(27, 42, 47, .45); z-index: 40; }
  .content { padding: 1.2rem 1rem 4rem; }
  .dash { grid-template-columns: 1fr; }
  .score-card { grid-template-columns: 1fr; justify-items: start; gap: 1rem; }
  .gauge { width: 6.5rem; height: 6.5rem; } .gauge > span { width: 5.2rem; height: 5.2rem; } .gauge b { font-size: 1.8rem; }
  .cal-day { min-height: 3.6rem; padding: .2rem; } .cal-ev span { display: none; } .cal-ev { height: .5rem; padding: 0; border-left-width: 0; background: var(--c, var(--slate)); } .cal-ev .icon, .cal-more { display: none; }
  .cal-planned { background: transparent; outline-color: var(--c, #c9c2b0); }
  .cal-dow { padding: .4rem .2rem; text-align: center; font-size: .66rem; }
  .legend { display: none; }
  .table thead { display: none; }
  .table tr { display: grid; gap: .3rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 0 .3rem; background: none !important; }
  .table td:empty { display: none; }
  .table td[data-label]::before { content: attr(data-label) ' : '; color: var(--muted); font-size: .8rem; }
  .td-actions { text-align: left; }
  .usage { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .site-header { padding: .8rem 1rem; gap: .5rem; } .site-actions .btn-quiet { display: none; }
  .fw-grid, .features, .risks, .grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .section { padding: 3rem 1rem; } .section-alt { padding-inline: 1rem; }
  .sheet { transform: none; padding: 1rem; } .sheet-rows li { grid-template-columns: 1fr auto; } .sheet-rows .badge { grid-column: 1 / -1; }
  .note-card { position: static; margin-top: 1rem; transform: none; max-width: none; }
  .row { flex-wrap: wrap; gap: .4rem .7rem; } .row-state { width: auto; flex-direction: row; } .row-main { flex-basis: 100%; order: 3; } .row-due { margin-left: auto; text-align: right; }
  .row > .icon { display: none; }
  .card { padding: 1.05rem; }
  .stamp-line { flex-direction: column; align-items: flex-start; gap: .9rem; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .search, .search input { width: 100%; }
  .menu { position: static; width: auto; margin-top: .5rem; box-shadow: none; }
  .auth-card { padding: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
