/* Cockpit senior préserve — direction artistique « One Design by Enola » (2026)
   Typographies : League Spartan (titres, chiffres, boutons) et Inter (textes d'interface), licences OFL.
   Couleurs : orange héritage #df6b0f, noir, blanc, gris #e9e9e9 ; brique #962a24, ambre #f6b051, crème #f4e9cd.
   Ton : informer sans alarmer. Orange = présence et chaleur ; brique (et non rouge vif) pour les retards. */

@font-face { font-family: "League Spartan"; src: url("../fonts/league-spartan-400.835b91837959.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "League Spartan"; src: url("../fonts/league-spartan-700.6d5160b371d7.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.da03732a27e1.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.2ede57db1a3a.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --font-title: "League Spartan", "Inter", system-ui, sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --paper: #f8f5f0; --surface: #ffffff; --sunk: #f1ede6; --grey: #e9e9e9;
  --ink: #000000; --muted: #5f5a55; --line: #e6e0d6;
  --orange: #df6b0f;          /* orange héritage : aplats, repères, gros textes */
  --orange-ink: #b8540a;      /* même orange assombri : petits textes sur fond clair (contraste AA) */
  --orange-soft: #fbe6d4; --on-orange: #ffffff;
  --cream: #f4e9cd;
  --late: #962a24; --late-soft: #f6e3df;     /* brique */
  --warm: #8a5f12; --warm-soft: #fbedd0;     /* ambre */
  --ok: #3f6b44; --ok-soft: #e3eedf;         /* vert, par petites touches : le vivant */
  --radius-lg: 20px; --radius: 14px; --radius-sm: 10px;
  --side: 268px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000000; --surface: #161412; --sunk: #1f1c19; --grey: #2a2622;
    --ink: #f6f1ea; --muted: #b3aba1; --line: #2e2a26;
    --orange: #f07d24; --orange-ink: #f39a52; --orange-soft: #3a2414; --on-orange: #ffffff;
    --cream: #3a3226;
    --late: #ec8b80; --late-soft: #3b1b18;
    --warm: #f6b051; --warm-soft: #3a2c12;
    --ok: #9ccc9f; --ok-soft: #1c2d1d;
    color-scheme: dark;
  }
}

/* Axes : couleurs tirées de la palette de la marque (brique, orange, bois, ambre, graphite, vert ginkgo) */
.ax-legal { --axis: #962a24; } .ax-commercial { --axis: #df6b0f; } .ax-technique { --axis: #8a6a45; }
.ax-financier { --axis: #d0921f; } .ax-securite { --axis: #3a3633; } .ax-strategie { --axis: #4f7a52; }
@media (prefers-color-scheme: dark) {
  .ax-legal { --axis: #e07a70; } .ax-commercial { --axis: #f07d24; } .ax-technique { --axis: #c9a27a; }
  .ax-financier { --axis: #f6b051; } .ax-securite { --axis: #b9b1a8; } .ax-strategie { --axis: #8fbf8f; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16.5px/1.55 var(--font-text);
}
a { color: var(--orange-ink); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 700; line-height: 1.15; margin: 0; }
h1 { font-size: 2.3rem; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }
p { margin: 0; }
svg { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.15em; }
.sprite { display: none; }
.ico-s { width: .95em; height: .95em; margin-right: .3em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }

/* --- Structure ---------------------------------------------------------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.shell > * { min-width: 0; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: .4rem;
  padding: 1.25rem .9rem; background: var(--surface); border-right: 1px solid var(--line);
}
/* Logo officiel (fichiers SVG de l'agence) : le ginkgo prend « fill », le texte prend « color » */
.brand { display: grid; gap: .35rem; justify-items: start; padding: .4rem .55rem 1.2rem; color: var(--ink); text-decoration: none; }
.logo { height: 38px; width: auto; aspect-ratio: 207.3 / 44.8; fill: var(--orange); color: var(--ink); }
.brand-sub { font-size: .82rem; color: var(--muted); padding-left: calc(38px * 44.7 / 44.8 + .5rem); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav-btn {
  display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font: inherit; background: none; border: 0; cursor: pointer; text-align: left; width: 100%;
}
.nav a:hover, .nav-btn:hover { background: var(--sunk); }
.nav a[aria-current="page"] { background: var(--orange-soft); color: var(--ink); font-weight: 600; }
.nav-title { margin: 1rem .7rem .2rem; color: var(--muted); font-size: .85rem; }
.nav-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
.nav-foot form { margin: 0; }
.dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--axis, var(--muted)); flex: none; display: inline-block; }
.dot-lg { width: 1rem; height: 1rem; margin-right: .6rem; vertical-align: .1em; }

.main { padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem; max-width: 1240px; width: 100%; }
.page-head { margin-bottom: 1.5rem; display: grid; gap: .5rem; }
.page-head-glow { position: relative; isolation: isolate; padding: 1.5rem 0 .5rem; }
.page-head-glow::before {
  content: ""; position: absolute; z-index: -1; top: -14rem; right: -16rem; width: 46rem; height: 34rem;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--orange) 75%, transparent) 0%,
              color-mix(in srgb, var(--orange) 30%, transparent) 45%, transparent 100%);
  filter: blur(24px); opacity: .5; pointer-events: none;
}
.main { overflow-x: clip; }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 70ch; }
.t-late { color: var(--late); }
.section-title { margin: 2rem 0 .8rem; }

