/* Espace Pragma* — direction « Galerie » : fond gris doux, tuiles blanches arrondies, Aeonik. */

@font-face { font-family: "Aeonik"; src: url("/static/Aeonik-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Aeonik"; src: url("/static/Aeonik-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #F2F2F0; --tile: #FFFFFF; --soft: #F5F5F3; --line: #ECECE9;
  --ink: #111111; --ink-2: rgba(17,17,17,.58); --ink-3: rgba(17,17,17,.42);
  --dark: #141414; --beige: #E8E4DC;
  --r-tile: 18px; --r-card: 16px; --r-ctl: 10px;
  --rail: 84px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 "Aeonik", "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 700; margin: 0; }
p { margin: 0; }
.cap { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.lead { font-family: Georgia, "Times New Roman", serif; font-style: italic; }

/* ——— Structure ——— */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 22px 0 18px; gap: 4px; }
.mono { width: 44px; height: 44px; border-radius: 13px; background: var(--dark); color: #fff; display: grid; place-items: center;
  text-decoration: none; margin-bottom: 22px; }
.mono svg { width: 20px; height: 20px; }
.rail a.item, .rail span.item { width: 64px; padding: 9px 0 8px; border-radius: 13px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  text-decoration: none; color: var(--ink-3); }
.rail .item b { font-size: 14px; letter-spacing: -.3px; }
.rail .item small { font-size: 11px; line-height: 1.2; }
.rail a.item:hover { color: var(--ink); }
.rail a.item.on { background: var(--tile); color: var(--ink); }
.rail span.item { opacity: .45; cursor: default; }
.rail .bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--tile); color: var(--ink); display: grid; place-items: center;
  font-weight: 700; font-size: 13px; text-decoration: none; flex: none; }
.avatar.dark { background: var(--dark); color: #fff; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.rail .logout { background: none; border: 0; padding: 4px; color: var(--ink-3); cursor: pointer; font: inherit; font-size: 11px; }
.rail .logout:hover { color: var(--ink); }

.main { padding: 22px 32px 64px 8px; min-width: 0; max-width: 1360px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; }
.search { flex: 1; max-width: 420px; position: relative; }
.search input[type=search] { width: 100%; background: var(--tile); border: 0; border-radius: var(--r-ctl); padding: 11px 16px 11px 40px; font: inherit; color: var(--ink); outline: none; }
.search input::placeholder { color: var(--ink-3); }
.search input[type=search]:focus { box-shadow: 0 0 0 1.5px var(--ink); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.topbar .actions { margin-left: auto; }

@media (max-width: 820px) {
  .shell { display: block; }
  .rail { position: sticky; top: 0; z-index: 10; height: auto; flex-direction: row; justify-content: flex-start; background: var(--bg);
    padding: 10px 12px; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
  .rail::-webkit-scrollbar { display: none; }
  .mono { margin: 0 8px 0 0; width: 40px; height: 40px; flex: none; }
  .rail a.item, .rail span.item { width: auto; min-width: 58px; padding: 6px 10px; flex: none; }
  .rail span.item { display: none; }
  .rail .bottom { margin: 0 0 0 auto; flex-direction: row; padding-left: 8px; }
  .rail .bottom form { display: none; }
  .main { padding: 16px 16px 56px; }
  .search { max-width: none; }
}

/* ——— Tuiles ——— */
.tile { background: var(--tile); border-radius: var(--r-tile); padding: 22px; min-width: 0; }
.tile.dark { background: var(--dark); color: #fff; }
.tile.dark .cap, .tile.dark .h { color: rgba(255,255,255,.58); }
.tile.flush { padding: 0; overflow: hidden; }
.tile-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.tile-head h3 { font-size: 20px; letter-spacing: -.5px; }
.tile.flush .tile-head { padding: 20px 22px 6px; margin: 0; }
.more { font-size: 14px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.more:hover { color: var(--ink); }
.stack { display: flex; flex-direction: column; gap: 14px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 6px 0 22px; }
.page-head h1 { font-size: clamp(34px, 4.2vw, 48px); letter-spacing: -1.8px; line-height: 1; margin-top: 8px; }
.page-head .sub { margin-top: 10px; color: var(--ink-2); font-size: 16px; }
.crumb { color: var(--ink-3); text-decoration: none; font-weight: 700; font-size: 13px; }
.crumb:hover { color: var(--ink); }
.section-title { font-size: 22px; letter-spacing: -.6px; margin: 34px 0 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

/* ——— Tableau de bord ——— */
.dash { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 14px; }
.hello { grid-row: span 2; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.hello h1 { font-size: clamp(38px, 4vw, 50px); letter-spacing: -2px; line-height: .98; margin-top: 12px; }
.hello .sub { color: var(--ink-2); margin-top: 12px; font-size: 16px; }
.kpi .v { font-size: clamp(30px, 3vw, 40px); font-weight: 700; letter-spacing: -1.4px; line-height: 1; margin-top: 16px; }
.kpi .h { font-size: 14px; color: var(--ink-2); margin-top: 8px; }
@media (max-width: 1080px) { .dash { grid-template-columns: 1fr 1fr; } .hello { grid-column: 1 / -1; grid-row: auto; } }
@media (max-width: 520px) { .kpi .v { font-size: 28px; } .tile { padding: 18px; } }

.agenda-item { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); text-decoration: none; }
.agenda-item:first-child { border-top: 0; }
.chip { font-weight: 700; font-size: 13px; background: var(--soft); border-radius: 8px; padding: 6px 9px; white-space: nowrap; min-width: 58px; text-align: center; }
.chip.late { background: var(--dark); color: #fff; }
.agenda-item .t { font-weight: 700; line-height: 1.25; }
.agenda-item .s { font-size: 13px; color: var(--ink-2); }
.agenda-item:hover .t { text-decoration: underline; }

.two { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 1080px) { .two { grid-template-columns: 1fr; } }

/* ——— Projets en vignettes ——— */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.proj { background: var(--tile); border-radius: var(--r-card); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; }
.proj:hover .cover img, .proj:hover .cover .tone { transform: scale(1.03); }
.cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--beige); }
.cover img, .cover .tone { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.cover .tone { display: grid; place-items: center; font-size: 40px; font-weight: 700; color: rgba(17,17,17,.14); letter-spacing: -1px; }
.cover .stage { position: absolute; left: 10px; bottom: 10px; }
.proj .body { padding: 13px 16px 15px; }
.proj .t { font-weight: 700; font-size: 15.5px; letter-spacing: -.2px; line-height: 1.25; }
.proj .s { font-size: 14px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 10px; margin-top: 3px; }
.proj.add { align-items: center; justify-content: center; min-height: 180px; background: transparent; border: 1.5px dashed rgba(17,17,17,.14); color: var(--ink-2); font-weight: 700; }
.proj.add:hover { border-color: var(--ink); color: var(--ink); }

.tones-0 { background: #D9D4CB; } .tones-1 { background: #C9C2B4; } .tones-2 { background: #E3E1DC; }
.tones-3 { background: #BDBDB8; } .tones-4 { background: #D3CEC4; } .tones-5 { background: #E6E1D6; }

/* ——— Étapes ——— */
.stage { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; line-height: 1.3;
  background: var(--soft); color: var(--ink); }
.cover .stage { background: rgba(255,255,255,.94); }
.stage.prospect { background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.cover .stage.prospect { box-shadow: none; }
.stage.livre { background: var(--beige); }
.stage.production, .stage.paye, .cover .stage.production, .cover .stage.paye { background: var(--dark); color: #fff; }
.stage.paye::after { content: " *"; }
.stage.perdu { color: var(--ink-3); text-decoration: line-through; }

/* ——— Boutons & formulaires ——— */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--dark); color: #fff; border: 0; border-radius: var(--r-ctl);
  padding: 11px 16px; font: 700 15px/1.1 "Aeonik", Helvetica, Arial, sans-serif; letter-spacing: -.2px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #333; }
.btn.light { background: var(--tile); color: var(--ink); }
.btn.light:hover { background: #fafaf8; box-shadow: inset 0 0 0 1px var(--line); }
.btn.soft { background: var(--soft); color: var(--ink); }
.btn.soft:hover { background: #ebebe8; }
.btn.small { padding: 8px 12px; font-size: 13.5px; }
.btn.danger { background: transparent; color: var(--ink-3); font-weight: 400; padding-left: 0; }
.btn.danger:hover { color: #b3261e; background: transparent; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.linkish:hover { color: var(--ink); text-decoration: underline; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

label { display: block; }
label > span { display: block; font-weight: 700; font-size: 13px; color: var(--ink-2); margin-bottom: 7px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=search], select, textarea {
  width: 100%; background: var(--soft); color: var(--ink); border: 0; border-radius: var(--r-ctl);
  padding: 12px 14px; font: 400 15px/1.35 "Aeonik", Helvetica, Arial, sans-serif; outline: none; appearance: none; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 1.5px var(--ink); background: var(--tile); }
input:disabled { color: var(--ink-3); }
select { background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
textarea { min-height: 110px; resize: vertical; }
.form { max-width: 780px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.seg { display: flex; gap: 4px; background: var(--soft); border-radius: 12px; padding: 4px; flex-wrap: wrap; }
.seg label { flex: 1; min-width: max-content; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg .opt { display: block; text-align: center; padding: 9px 14px; border-radius: 9px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.seg .opt:hover { color: var(--ink); }
.seg input:checked + .opt { background: var(--tile); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.seg input:focus-visible + .opt { box-shadow: 0 0 0 1.5px var(--ink); }
.error { background: #FBEDEC; color: #8c1d18; border-radius: var(--r-ctl); padding: 12px 16px; margin-bottom: 18px; font-size: 14px; }
.ok { background: var(--soft); border-radius: var(--r-ctl); padding: 12px 16px; margin-bottom: 18px; font-size: 14px; }

/* ——— Listes & tableaux ——— */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows .row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 22px; text-decoration: none; }
a.row:hover { background: #FAFAF8; }
.rows .t { font-weight: 700; }
.rows .s { color: var(--ink-2); font-size: 14px; margin-top: 1px; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.empty { color: var(--ink-2); padding: 6px 0 2px; }
.tile.flush .empty { padding: 4px 22px 22px; }
.empty a { color: var(--ink); font-weight: 700; }

table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 700; font-size: 13px; color: var(--ink-3); padding: 14px 22px 10px; white-space: nowrap; }
.table td { padding: 13px 22px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: #FAFAF8; }
.table td a { text-decoration: none; font-weight: 700; }
.table .r { text-align: right; }
@media (max-width: 760px) { .table .hide-sm { display: none; } .table td, .table th { padding-left: 16px; padding-right: 16px; } }

/* ——— Pipeline ——— */
.board { display: grid; grid-template-columns: repeat(6, minmax(230px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.column { background: rgba(17,17,17,.035); border-radius: var(--r-tile); min-height: 360px; display: flex; flex-direction: column; transition: background .15s; }
.column.drop { background: rgba(17,17,17,.08); }
.column-head { padding: 16px 16px 8px; display: flex; justify-content: space-between; align-items: baseline; }
.column-head h3 { font-size: 16px; letter-spacing: -.3px; }
.column-head .count { font-size: 13px; font-weight: 700; color: var(--ink-3); background: var(--tile); border-radius: 99px; padding: 1px 8px; margin-left: 6px; }
.column-head .total { font-size: 13px; color: var(--ink-2); }
.cards { padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card { display: block; background: var(--tile); border-radius: 14px; text-decoration: none; cursor: grab; overflow: hidden; transition: box-shadow .15s; }
.card:hover { box-shadow: 0 0 0 1.5px var(--ink); }
.card.dragging { opacity: .4; }
.card .thumb { aspect-ratio: 16 / 7; position: relative; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .in { padding: 12px 14px 13px; }
.card .t { font-weight: 700; line-height: 1.25; }
.card .c { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.card .m { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13.5px; }
.column .add { margin: 0 8px 10px; padding: 9px; border-radius: 12px; font-size: 14px; color: var(--ink-2); text-decoration: none; text-align: center; }
.column .add:hover { background: var(--tile); color: var(--ink); }

/* ——— Fiches ——— */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.fact { background: var(--tile); border-radius: var(--r-card); padding: 16px 18px; min-width: 0; }
.fact .v { margin-top: 6px; overflow-wrap: anywhere; font-weight: 700; }
.fact .v a { text-decoration: none; }
.fact .v a:hover { text-decoration: underline; }
.fact .v.plain { font-weight: 400; }
.notes-box { white-space: pre-wrap; line-height: 1.6; }
.detail { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
@media (max-width: 1080px) { .detail { grid-template-columns: 1fr; } }

.hero-cover { position: relative; border-radius: var(--r-tile); overflow: hidden; aspect-ratio: 21 / 8; background: var(--beige); margin-bottom: 14px; }
.hero-cover img, .hero-cover .tone { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-cover .tone { display: grid; place-items: center; font-size: 72px; font-weight: 700; color: rgba(17,17,17,.12); letter-spacing: -2px; }
.hero-cover .tools { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; }
.hero-cover .tools .btn { background: rgba(255,255,255,.94); color: var(--ink); }
.hero-cover .tools .btn:hover { background: #fff; }
@media (max-width: 640px) { .hero-cover { aspect-ratio: 16 / 9; } }

details.inline summary { cursor: pointer; list-style: none; display: inline-flex; }
details.inline summary::-webkit-details-marker { display: none; }
details.inline[open] summary { margin-bottom: 14px; }

/* ——— Fil d'activité ——— */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; padding-top: 2px; }
.feed .b { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.45; }
.feed li.note .b { background: var(--soft); border-radius: 12px; padding: 10px 12px; margin-top: 6px; }
.feed .meta { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.feed .meta a { color: var(--ink-2); text-decoration: none; font-weight: 700; }
.feed .who-line { font-size: 14.5px; }
.note-form { margin-bottom: 16px; }
.note-form textarea { min-height: 76px; }
.note-form .actions { margin-top: 8px; justify-content: flex-end; }

/* ——— Connexion ——— */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; padding: 14px; }
.auth .brand { background: var(--tile); border-radius: 24px; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth .brand img { width: 132px; }
.auth .brand h1 { font-size: clamp(42px, 5.4vw, 76px); line-height: .96; letter-spacing: -3px; }
.auth .brand .sub { color: var(--ink-2); font-size: 18px; margin-top: 16px; }
.auth .panel { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.auth form h2 { font-size: 28px; letter-spacing: -1px; margin-bottom: 4px; }
.auth input:not(:disabled) { background: var(--tile); }
.auth .btn { justify-content: space-between; padding: 14px 18px; margin-top: 6px; }
.auth .hint { color: var(--ink-2); font-size: 14px; }
@media (max-width: 820px) {
  .auth { grid-template-columns: 1fr; }
  .auth .brand { padding: 26px 22px; gap: 28px; }
  .auth .brand img { width: 104px; }
  .auth .panel { align-items: flex-start; padding: 18px 8px 40px; }
}

/* ——— Équipe ——— */
.linkbox { background: var(--dark); color: #fff; border-radius: var(--r-tile); padding: 22px; margin-bottom: 14px; }
.linkbox .cap { color: rgba(255,255,255,.6); }
.linkbox .url { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.linkbox input { flex: 1; min-width: 220px; background: rgba(255,255,255,.1); color: #fff; font-size: 13.5px; }
.linkbox input:focus { background: rgba(255,255,255,.14); box-shadow: 0 0 0 1.5px #fff; }
.linkbox .btn { background: #fff; color: var(--ink); }
.linkbox p { margin-top: 12px; color: rgba(255,255,255,.62); font-size: 14px; }
.tag { font-size: 12px; font-weight: 700; background: var(--soft); border-radius: 99px; padding: 3px 9px; white-space: nowrap; margin-left: 6px; vertical-align: 1px; }

.soon { border: 1.5px dashed rgba(17,17,17,.14); border-radius: var(--r-card); padding: 18px 20px; color: var(--ink-2); }
.soon strong { color: var(--ink); }

/* ——— Agenda ——— */
.chip.dark-chip { background: var(--dark); color: #fff; }
.agenda-item.off { opacity: .55; }
.agenda-item.off .t { text-decoration: line-through; }
.bookings { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.booking { display: flex; flex-direction: column; gap: 6px; }
.booking .time { font-size: 26px; font-weight: 700; letter-spacing: -1px; }
.booking .time span { font-size: 15px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.booking h3 { font-size: 18px; letter-spacing: -.4px; }
.booking a { text-decoration: none; }
.booking a:hover { text-decoration: underline; }
.meta-list { list-style: none; padding: 0; margin: 4px 0 0; font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; }
.booking .subject { background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-top: 6px; }
.booking .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; }
.steps-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.steps-list a { font-weight: 700; }

/* ——— Statuts, étiquettes ——— */
.status { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; background: var(--soft); }
.status.prospect { background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.status.client { background: var(--beige); }
.status.fidele { background: var(--dark); color: #fff; }
.status.fidele::after { content: " *"; }
.status.inactif { color: var(--ink-3); }
.tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.tagchip { display: inline-block; font: 700 12px/1.2 "Aeonik", Helvetica, sans-serif; color: var(--ink-2); background: var(--soft); border: 0; border-radius: 99px; padding: 4px 9px; text-decoration: none; cursor: default; }
a.tagchip, button.tagchip { cursor: pointer; }
a.tagchip:hover, button.tagchip:hover { background: var(--beige); color: var(--ink); }
.tag-suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -8px; }

/* ——— Filtres & vues ——— */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input[type=search], .filters select { width: auto; background-color: var(--tile); padding-top: 10px; padding-bottom: 10px; font-size: 14px; }
.filters input[type=search] { min-width: 220px; flex: 1; max-width: 320px; }
.view-toggle { flex-wrap: nowrap; }
.view-toggle a.opt { text-decoration: none; }
.view-toggle a.opt.on { background: var(--tile); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.table tfoot td { border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: 16px; }
.mini-cover { width: 54px; height: 34px; border-radius: 8px; overflow: hidden; flex: none; display: block; }
.mini-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) { .filters select, .filters input[type=search] { flex: 1 1 45%; max-width: none; min-width: 0; } }

/* ——— Tâches ——— */
.rail .item { position: relative; }
.badge { position: absolute; top: -3px; right: -4px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--dark); color: #fff;
  font: 700 11px/18px "Aeonik", sans-serif; font-style: normal; text-align: center; padding: 0 5px; }
.tasks { list-style: none; margin: 0 0 12px; padding: 0; }
.task { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 18px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; padding-top: 2px; }
.check { width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid rgba(17,17,17,.25); background: var(--tile); display: grid; place-items: center; cursor: pointer; padding: 0; color: transparent; }
.check svg { width: 14px; height: 14px; }
.check:hover { border-color: var(--ink); color: var(--ink-3); }
.task.done .check { background: var(--dark); border-color: var(--dark); color: #fff; }
.task.done .t { text-decoration: line-through; color: var(--ink-3); }
.task .t { font-weight: 700; line-height: 1.3; }
.task .s { font-size: 13.5px; color: var(--ink-2); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1px; }
.task .s a { text-decoration: none; color: var(--ink-2); }
.task .s a:hover { color: var(--ink); text-decoration: underline; }
.task .s .late { color: #8c1d18; font-weight: 700; }
.task .s .today { color: var(--ink); font-weight: 700; }
.task .del button { background: none; border: 0; color: var(--ink-3); font-size: 18px; cursor: pointer; padding: 0; opacity: 0; }
.task:hover .del button, .task .del button:focus { opacity: 1; }
@media (hover: none) { .task .del button { opacity: .6; } }
.task-form { display: flex; flex-direction: column; gap: 8px; }
.task-form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.task-form-row input, .task-form-row select { flex: 1 1 130px; width: auto; font-size: 14px; }
.done-tile summary { list-style: none; display: flex; justify-content: space-between; align-items: baseline; cursor: pointer; }
.done-tile summary::-webkit-details-marker { display: none; }
.done-tile summary h3 { font-size: 20px; letter-spacing: -.5px; }

/* ——— Paiements ——— */
.notice { display: block; background: var(--dark); color: #fff; border-radius: var(--r-card); padding: 14px 18px; margin-top: 14px; text-decoration: none; }
.notice:hover { background: #2a2a2a; }
.pay { padding: 16px 20px; }
.pay-main { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.pay-amount { font-size: 22px; font-weight: 700; letter-spacing: -.6px; }
.pay-amount small { font-size: 12px; color: var(--ink-3); font-weight: 400; margin-left: 4px; letter-spacing: 0; }
.pay .t { font-weight: 700; }
.pay .s { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.pay-state { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pay-state a.stage { text-decoration: none; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.pay-actions { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form select, .inline-form input { width: auto; max-width: 420px; font-size: 14px; padding-top: 9px; padding-bottom: 9px; }
@media (max-width: 640px) { .pay-main { grid-template-columns: 1fr; gap: 6px; } .pay-state { justify-content: flex-start; } .inline-form select { max-width: 100%; } }
.pay-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.url-copy { display: flex; gap: 8px; margin-top: 8px; }
.url-copy input { font-size: 13px; }
.perm-list { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--soft); padding: 1px 5px; border-radius: 5px; }
