/* ERP27 – feuille de style unique.
   Palette : anthracite (façades), blanc mélaminé, eucalyptus, chêne.
   Le motif de la cote (ligne de cotation d'un plan) signe la marque. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --ink: #1f2a2e;
  --ink-2: #4b585d;
  --ink-3: #6f7c80;
  --paper: #f4f5f2;
  --surface: #ffffff;
  --line: #dfe3de;
  --line-strong: #c3cbc5;
  --accent: #2c6652;
  --accent-hover: #245745;
  --accent-soft: #e2eee8;
  --oak: #c8975a;
  --oak-soft: #f6ecdf;
  --danger: #a43d2c;
  --danger-soft: #f9e7e2;
  --warn: #8f6210;
  --warn-soft: #f8efd9;
  --side: #1f2a2e;
  --side-ink: #dfe6e2;
  --side-ink-2: #9fb0aa;
  --radius: 6px;
  --radius-lg: 10px;
  --focus: 0 0 0 3px rgba(44, 102, 82, .35);
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; font-weight: 600; }
h1 { font-size: 1.65rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--surface); padding: .5rem 1rem; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 3px; }

/* ---------- Coque : menu latéral + contenu ---------- */

.shell {
  display: grid; grid-template-columns: 232px 1fr; min-height: 100vh;
  background: linear-gradient(to right, var(--side) 232px, var(--paper) 232px);
}
.sidebar {
  background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1.25rem .75rem 1rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: block; padding: .25rem .75rem .5rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-name { display: block; font-weight: 600; font-size: 1.05rem; letter-spacing: .01em; }

/* La cote : un trait fin borné de deux taquets, comme sur un plan. */
.brand-cote {
  display: block; position: relative; height: 9px; margin-top: .35rem; width: 100%;
}
.brand-cote::before {
  content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: var(--oak);
}
.brand-cote::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px;
  border-left: 1px solid var(--oak); border-right: 1px solid var(--oak);
}

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a {
  display: block; padding: .5rem .75rem; border-radius: var(--radius);
  color: var(--side-ink); text-decoration: none; font-weight: 500;
  border-left: 3px solid transparent;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a[aria-current="page"] { background: rgba(255,255,255,.08); color: #fff; border-left-color: var(--oak); }
.nav-title { margin: 0 0 .25rem; padding: 0 .75rem; color: var(--side-ink-2); font-size: .8rem; }
.nav-admin { margin-top: auto; }
.me { border-top: 1px solid rgba(255,255,255,.1); padding: .75rem .75rem 0; display: flex; flex-direction: column; gap: .15rem; }
.me-name { color: #fff; font-weight: 500; text-decoration: none; }
.me-name:hover { color: #fff; text-decoration: underline; }
.me-out { background: none; border: 0; padding: 0; color: var(--side-ink-2); font: inherit; font-size: .875rem; cursor: pointer; }
.me-out:hover { color: #fff; text-decoration: underline; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 2rem; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.menu-btn { display: none; }
.search { flex: 1; max-width: 560px; }
.search input { width: 100%; background: var(--paper); }
.content { padding: 1.75rem 2rem 4rem; max-width: 1180px; width: 100%; }

/* ---------- Pages publiques (connexion, installation) ---------- */

.public { display: grid; place-items: center; min-height: 100vh; padding: 1.5rem; background: var(--side); }
.public-card {
  width: 100%; max-width: 420px; background: var(--surface);
  border-radius: var(--radius-lg); padding: 2rem 2rem 1.5rem;
}
.brand-public { margin: 0 0 1.5rem; color: var(--ink); }
.brand-public .brand-cote { width: 100%; }

/* ---------- En-têtes de page ---------- */

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.25rem; flex-wrap: wrap;
}
.page-head h1 { margin: 0; }
.page-head p { margin: .25rem 0 0; }
.page-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.crumbs { margin: 0 0 .35rem; font-size: .875rem; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.title-line { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* ---------- Blocs ---------- */

.block {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem; margin-bottom: 1.25rem;
}
.block.narrow { max-width: 640px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.block-head h2 { margin: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; margin-bottom: 1.25rem; }
.cols > div { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.cols > div > .block, .form > .block { margin-bottom: 0; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: .5rem 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }

.empty { text-align: center; padding: 3rem 1rem; color: var(--ink-2); }
.empty h1 { margin-bottom: .75rem; }

/* ---------- Tableaux ---------- */

.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1.25rem; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-weight: 500; color: var(--ink-3); font-size: .85rem;
  padding: .6rem 1rem; border-bottom: 1px solid var(--line); background: #fafbf9;
}
.table td { padding: .7rem 1rem; border-top: 1px solid var(--line); vertical-align: top; }
.table tbody tr:first-child td { border-top: 0; }
.table tbody tr:hover { background: #fafbf9; }
.table .num { text-align: right; }
.row-link { font-weight: 500; color: var(--ink); text-decoration: none; }
.row-link:hover { color: var(--accent); text-decoration: underline; }
tr.is-off td, li.is-off { color: var(--ink-3); }
.table-foot { padding: .75rem 1rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; align-items: center; }

/* ---------- Formulaires ---------- */

.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field > label, .label { font-weight: 500; font-size: .92rem; }
.field.check { flex-direction: row; align-items: center; gap: .55rem; }
.field.check label { font-weight: 400; }
.help { margin: 0; color: var(--ink-3); font-size: .85rem; }
.field-error { margin: 0; color: var(--danger); font-size: .875rem; font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: .5rem .7rem; min-height: 40px; width: 100%;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
.input-unit { display: flex; align-items: stretch; }
.input-unit input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-unit span {
  display: grid; place-items: center; padding: 0 .7rem; color: var(--ink-3);
  border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--radius) var(--radius) 0; background: #fafbf9;
}
fieldset { border: 0; padding: 0; margin: 0; }
.perm-group { padding: .75rem 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .5rem; }
.perm-group:first-of-type { border-top: 0; }
.perm-group legend { font-weight: 600; padding: 0; margin-bottom: .5rem; float: left; width: 100%; }
.perm-group legend + * { clear: both; }
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.choice span {
  display: inline-block; padding: .4rem .8rem; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); font-size: .92rem;
}
.choice input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); font-weight: 500; }
.choice input:focus-visible + span { box-shadow: var(--focus); }

.form-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.sticky-actions { position: sticky; bottom: 0; background: var(--paper); padding: .75rem 0; border-top: 1px solid var(--line); }
.filters { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters select, .filters input { width: auto; }
.filters .grow { flex: 1; min-width: 200px; }
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; }
.tabs a {
  padding: .4rem .8rem; border-radius: 999px; text-decoration: none; color: var(--ink-2);
  border: 1px solid transparent; font-weight: 500; font-size: .92rem;
}
.tabs a:hover { background: var(--surface); border-color: var(--line); }
.tabs a[aria-current="page"] { background: var(--ink); color: #fff; }
.tabs .count { color: inherit; opacity: .7; font-weight: 400; margin-left: .2rem; }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 40px; padding: .45rem 1rem; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 500 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface); border-color: var(--line); }
.btn-danger { color: var(--danger); border-color: #e3b6ac; }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.btn-small { min-height: 32px; padding: .25rem .65rem; font-size: .875rem; }
.btn-wide { width: 100%; }
.btn-quick { flex: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn.danger { color: var(--danger); }
.danger-zone { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* ---------- Badges, messages ---------- */

.badge {
  display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 500;
  background: #eceeea; color: var(--ink-2); white-space: nowrap; vertical-align: 1px;
}
.badge-prospect { background: var(--oak-soft); color: #7a5524; }
.badge-client, .badge-on { background: var(--accent-soft); color: var(--accent-hover); }
.badge-off { background: #eceeea; color: var(--ink-3); }
.badge-late { background: var(--danger-soft); color: var(--danger); }
.badge-suivi { background: #e6eef8; color: #1d5fae; }
.suivi-liens { display: flex; flex-wrap: wrap; gap: .4rem; }
.badge-today { background: var(--warn-soft); color: var(--warn); }

.flash {
  padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem;
  background: var(--accent-soft); color: var(--accent-hover); border: 1px solid #c4ddd2;
}
.flash-erreur { background: var(--danger-soft); color: var(--danger); border-color: #ecc3b9; }

/* ---------- Modules ---------- */

.modules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.module {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem 1.25rem;
}
.module.is-off { background: transparent; border-style: dashed; }
.module.is-off h2 { color: var(--ink-2); }
.module h2 { margin-bottom: .25rem; }
.module p { margin: 0; }
.module-num { color: var(--oak); font-weight: 600; margin-right: .2rem; }
.module-action { display: flex; align-items: center; gap: .75rem; flex: none; }

/* ---------- Historique ---------- */

.history { margin-top: 2rem; }
.history-list { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 1px solid var(--line-strong); }
.history-list > li { position: relative; padding: 0 0 1rem .75rem; }
.history-list > li::before {
  content: ""; position: absolute; left: -1.33rem; top: .5rem; width: 7px; height: 7px;
  border-radius: 50%; background: var(--paper); border: 1px solid var(--ink-3);
}
.history-head { margin: 0; }
.history-what { font-weight: 500; }
.changes { list-style: none; margin: .25rem 0 0; padding: 0; font-size: .9rem; color: var(--ink-2); }
.changes li { padding: .1rem 0; }
.change-field { color: var(--ink-3); margin-right: .25rem; }
.changes del { color: var(--ink-3); }
.changes ins { text-decoration: none; background: var(--accent-soft); padding: 0 .2rem; border-radius: 3px; }

/* ---------- Accueil ---------- */

.home-head { margin-bottom: 1.5rem; }
.widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.25rem; align-items: start; }
.home-grid.has-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 1.25rem; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 1.25rem; }
@media (max-width: 1100px) {
  .home-grid.has-side { grid-template-columns: 1fr; }
  .home-side { order: -1; }
}
.widget { margin: 0; }
.widget-list { list-style: none; margin: 0; padding: 0; }
.widget-list li { display: flex; justify-content: space-between; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.widget-list li:first-child { border-top: 0; }
.widget-list .what { min-width: 0; }
.widget-list .what a { font-weight: 500; }
.widget-list .what p { margin: .1rem 0 0; color: var(--ink-2); font-size: .9rem; }

.hits { list-style: none; margin: 0; padding: 0; }
.hits li { border-top: 1px solid var(--line); }
.hits li:first-child { border-top: 0; }
.hits a { display: block; padding: .6rem 0; text-decoration: none; color: var(--ink); }
.hits a:hover .hit-title { color: var(--accent); text-decoration: underline; }
.hit-title { font-weight: 500; }

.setting-image {
  display: block; max-height: 80px; max-width: 260px; object-fit: contain;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: .35rem; margin-bottom: .35rem;
}

/* ---------- Fiches ---------- */

.prose { white-space: pre-line; overflow-wrap: anywhere; }
.sub { font-size: .95rem; margin-top: 1rem; color: var(--ink-2); }
.next-action { font-size: 1.05rem; margin-bottom: .35rem; }
.figure { font-size: 1.15rem; font-weight: 600; margin-bottom: .25rem; }
.person { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.person-name { margin: 0; }
.contact-line { display: flex; flex-wrap: wrap; gap: .1rem 1.25rem; margin: .1rem 0 0; }
.nowrap { white-space: nowrap; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.code {
  display: inline-block; font-weight: 600; letter-spacing: .06em; color: var(--ink);
  padding: 0 .4rem; border: 1px solid var(--line-strong); border-radius: 4px; background: #fafbf9; font-size: .9rem;
}
.code-lg { font-size: 1rem; padding: .05rem .5rem; }
.input-code { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; max-width: 10rem; }
.th-sort { color: inherit; text-decoration: none; }
.th-sort:hover { color: var(--accent); text-decoration: underline; }
.th-sort.is-on { color: var(--ink); }
.doublons { margin: .25rem 0 .75rem; padding-left: 1.1rem; }
.doublons li { margin: .2rem 0; }
.doublons span { color: var(--ink-2); }
.inline-form { margin-top: .75rem; }

details.disclose { margin-top: .75rem; }
details.disclose > summary {
  cursor: pointer; color: var(--accent); font-weight: 500; list-style: none; display: inline-flex; align-items: center; gap: .35rem;
}
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose > summary::before { content: "+"; font-weight: 600; width: 1ch; }
details.disclose[open] > summary::before { content: "−"; }
details.disclose[open] > summary { margin-bottom: .75rem; }
details.disclose-block > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem; }
details.disclose-block > summary::-webkit-details-marker { display: none; }
details.disclose-block > summary h2 { margin: 0; }
details.disclose-block > summary::after { content: "Afficher"; color: var(--accent); font-size: .9rem; font-weight: 500; margin-left: auto; }
details.disclose-block[open] > summary::after { content: "Masquer"; }
details.disclose-block[open] > summary { margin-bottom: 1rem; }

/* ---------- Petits écrans ---------- */

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; background: var(--paper); }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 20;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(15, 20, 22, .45); }
  .menu-btn {
    display: inline-flex; min-height: 40px; padding: .45rem .8rem; border-radius: var(--radius);
    border: 1px solid var(--line-strong); background: var(--surface); font: 500 .95rem var(--font); color: var(--ink);
  }
  .topbar { padding: .6rem 1rem; flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .btn-quick { margin-left: auto; }
  .content { padding: 1.25rem 1rem 3rem; }
  .cols { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .block { padding: 1rem; }
  .module { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 1.4rem; }

  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: .6rem 1rem; border-top: 1px solid var(--line); }
  .table-stack tbody tr:first-child { border-top: 0; }
  .table-stack td { border: 0; padding: .1rem 0; }
  .table-stack td[data-label]:not(:first-child)::before { content: attr(data-label) " : "; color: var(--ink-3); }
  .table-stack td:empty { display: none; }
  .table .num { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media print {
  .sidebar, .topbar, .form-actions, .danger-zone { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .block, .table-wrap { border-color: #ccc; }
}

/* Réglages › Envoi des emails */
.preset-list { display: grid; gap: .5rem; margin-bottom: 1rem; }
.preset { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; background: var(--surface); }
.preset:hover { border-color: var(--line-strong); }
.preset:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.preset input { margin-top: .2rem; accent-color: var(--accent); }
.preset-body { display: flex; flex-direction: column; gap: .15rem; }
.preset-name { font-weight: 500; }
.preset-tech { font-size: .82rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.preset-help { font-size: .85rem; color: var(--ink-2); }
.mail-form:has(input[name="fournisseur"]:checked):not(:has(input[name="fournisseur"][value="autre"]:checked)) .mail-autre { display: none; }

/* Fiche client : « + Nouvel apporteur… » montre ses cases seulement s'il est choisi. */
.nouvel-apporteur { display: none; border: 2px solid var(--accent); border-radius: var(--radius-lg); padding: 1rem 1.1rem 1.1rem; margin: .25rem 0 0; min-width: 0; background: #d7e6dd; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.nouvel-apporteur legend { padding: .2rem .7rem; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; }
.nouvel-apporteur legend .muted { color: #d9ebe2; font-weight: 400; }
.nouvel-apporteur input, .nouvel-apporteur select { background: #fff; }
.nouvel-apporteur .help { color: var(--ink-2); }
.grid-2:has(#apporteur option[value="nouveau"]:checked) .nouvel-apporteur { display: block; }
.nouvel-apporteur .help { margin: .5rem 0 0; }

/* Plusieurs fichiers ajoutés en plusieurs fois (data-cumul) */
.cumul { margin-top: .5rem; padding: .5rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--paper); }
.cumul.is-over { border-color: var(--accent); background: var(--accent-soft); }
.cumul-items { display: flex; flex-wrap: wrap; gap: .5rem; }
.cumul-items:empty { display: none; }
.cumul-item { position: relative; width: 104px; display: flex; flex-direction: column; gap: .15rem; }
.cumul-item img, .cumul-doc { width: 104px; height: 78px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.cumul-doc { display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: #a33a22; }
.cumul-nom { font-size: .75rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cumul-x { position: absolute; top: .2rem; right: .2rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .95); cursor: pointer; font-size: 1rem; line-height: 1; color: var(--ink-2); }
.cumul-x:hover { color: var(--danger); border-color: #e3b6ac; background: var(--danger-soft); }
.cumul-aide { margin: .4rem 0 0; }

/* Fête du prénom : jour et mois côte à côte. */
.fete-choix { display: flex; gap: .5rem; }
.fete-choix select:first-child { flex: 0 0 6.5rem; }
.fete-choix select:last-child { flex: 1 1 auto; min-width: 0; }
.fete-aide:empty { display: none; }
.widget-list .widget-side { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; flex: none; }

/* La semaine, en haut de l'accueil */
.home-head { align-items: flex-start; }
.semaine { flex: 1 1 22rem; max-width: 46rem; padding: .2rem 0 0 1.25rem; border-left: 3px solid var(--oak); }
.semaine p { margin: 0; }
.semaine-num { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.semaine-num > span:first-child { font-size: 1.6rem; font-weight: 700; color: var(--accent); letter-spacing: .02em; text-transform: uppercase; }
.semaine-dates { color: var(--ink-3); font-size: .9rem; }
.semaine-rien { font-size: 1.15rem; color: var(--ink-2); margin-top: .2rem !important; }
.semaine-liste { list-style: none; margin: .25rem 0 0; padding: 0; font-size: 1.02rem; display: flex; flex-direction: column; gap: .15rem; }
.semaine-jour { color: var(--ink-3); font-size: .9rem; }
@media (max-width: 700px) { .semaine { padding-left: .8rem; flex-basis: 100%; } .semaine-num > span:first-child { font-size: 1.35rem; } }
.badge-presc { background: #1f2a2e; color: #e9d3a8; text-decoration: none; }
a.badge-presc:hover { background: #33403f; }
.btn-presc { border-color: var(--oak); color: #7a5524; }
.btn-presc:hover { background: var(--oak-soft); border-color: #a87a3e; color: #5e3f17; }
.presc-aussi { margin-top: .25rem; }