/* --- Frise des échéances (élément signature) ------------------------------ */
.ribbon { margin-bottom: 2rem; }
.ribbon-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .6rem; }
.ribbon-track {
  list-style: none; margin: 0; padding: 1.4rem .25rem .5rem; display: flex; gap: 1rem; overflow-x: auto;
  scroll-snap-type: x proximity; position: relative;
}
.ribbon-track::before { /* la ligne du temps */
  content: ""; position: absolute; left: 0; right: 0; top: 1.4rem; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--orange), color-mix(in srgb, var(--orange) 20%, transparent));
}
.stop { flex: 0 0 13.5rem; scroll-snap-align: start; position: relative; padding-top: 1.1rem; }
.stop::before { /* le repère sur la ligne : une feuille de ginkgo */
  content: ""; position: absolute; top: -.75rem; left: .8rem; width: 22px; height: 22px;
  background: var(--axis, var(--orange));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='43.2 43.5 44.7 44.8'%3E%3Cpath d='M43.84,66.59c-.16-.39-.16-.85-.1-1.33,11.81,0,21.47-9.42,21.81-21.22,12.5.06,22.45,10.52,21.83,22.99-.58,11.57-10.17,20.72-21.82,20.78-.37-11.72-9.88-21.17-21.72-21.22Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='43.2 43.5 44.7 44.8'%3E%3Cpath d='M43.84,66.59c-.16-.39-.16-.85-.1-1.33,11.81,0,21.47-9.42,21.81-21.22,12.5.06,22.45,10.52,21.83,22.99-.58,11.57-10.17,20.72-21.82,20.78-.37-11.72-9.88-21.17-21.72-21.22Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.stop a {
  display: grid; gap: .15rem; height: 100%; padding: .9rem 1rem 1rem; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); border-top: 4px solid var(--axis, var(--orange));
}
.stop a:hover { border-color: var(--axis, var(--orange)); }
.stop-count { font-family: var(--font-title); font-size: 2.6rem; font-weight: 700; line-height: 1; display: flex; align-items: center; gap: .3rem; }
.stop-title { font-family: var(--font-title); font-size: 1.1rem; }
.stop-date { color: var(--muted); font-size: .9rem; }
.stop-title { font-weight: 700; margin-top: .35rem; }
.stop-project { color: var(--muted); font-size: .9rem; }
.stop.heat-hot .stop-count, .stop.heat-late .stop-count { color: var(--late); }
.stop.heat-warm .stop-count { color: var(--warm); }
.stop-lock a { border-style: dashed; border-top: 4px dashed var(--muted); background: var(--sunk); }
.stop-lock::before { background: var(--muted); }
.stop-lock .stop-count svg { width: 1.6rem; height: 1.6rem; }

/* --- Panneaux ------------------------------------------------------------- */
.today-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.today-grid .section-title { margin-top: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .9rem; flex-wrap: wrap; }
.panel-side h2 { display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.empty { color: var(--muted); padding: .9rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); list-style: none; }
.more { margin-top: .6rem; }

/* --- Fronts (axes sur l'écran Aujourd'hui) ----------------------------------- */
.fronts { display: grid; gap: 1.4rem; padding: 1.3rem 1.4rem; }
.front h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.front h3 a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: .55rem; }
.front h3 a:hover { color: var(--orange-ink); }
.front-list { list-style: none; margin: 0; padding: 0; border-left: 2px solid color-mix(in srgb, var(--axis) 35%, transparent); margin-left: .3rem; }
.front-project {
  display: grid; grid-template-columns: 1fr auto; gap: .05rem 1rem; padding: .5rem .2rem .5rem 1.05rem;
  text-decoration: none; color: var(--ink); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: background-color .15s;
}
.front-project:hover { background: var(--sunk); }
.front-list li + li .front-project { border-top: 1px solid var(--line); }
.fp-title { font-weight: 600; }
.fp-next { grid-column: 1; color: var(--muted); font-size: .92rem; }
.fp-count { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--muted); font-size: .9rem; }
.front-empty { color: var(--muted); font-size: .95rem; padding: .4rem 0 .4rem 1.05rem; }

/* --- Prochaine action (le seul aplat orange de l'écran) ---------------------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate; color: var(--on-orange);
  /* Dégradé de la DA, orange héritage → brique : plus sombre sous le texte (contraste AA), lumineux côté feuille */
  background: linear-gradient(300deg, #ec7a1c 0%, #df6b0f 35%, #b24614 100%);
  border-radius: var(--radius-lg); padding: 1.5rem 1.6rem 1.4rem;
}
.hero::after { /* la feuille de ginkgo, en filigrane */
  content: ""; position: absolute; z-index: -1; right: -2.5rem; bottom: -3.5rem; width: 13rem; height: 13rem;
  background: rgb(255 255 255 / .1);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='43.2 43.5 44.7 44.8'%3E%3Cpath d='M43.84,66.59c-.16-.39-.16-.85-.1-1.33,11.81,0,21.47-9.42,21.81-21.22,12.5.06,22.45,10.52,21.83,22.99-.58,11.57-10.17,20.72-21.82,20.78-.37-11.72-9.88-21.17-21.72-21.22Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='43.2 43.5 44.7 44.8'%3E%3Cpath d='M43.84,66.59c-.16-.39-.16-.85-.1-1.33,11.81,0,21.47-9.42,21.81-21.22,12.5.06,22.45,10.52,21.83,22.99-.58,11.57-10.17,20.72-21.82,20.78-.37-11.72-9.88-21.17-21.72-21.22Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hero-kicker { font-size: .95rem; opacity: .92; }
.hero-kicker a { color: inherit; }
.hero-title { font-family: var(--font-title); font-weight: 700; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; margin: .45rem 0 .7rem; max-width: 26ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: .35rem; background: rgb(255 255 255 / .18); padding: .2rem .7rem; border-radius: 99px; font-size: .92rem; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem; }

.hero-link { color: var(--on-orange); font-weight: 600; }
.after-hero { margin-top: 1.6rem; }

/* --- Barre d'avancement --------------------------------------------------- */
progress { appearance: none; height: .55rem; border: 0; border-radius: 99px; background: var(--sunk); overflow: hidden; width: 7rem; }
progress::-webkit-progress-bar { background: var(--sunk); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--axis, var(--orange)); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--axis, var(--orange)); border-radius: 99px; }
.progress-wrap { display: inline-flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .92rem; }

/* --- Tâches --------------------------------------------------------------- */
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.task {
  display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: start;
  padding: .7rem .75rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
}
/* Urgent : repère orange discret dans les listes (l'aplat orange est réservé à la prochaine action) */
.task.prio-urgent:not(.is-done) { box-shadow: inset 4px 0 0 var(--orange); }
.task.prio-urgent:not(.is-done) .check { border-color: var(--orange); }
.task.prio-important:not(.is-done) { box-shadow: inset 4px 0 0 var(--orange-soft); }
.task-check { margin: 0; }
.check {
  width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--muted); background: transparent;
  display: grid; place-items: center; cursor: pointer; color: transparent; padding: 0;
}
.check:hover { border-color: var(--orange); color: var(--orange); }
.check svg { width: 18px; height: 18px; }
.task.is-done .check { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.task.is-done .task-title { text-decoration: line-through; color: var(--muted); }
.task.is-done { opacity: .75; }
.task-title { font-weight: 600; padding-top: .25rem; overflow-wrap: anywhere; }
.task-notes { color: var(--muted); font-size: .92rem; margin-top: .3rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 99px;
  font-size: .85rem; background: var(--sunk); color: var(--ink); text-decoration: none; white-space: nowrap;
}
.chip-project { background: color-mix(in srgb, var(--axis) 14%, transparent); }
.chip-project::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--axis); }
.chip-urgent { background: var(--orange); color: var(--on-orange); font-weight: 600; }
.chip.heat-late, .chip.heat-hot { background: var(--late-soft); color: var(--late); }
.chip-important { background: var(--orange-soft); color: var(--orange-ink); font-weight: 600; }
.chip.heat-warm { background: var(--warm-soft); color: var(--warm); }
.chip-blocked { background: var(--sunk); color: var(--muted); }
.chip-sale { background: var(--cream); color: var(--ink); }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { background: var(--sunk); color: var(--ink); }

.quick { display: grid; gap: .5rem; margin-bottom: 1rem; padding: .75rem; border-radius: var(--radius); background: var(--sunk); }
.quick input[name="title"] { font-size: 1.05rem; }
.quick-options { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.quick-options label { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .92rem; }
.quick-options select, .quick-options input { width: auto; }
.quick-options .btn { margin-left: auto; }
.done-box { margin-top: 1.2rem; }
.done-box > summary { cursor: pointer; color: var(--muted); padding: .4rem 0; }
.done-box .tasks, .done-box .projects { margin-top: .6rem; }

/* --- Formulaires ---------------------------------------------------------- */
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); width: 100%;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .55rem .7rem; min-height: 44px;
}
input:focus, select:focus, textarea:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px var(--orange-soft); }
input[type="checkbox"] { width: 1.25rem; height: 1.25rem; min-height: 0; accent-color: var(--orange); }
textarea { resize: vertical; }
.field { display: grid; gap: .3rem; margin-bottom: .9rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field small { color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.check-line { display: flex; gap: .6rem; align-items: center; margin-bottom: .9rem; font-weight: 600; }
.error { color: var(--late); font-size: .92rem; }
.errors { background: var(--late-soft); color: var(--late); padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.edit-form { width: 100%; }
.task-editing { display: block; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.actions .btn-danger { margin-left: auto; }

/* Boutons : texte League Spartan gras ≥ 18,7 px → contraste « grand texte » respecté sur l'orange */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 46px;
  font-family: var(--font-title); font-size: 1.17rem; font-weight: 700; padding: .45rem 1.15rem .35rem;
  border-radius: 999px; border: 0; background: var(--orange); color: var(--on-orange);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(.94); }
.btn-quiet { background: var(--grey); color: var(--ink); }
.btn-quiet:hover { filter: brightness(.96); }
.btn-danger { background: transparent; color: var(--late); border: 1.5px solid currentColor; }
.btn.btn-inverse { background: #fff; color: #000; }
.btn-small { min-height: 38px; padding: .3rem .9rem .2rem; font-size: 1.05rem; }
.danger-zone { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }

.add-box { margin-top: 1rem; }
.add-box > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-title); font-size: 1.12rem; font-weight: 700; color: var(--orange-ink); padding: .45rem .1rem;
}
.add-box > summary::-webkit-details-marker { display: none; }
.add-box[open] > summary { margin-bottom: .7rem; }
.add-project { margin: 0 0 1.5rem; background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--radius-lg); padding: .6rem 1.2rem; }
.add-project[open] { border-style: solid; padding-bottom: 1.2rem; }

/* --- Chantier ------------------------------------------------------------- */
.crumbs { margin-bottom: .6rem; }
.crumbs a { display: inline-flex; align-items: center; gap: .5rem; color: var(--muted); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--ink); }
.head-line { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.status { padding: .2rem .75rem; border-radius: 99px; font-size: .9rem; font-weight: 600; }
.status-active { background: var(--ok-soft); color: var(--ok); }
.status-waiting { background: var(--warm-soft); color: var(--warm); }
.status-done { background: var(--sunk); color: var(--muted); }
.banner { display: flex; gap: .6rem; align-items: center; padding: .7rem 1rem; border-radius: var(--radius); font-weight: 600; }
.banner-wait { background: var(--warm-soft); color: var(--warm); }
.project-head .edit-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem; }
.project-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.side-col { display: grid; gap: 1.5rem; }

.events, .line { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.event, .line-item { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: start; }
.event-date {
  width: 3.4rem; text-align: center; border-radius: var(--radius-sm); background: var(--sunk); padding: .3rem 0;
  font-size: .8rem; color: var(--muted); display: grid; line-height: 1.15;
}
.event-date b { font-family: var(--font-title); font-size: 1.5rem; color: var(--ink); }
.heat-hot .event-date, .heat-late .event-date { background: var(--late-soft); }
.heat-hot .event-date b, .heat-late .event-date b { color: var(--late); }
.heat-warm .event-date { background: var(--warm-soft); }
.heat-warm .event-date b { color: var(--warm); }
.event-lock { place-items: center; min-height: 3rem; border: 1.5px dashed var(--muted); background: transparent; }
.event-lock svg { width: 1.3rem; height: 1.3rem; color: var(--muted); }
.event-title { font-weight: 600; }
.event-meta { color: var(--muted); font-size: .9rem; }
.lock > summary { list-style: none; cursor: pointer; display: inline-block; margin-top: .25rem; font-weight: 600; color: var(--orange-ink); font-size: .92rem; }
.lock > summary::-webkit-details-marker { display: none; }
.lock[open] > summary { display: none; }
.lock-form { display: flex; gap: .4rem; margin-top: .4rem; flex-wrap: wrap; align-items: center; }
.lock-form input { width: auto; min-height: 36px; padding: .25rem .5rem; }

.decisions { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 3px solid var(--orange-soft); display: grid; gap: 1rem; }
.decisions li { position: relative; padding-right: 2.5rem; }
.decisions li.empty { padding-right: 1rem; }
.decisions li:not(.empty)::before {
  content: ""; position: absolute; left: calc(-1rem - 8px); top: .35rem; width: 13px; height: 13px;
  border-radius: 50%; background: var(--surface); border: 3px solid var(--orange);
}
.decisions .icon-btn { position: absolute; right: 0; top: 0; }
.decision-date { color: var(--muted); font-size: .88rem; }
.decision-title { font-weight: 600; }
.decision-why { color: var(--muted); font-size: .95rem; margin-top: .2rem; }

/* --- Axe ------------------------------------------------------------------ */
.axis-head h1 { display: flex; align-items: center; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; }
.project-card {
  display: grid; gap: .6rem; align-content: start; padding: 1.1rem 1.2rem; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); border-top: 5px solid var(--axis);
}
.project-card:hover { border-color: var(--axis); }
.pc-summary { color: var(--muted); font-size: .95rem; }
.pc-wait { display: flex; gap: .4rem; align-items: center; color: var(--warm); font-weight: 600; font-size: .95rem; }
.pc-facts { margin: 0; display: grid; gap: .5rem; }
.pc-facts dt { color: var(--muted); font-size: .85rem; }
.pc-facts dd { margin: 0; font-weight: 600; }
.pc-progress { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .9rem; }
.pc-progress progress { flex: 1; }

/* --- Toutes les tâches ---------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.5rem; }
.filter {
  display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .85rem; border-radius: 99px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; min-height: 40px;
}
.filter:hover { border-color: var(--orange); }
.filter.is-on { background: var(--orange); color: var(--on-orange); border-color: var(--orange); font-weight: 600; }
.filter.is-on .dot { background: var(--on-orange); }
.bucket { margin-bottom: 1.8rem; }
.bucket h2 { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.count { font-size: .85rem; background: var(--sunk); color: var(--muted); border-radius: 99px; padding: .05rem .6rem; }
.bucket-late h2 { color: var(--late); }
.bucket-late .count { background: var(--late-soft); color: var(--late); }

/* --- Échéancier ----------------------------------------------------------- */
.panel-lock { margin-bottom: 2rem; border-style: dashed; }
.panel-lock h2 { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.panel-lock .muted { margin-bottom: 1rem; }
.month { margin-bottom: 2rem; }
.month h2 { margin-bottom: .8rem; }
.line-item { padding: .65rem .8rem; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--axis); border-radius: var(--radius); grid-template-columns: auto 1fr; }
.line-task { background: transparent; border-style: dashed; border-left-style: solid; }
.line-item.is-past { opacity: .6; }

/* --- Retours visuels des actions ---------------------------------------- */
.task.htmx-added { animation: row-in .3s ease-out; }
@keyframes row-in { from { opacity: 0; transform: translateY(-6px); } }
.task.is-done .check svg { animation: tick .28s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes tick { from { transform: scale(.3); opacity: 0; } }
.htmx-request.btn, .htmx-request .btn, form.htmx-request button { opacity: .65; cursor: progress; }
.task { transition: background-color .15s, opacity .2s; }
.task:hover { background: color-mix(in srgb, var(--surface) 92%, var(--orange) 8%); }
.icon-btn { transition: background-color .15s, color .15s; }

/* --- Messages ------------------------------------------------------------- */
.toasts { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; z-index: 10; }
.toast {
  background: var(--ink); color: var(--paper); padding: .75rem 1.1rem; border-radius: var(--radius); font-weight: 600;
  box-shadow: 0 6px 24px rgb(0 0 0 / .18); animation: toast-in .25s ease-out;
}
.toast.is-leaving { opacity: 0; transition: opacity .4s; }
.flash { display: grid; gap: .5rem; margin-bottom: 1.2rem; }
.flash .toast { box-shadow: none; animation: none; }
.toast-success { background: var(--ok-soft); color: var(--ok); }
.toast-warning { background: var(--warm-soft); color: var(--warm); }
.toast-error { background: var(--late-soft); color: var(--late); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* --- Pages hors connexion (connexion, 2FA) -------------------------------- */
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art { /* couverture de la DA : halos orange, feuille de ginkgo, note d'intention */
  position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 3.5rem;
  background:
    radial-gradient(60% 55% at 12% 8%, #df6b0f 0%, rgb(223 107 15 / .55) 35%, transparent 70%),
    radial-gradient(70% 60% at 100% 100%, #ff5f05 0%, rgb(246 176 81 / .6) 40%, transparent 75%),
    #fff;
}
.art-quote { position: relative; font-family: var(--font-title); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2.3rem); line-height: 1.15; color: #000; max-width: 18ch; }
.auth { width: 100%; max-width: 440px; margin: 0 auto; padding: 4rem 1.25rem; align-self: center; }
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-art { min-height: 30vh; padding: 1.5rem; }
  .art-quote { font-size: 1.35rem; }
}
.auth-brand { display: grid; gap: .4rem; justify-items: start; margin-bottom: 2.5rem; }
.auth-brand .logo { height: 48px; }
.auth-brand .brand-sub { padding-left: calc(48px * 44.7 / 44.8 + .65rem); }
.auth h1 { margin-bottom: 1rem; }
.auth form { margin-top: 1rem; }
.auth button[type="submit"]:not(.link) { width: 100%; }

/* Gabarits historiques (comptes, journal) */
button:not([class]), .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border: 0; cursor: pointer;
  font-family: var(--font-title); font-size: 1.17rem; font-weight: 700; padding: .45rem 1.15rem .35rem;
  border-radius: 999px; background: var(--orange); color: var(--on-orange); text-decoration: none;
}
.button.secondary { background: var(--grey); color: var(--ink); }
button.link { background: none; border: 0; color: var(--orange-ink); text-decoration: underline; font: inherit; padding: .5rem 0; cursor: pointer; }
.ok { color: var(--ok); background: var(--ok-soft); padding: .75rem 1rem; border-radius: var(--radius-sm); }
.qr { display: block; background: #fff; border-radius: var(--radius); margin: 1rem 0; }
code { font-family: ui-monospace, Menlo, monospace; font-size: .92em; }
.codes { columns: 2; list-style: none; padding: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.5rem; margin: 0 0 1.5rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .88rem; color: var(--muted); }
form.inline { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem 0; }
form.inline input { width: auto; }
.pager { display: flex; gap: 1rem; justify-content: center; margin-top: 1rem; }

/* --- Petits écrans -------------------------------------------------------- */
@media (max-width: 1080px) {
  .today-grid, .project-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: .6rem 1rem; gap: .3rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: .2rem 0; margin-right: auto; }
  .nav, .axes-nav, .nav-foot { flex-direction: row; overflow-x: auto; width: 100%; border-top: 0; padding-top: 0; margin-top: 0; }
  .nav a, .nav-btn { white-space: nowrap; width: auto; }
  .nav-title { display: none; }
  .main { padding: 1.25rem 1rem 3rem; }
  h1 { font-size: 1.6rem; }
  .quick-options .btn { width: 100%; margin-left: 0; }
  .field-row { grid-template-columns: 1fr; }
  .stop { flex-basis: 11.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* --- Choix de vue (liste / tableau / calendrier) ----------------------------- */
.head-with-switch { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.head-with-switch > div { display: grid; gap: .5rem; }
.switch { display: inline-flex; padding: 4px; gap: 2px; background: var(--grey); border-radius: 999px; }
.switch a {
  display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .95rem; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; min-height: 38px;
}
.switch a[aria-current="page"] { background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.ico-ext { width: .8em; height: .8em; margin-left: auto; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chip-doing { background: var(--ok-soft); color: var(--ok); font-weight: 600; }

/* --- Kanban ----------------------------------------------------------------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(15rem, 1fr)); gap: 1rem; align-items: start; overflow-x: auto; padding-bottom: .5rem; }
.column { background: var(--sunk); border-radius: var(--radius-lg); padding: .9rem .75rem 1rem; min-height: 12rem; transition: background-color .15s, box-shadow .15s; }
.column h2 { font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; margin: 0 .25rem .8rem; }
.column-doing h2::before, .column-todo h2::before, .column-waiting h2::before, .column-done h2::before {
  content: ""; width: .65rem; height: .65rem; border-radius: 50%; flex: none;
}
.column-todo h2::before { background: var(--muted); }
.column-doing h2::before { background: var(--orange); }
.column-waiting h2::before { background: var(--warm); }
.column-done h2::before { background: var(--ok); }
.column.is-over { background: var(--orange-soft); box-shadow: inset 0 0 0 2px var(--orange); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; min-height: 3rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .8rem .7rem;
  display: grid; gap: .35rem; cursor: grab; box-shadow: inset 4px 0 0 var(--axis);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.card:hover { box-shadow: inset 4px 0 0 var(--axis), 0 4px 14px rgb(0 0 0 / .07); }
.card.is-dragging { opacity: .45; transform: rotate(1.5deg); cursor: grabbing; }
.card.htmx-added { animation: row-in .3s ease-out; }
.card-project { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); }
.card-project a { color: inherit; text-decoration: none; }
.card-project a:hover { text-decoration: underline; }
.card-title { font-weight: 600; line-height: 1.35; }
.state-done .card-title { text-decoration: line-through; color: var(--muted); }
.card-state select { min-height: 34px; padding: .2rem .5rem; font-size: .88rem; width: auto; background: var(--sunk); border-color: transparent; }
.column-note { color: var(--muted); font-size: .85rem; margin: .7rem .25rem 0; }

/* --- Calendrier ------------------------------------------------------------- */
.cal-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cal-head h2 { font-size: 1.6rem; min-width: 11rem; text-align: center; }
.cal-today { font-weight: 600; }
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-weekdays span { padding: .55rem .7rem; font-size: .85rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 7.2rem; padding: .45rem .5rem .6rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; align-content: start; gap: .25rem; }
.cal-row > .cal-day:last-child { border-right: 0; }
.cal-row:last-child .cal-day { border-bottom: 0; }
.cal-day.is-weekend { background: color-mix(in srgb, var(--sunk) 55%, transparent); }
.cal-day.is-out .cal-num { color: color-mix(in srgb, var(--muted) 55%, transparent); }
.cal-num { font-family: var(--font-title); font-weight: 700; font-size: 1.05rem; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 50%; }
.cal-day.is-today .cal-num { background: var(--orange); color: var(--on-orange); }
.cal-item {
  display: block; font-size: .82rem; line-height: 1.25; padding: .22rem .45rem; border-radius: 6px; text-decoration: none;
  color: var(--ink); background: color-mix(in srgb, var(--axis) 16%, var(--surface)); box-shadow: inset 3px 0 0 var(--axis);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-item:hover { background: color-mix(in srgb, var(--axis) 26%, var(--surface)); }
.cal-item.is-task { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--axis) 45%, transparent); }
.cal-item.is-done { text-decoration: line-through; opacity: .6; }
.cal-legend { display: flex; gap: .6rem; margin: .7rem 0 1.5rem; color: var(--muted); font-size: .85rem; }
.cal-legend .cal-item { display: inline-flex; align-items: center; }
.lock-list { margin: .3rem 0 .6rem; padding-left: 1.1rem; }
@media (max-width: 820px) {
  .cal-weekdays span { padding: .4rem .3rem; font-size: .75rem; }
  .cal-day { min-height: 4.2rem; padding: .25rem; }
  .cal-item { font-size: 0; padding: 0; height: 6px; border-radius: 3px; }
  .cal-item svg { display: none; }
  .board { grid-template-columns: repeat(4, minmax(78vw, 1fr)); scroll-snap-type: x mandatory; }
  .column { scroll-snap-align: start; }
}
