/* Devis & Commandes — feuille de style unique (aucune ressource externe) */

:root {
  --bg: #eef1f2;
  --surface: #ffffff;
  --ink: #18232d;
  --muted: #5b6a76;
  --line: #d3dade;
  --line-soft: #e6eaec;
  --accent: #1f5f8b;
  --accent-hover: #174b6f;
  --accent-soft: #e3eef6;
  --good: #1f7348;
  --good-soft: #e1f1e8;
  --warn: #8f5500;
  --warn-soft: #fbefd9;
  --bad: #a3352b;
  --bad-soft: #f8e3e0;
  --seg-purchases: #33506a;
  --seg-fees: #9bb0c0;
  --seg-margin: #2f8a5a;
  --radius: 6px;
  --font: "Segoe UI", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
  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 .6rem; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: .95rem; margin-top: 1rem; }
p { margin: 0 0 .75rem; }
code { background: var(--line-soft); padding: 0 .3em; border-radius: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.num { text-align: right; white-space: nowrap; }
.neg { color: var(--bad); }
.pos { color: var(--good); }
.hint { color: var(--muted); font-size: .85rem; margin: .4rem 0 0; }
.stack > * + * { margin-top: .9rem; }
.plain { list-style: none; margin: 0; padding: 0; }

/* ---------- Barre supérieure ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: .6rem 1.25rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.02rem; display: inline-flex; align-items: center; gap: .6rem; }
.brand-logo { display: block; height: 30px; width: auto; max-width: 140px; object-fit: contain; }
.mainnav { display: flex; gap: .25rem; flex-wrap: wrap; }
.mainnav a { color: var(--muted); text-decoration: none; padding: .4rem .7rem; border-radius: var(--radius); }
.mainnav a:hover { color: var(--ink); background: var(--bg); }
.mainnav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); font-weight: 600; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .9rem; }
.topbar-actions form { margin: 0; }
.user-link { color: var(--ink); text-decoration: none; }

/* ---------- Page ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.25rem 6rem; }
.page-narrow { max-width: 760px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .2rem; }
.page-head p { margin: 0; }
.crumb { font-size: .85rem; margin-bottom: .2rem !important; color: var(--muted); }
.crumb a { color: var(--muted); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.section { margin: 0 0 2rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.panel + .panel { margin-top: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.grid-2 > .panel + .panel { margin-top: 0; }
.empty-state { text-align: center; padding: 2.5rem 1rem; }
.danger-zone { margin-top: 2rem; }
.panel + .section, .grid-2 + .section, .page-narrow > .panel + .section { margin-top: 1.75rem; }

/* ---------- Messages ---------- */
.flash { padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid transparent; }
.flash-success { background: var(--good-soft); border-color: #bfdfcc; color: #164f33; }
.flash-error { background: var(--bad-soft); border-color: #e9bcb6; color: #7c241c; }
.flash-info { background: var(--accent-soft); border-color: #c3d8e8; color: #184866; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .5rem .95rem; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 550;
  text-decoration: none; cursor: pointer; line-height: 1.3;
}
.btn:hover { border-color: #b5c0c7; background: #f7f9fa; 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-danger { color: var(--bad); border-color: #e2b5af; }
.btn-danger:hover { background: var(--bad-soft); color: var(--bad); }
.btn-sm { padding: .32rem .7rem; font-size: .88rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.btn-link.danger { color: var(--bad); }
.btn-icon { width: 2rem; height: 2rem; border-radius: var(--radius); border: 1px solid transparent; background: none; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.btn-icon:hover { color: var(--bad); border-color: #e2b5af; background: var(--bad-soft); }

/* ---------- Formulaires ---------- */
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .45rem .6rem; width: 100%; min-width: 0;
}
textarea { resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 95, 139, .18); }
input[readonly] { background: var(--bg); }
.in-num { text-align: right; font-variant-numeric: tabular-nums; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field > span { font-size: .87rem; font-weight: 600; color: #34434f; }
.field > span .muted { font-weight: 400; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.check { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.check input { width: auto; }
fieldset { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: .8rem 1rem 1rem; margin: 0; }
legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.2rem; align-content: start; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid h2 { margin: 0; }
.span-2, .span-all { grid-column: 1 / -1; }
.form-narrow { max-width: 520px; }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: .8rem 0; border-top: 1px solid var(--line); }
.toolbar { display: flex; gap: .5rem; margin-bottom: 1rem; max-width: 520px; }
.inline-form { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; margin-top: .8rem; }
.inline-form .field { width: 150px; }
.inline-form .field.grow { flex: 1 1 200px; width: auto; }
.copy-field { display: flex; gap: .4rem; }
.copy-field input { font-size: .8rem; }
.auth-panel { max-width: 420px; margin: 3rem auto; }
.test-mail { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.test-mail p { margin: 0; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .6rem .8rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; text-align: left; }
.table th { font-size: .8rem; font-weight: 600; color: var(--muted); background: #f7f9fa; border-bottom-color: var(--line); }
.table th.num, .table td.num { text-align: right; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfc; }
.row-done { color: var(--muted); }
.in-qty { width: 4.5rem; display: inline-block; }

/* ---------- Onglets ---------- */
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .55rem .85rem; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.count { font-size: .78rem; color: var(--muted); background: var(--line-soft); border-radius: 9px; padding: 0 .45rem; margin-left: .2rem; }

/* ---------- Statuts ---------- */
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: .12rem .55rem; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; vertical-align: middle; letter-spacing: 0; }
.badge-quote { background: #edf0f2; color: #3c4b57; border-color: #d6dde2; }
.badge-active { background: var(--warn-soft); color: var(--warn); border-color: #efd6a8; }
.badge-shipping { background: var(--accent-soft); color: var(--accent); border-color: #c3d8e8; }
.badge-done { background: var(--good-soft); color: var(--good); border-color: #bfdfcc; }
.badge-lost { background: #f3eeee; color: #7b6461; border-color: #e3d6d4; text-decoration: line-through; text-decoration-color: rgba(123, 100, 97, .5); }

/* ---------- Indicateurs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; }
.kpi { background: var(--surface); padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .15rem; }
.kpi-label { color: var(--muted); font-size: .85rem; }
.kpi-value { font-size: 1.45rem; font-weight: 650; letter-spacing: -.01em; }
.kpi-sub { color: var(--muted); font-size: .85rem; }

/* ---------- Listes de définitions ---------- */
.dl { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.dl-tight dd { text-align: right; white-space: nowrap; }
.dl-tight .strong { color: var(--ink); }

/* ---------- Fiche commande ---------- */
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
.order-side { display: flex; flex-direction: column; gap: 1rem; }
.order-side .panel + .panel { margin-top: 0; }
.note { background: var(--surface); border-left: 3px solid var(--line); padding: .6rem .9rem; margin-top: .8rem; }
.note-internal { border-left-color: var(--warn); }

.margin-panel { border-top: 3px solid var(--seg-margin); }
.margin-figure { font-size: 2.1rem; font-weight: 700; letter-spacing: -.02em; margin: 0; color: var(--good); line-height: 1.1; }
.margin-figure.neg { color: var(--bad); }
.margin-rate { color: var(--muted); margin: .2rem 0 .9rem; }
.margin-bar { display: block; width: 100%; height: 14px; border-radius: 3px; background: var(--line-soft); margin-bottom: .9rem; overflow: hidden; }
.seg-purchases { fill: var(--seg-purchases); background: var(--seg-purchases); }
.seg-fees { fill: var(--seg-fees); background: var(--seg-fees); }
.seg-margin { fill: var(--seg-margin); background: var(--seg-margin); }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 2px; margin-right: .4rem; vertical-align: baseline; }

.shipment { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: .7rem; }
.shipment header { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; margin-bottom: .4rem; }
.shipment ul { margin-bottom: .4rem; }
.shipment footer { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line-soft); padding-top: .5rem; margin-top: .4rem; }
.shipment footer form { margin: 0; }
.shipment footer .muted { margin-right: auto; }

.timeline { list-style: none; margin: 1.1rem 0 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line-soft); }
.timeline li { position: relative; display: flex; flex-direction: column; padding: 0 0 .8rem .2rem; }
.timeline li::before { content: ""; position: absolute; left: calc(-1rem - 5px); top: .45rem; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.timeline li:first-child::before { background: var(--accent); }
.timeline-status { font-weight: 600; }
.log li { padding: .35rem 0; border-bottom: 1px solid var(--line-soft); }

/* ---------- Saisie des lignes ---------- */
.lines { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .8rem; }
.line-head, .line-row {
  display: grid;
  grid-template-columns: minmax(200px, 3fr) 92px minmax(190px, 2.2fr) 80px 120px 150px 40px;
  gap: .6rem; padding: .7rem .8rem; align-items: start;
}
.line-head { font-size: .8rem; font-weight: 600; color: var(--muted); background: #f7f9fa; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; padding-top: .5rem; padding-bottom: .5rem; }
.line-head .num { text-align: right; }
.line-row + .line-row { border-top: 1px solid var(--line-soft); }
.lc-main { display: flex; flex-direction: column; gap: .35rem; }
.line-top { display: flex; gap: .35rem; }
.line-top .grow { flex: 1; min-width: 0; }
.line-type select { width: auto; font-size: .85rem; padding-left: .4rem; padding-right: .4rem; background: var(--bg); }
.line-row.is-service { background: #f6f9fc; }
.line-row.is-service .line-type select { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lc-qty { display: flex; flex-direction: column; gap: .35rem; }
.lc-price { display: flex; flex-direction: column; gap: .35rem; }
.discount-field { display: grid; grid-template-columns: 1fr 46px; gap: .25rem; }
.discount-field select { padding-left: .3rem; padding-right: .1rem; font-size: .85rem; }
.discount-global { grid-template-columns: 1fr 78px; max-width: 260px; }
.line-discount { display: block; font-size: .8rem; color: var(--good); }
.price-was { text-decoration: line-through; color: var(--muted); font-size: .8rem; display: block; }
.doc-was { text-decoration: line-through; color: #777; font-size: 8pt; display: block; }
.doc-discount { color: #1a6b3c; white-space: nowrap; }
.line-row:not(.is-service) .unit-field { display: none; }
.unit-field select { font-size: .82rem; padding-left: .3rem; padding-right: .2rem; }
.is-service .origin-grid { display: none; }
.tag-service { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 3px; padding: 0 .35rem; margin-left: .35rem; vertical-align: 1px; }
.doc-section td { font-size: 8.5pt; font-weight: 700; color: #333; background: #f4f4f4; padding-top: 1.5mm !important; padding-bottom: 1.5mm !important; }
.origin-grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: .35rem .45rem; align-items: center; }
.origin-grid input { font-size: .88rem; padding-top: .35rem; padding-bottom: .35rem; }
.origin-kind { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.origin-sep { color: var(--muted); }
.flag { display: inline-block; width: 1.33em; height: 1em; vertical-align: -0.12em; margin-right: .35em; border-radius: 1px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); object-fit: cover; }
.origin { white-space: nowrap; display: inline-block; }
.flag[hidden] { display: none; }
.lf-country { position: relative; }
.flag-input { position: absolute; left: .55rem; top: 50%; transform: translateY(-50%); margin: 0; pointer-events: none; }
.lf-country.has-flag input { padding-left: 2.1rem; }
.lf { display: block; }
.lf-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lc-cost { display: flex; flex-direction: column; gap: .35rem; }
.cost-cur { display: grid; grid-template-columns: 76px 1fr; gap: .35rem; }
.lc-cost.is-eur .lf-rate { visibility: hidden; }
.lc-out { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; padding-top: .35rem; }
.out-sale { font-size: .8rem; color: var(--muted); }
.out-total { font-size: 1rem; }
.out-margin { font-size: .82rem; color: var(--good); }
.out-margin.neg { color: var(--bad); }
.lc-del { padding-top: .1rem; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.drag-handle { cursor: grab; color: var(--muted); font-size: 1.1rem; line-height: 1; padding: .2rem .3rem; border-radius: var(--radius); user-select: none; touch-action: none; }
.drag-handle:hover { color: var(--accent); background: var(--accent-soft); }
.btn-move { width: 1.6rem; height: 1.3rem; padding: 0; border: 1px solid transparent; border-radius: 4px; background: none; color: var(--muted); font-size: .65rem; line-height: 1; cursor: pointer; }
.btn-move:hover:not([disabled]) { color: var(--accent); border-color: #c3d8e8; background: var(--accent-soft); }
.btn-move[disabled] { opacity: .25; cursor: default; }
.line-row.is-dragging { opacity: .45; outline: 2px dashed var(--accent); outline-offset: -2px; }
.line-row.just-moved { animation: line-moved .9s ease-out; }
@keyframes line-moved { from { background-color: var(--accent-soft); } to { background-color: transparent; } }

.summary-bar {
  position: sticky; bottom: 0; z-index: 10; margin-top: 1.5rem;
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: .8rem 1.1rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  box-shadow: 0 -6px 18px rgba(24, 35, 45, .12);
}
.summary-figures { display: flex; gap: 2rem; flex-wrap: wrap; flex: 1; }
.summary-figures div { display: flex; flex-direction: column; }
.summary-figures span { font-size: .78rem; color: #b8c6d1; }
.summary-figures strong { font-size: 1.1rem; }
.summary-margin strong { color: #7fd6a6; font-size: 1.35rem; }
.summary-margin.is-neg strong { color: #ff9b8f; }
.summary-margin em { font-style: normal; font-size: .82rem; color: #b8c6d1; }
.summary-actions { display: flex; gap: .5rem; }
.summary-bar .btn:not(.btn-primary) { background: transparent; color: #fff; border-color: #56697a; }
.summary-bar .btn-primary { background: #fff; color: var(--ink); border-color: #fff; }
.summary-bar .btn-primary:hover { background: #e3eef6; }

/* ---------- Espace client ---------- */
.public-brand { font-weight: 700; font-size: 1.05rem; margin: .5rem 0 1.2rem; display: flex; align-items: center; gap: .7rem; }
.public-brand .brand-logo { height: 40px; max-width: 180px; }
.tracking-status { margin: .3rem 0 1rem; }
.progress { list-style: none; padding: 0; margin: 1.2rem 0 1.4rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; counter-reset: step; }
.progress li { counter-increment: step; font-size: .85rem; color: var(--muted); padding-top: .7rem; border-top: 4px solid var(--line-soft); }
.progress li.is-done { border-top-color: var(--good); color: var(--ink); }
.progress li.is-current { border-top-color: var(--accent); color: var(--ink); font-weight: 650; }
.tracking-totals { max-width: 320px; margin: 1rem 0 0 auto; }

/* ---------- Espace client : virement et CGV ---------- */
.pay-panel { margin-top: 1rem; border-top: 3px solid var(--accent); }
.pay-amount { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.pay-amount strong { font-size: 1.6rem; letter-spacing: -.01em; }
.bank { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; margin: 1rem 0 .4rem; align-items: center; }
.bank dt { color: var(--muted); }
.bank dd { margin: 0; }
.bank-copy { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .95rem; letter-spacing: .02em; }
.sr-copy { position: fixed; left: -9999px; top: 0; }
.cgv { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.1rem; }
.cgv[open] { padding-bottom: 1rem; }
.cgv summary { cursor: pointer; font-weight: 650; padding: .9rem 0; }
.cgv-body { max-width: 72ch; font-size: .92rem; line-height: 1.6; }
.cgv-body h3 { font-size: 1rem; margin: 1.2rem 0 .4rem; }
.cgv-body ul { margin: 0 0 .75rem; padding-left: 1.2rem; }

.doc-list li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .7rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .5rem; }
.doc-list a { font-weight: 600; }
.row-actions { display: inline-flex; gap: .9rem; justify-content: flex-end; }
.row-actions form { margin: 0; }
.inline-form .check { align-self: center; }
.mt { margin-top: .8rem; }
.btn-link[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Devis imprimable ---------- */
.print-body { background: #dde3e6; }
.print-toolbar { max-width: 210mm; margin: 1rem auto; display: flex; justify-content: space-between; gap: .5rem; padding: 0 .5rem; }
.doc { background: #fff; max-width: 210mm; min-height: 297mm; margin: 0 auto 2rem; padding: 16mm 15mm; font-size: 10pt; line-height: 1.45; color: #111; }
.doc h1 { font-size: 20pt; margin: 0; letter-spacing: -.01em; }
.doc h2 { font-size: 8.5pt; font-weight: 600; color: #555; margin: 0 0 .3rem; }
.doc-head { display: flex; justify-content: space-between; gap: 2rem; padding-bottom: 8mm; border-bottom: 2px solid #111; }
.doc-company-name { font-size: 13pt; display: block; margin-bottom: .2rem; }
.doc-logo { display: block; max-height: 22mm; max-width: 70mm; width: auto; height: auto; margin-bottom: 3mm; }
.doc-title { text-align: right; }
.doc-title p { margin: 0; }
.doc-ref { font-size: 12pt; font-weight: 700; margin: .1rem 0 .4rem !important; }
.doc-parties { display: flex; gap: 12mm; margin: 8mm 0 6mm; }
.doc-parties > div { flex: 1; }
.doc-parties > div:first-child { flex: 0 1 50%; margin-left: auto; order: 2; border: 1px solid #ccc; padding: 4mm 5mm; }
.doc-subject { font-weight: 600; margin-bottom: 4mm; }
.doc-table { width: 100%; border-collapse: collapse; margin-bottom: 6mm; }
.doc-table th { text-align: left; font-size: 8.5pt; font-weight: 600; border-bottom: 1.5px solid #111; padding: 2mm 2mm; }
.doc-table td { padding: 2.5mm 2mm; border-bottom: 1px solid #ddd; vertical-align: top; }
.doc-table .num { text-align: right; white-space: nowrap; }
.doc-desc { color: #444; font-size: 9pt; margin-top: 1mm; }
.doc-origin { color: #555; font-size: 8.5pt; margin-top: 1mm; font-style: italic; }
.doc-origin .flag { width: 4.4mm; height: 3.3mm; vertical-align: -0.5mm; margin-right: 1.5mm; box-shadow: 0 0 0 0.2mm rgba(0, 0, 0, .25); }
@media print { .flag { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.doc-bottom { display: flex; gap: 10mm; align-items: flex-start; }
.doc-notes { flex: 1; font-size: 9pt; color: #333; }
.doc-totals { border-collapse: collapse; min-width: 70mm; }
.doc-totals th { text-align: left; font-weight: 400; padding: 1.5mm 3mm 1.5mm 0; }
.doc-totals td { text-align: right; padding: 1.5mm 0; white-space: nowrap; }
.doc-grand th, .doc-grand td { font-weight: 700; font-size: 11.5pt; border-top: 1.5px solid #111; padding-top: 2.5mm; }
.doc-vat-note { font-size: 9pt; margin-top: 3mm; }
.doc-sign { margin-top: 10mm; margin-left: auto; width: 80mm; }
.doc-sign p { font-size: 9pt; margin-bottom: 2mm; }
.doc-sign-box { height: 28mm; border: 1px solid #aaa; }
.doc-extra { display: flex; gap: 10mm; margin-top: 6mm; align-items: flex-start; font-size: 9pt; }
.doc-bank { border: 1px solid #ccc; padding: 3mm 4mm; flex: 0 0 auto; }
.doc-bank p { margin: 0; }
.doc-cgv-link { flex: 1; color: #333; margin: 0; word-break: break-all; }
.doc-cgv .cgv-body { max-width: none; font-size: 9.5pt; margin-top: 6mm; }
.doc-cgv .cgv-body h3 { font-size: 10.5pt; break-after: avoid; }
.doc-foot { margin-top: 12mm; padding-top: 3mm; border-top: 1px solid #ccc; font-size: 8pt; color: #555; text-align: center; }

@media print {
  /* Marges fixées par la page : identiques quel que soit le navigateur (réglage « Marges : par défaut ») */
  @page { size: A4 portrait; margin: 14mm 13mm 14mm 13mm; }
  html, body, .print-body { background: #fff !important; margin: 0; padding: 0; width: auto; }
  .no-print { display: none !important; }
  .doc { margin: 0; padding: 0; max-width: none; width: auto; min-height: 0; box-shadow: none; }
  .doc, .doc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc a { color: inherit; text-decoration: none; }
  .doc-table thead { display: table-header-group; }   /* en-tête de colonnes répété sur chaque page */
  .doc-table tr, .doc-section td { break-inside: avoid; page-break-inside: avoid; }
  .doc-section { break-after: avoid; page-break-after: avoid; }
  .doc-head, .doc-parties, .doc-bottom, .doc-extra, .doc-sign, .doc-totals, .doc-bank { break-inside: avoid; page-break-inside: avoid; }
  .doc-foot { break-inside: avoid; }
}

/* ---------- Menu déroulant (Dupliquer) ---------- */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary::after { content: "▾"; font-size: .75em; margin-left: .2rem; }
.dropdown[open] > summary { border-color: var(--accent); background: var(--accent-soft); }
.dropdown-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(340px, 90vw); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(24, 35, 45, .16); padding: 1rem; }
.dropdown-panel p { margin: 0; }

/* ---------- Fournisseurs ---------- */
.supplier-costs { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .4rem; }
.sc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 150px; gap: .8rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--line-soft); }
.sc-row:last-child { border-bottom: 0; }
.sc-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-field { display: flex; align-items: center; gap: .4rem; }
.line-supplier { display: block; font-size: .8rem; color: var(--muted); }
.purchases { display: grid; gap: .8rem; }
.purchase { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; }
.purchase.is-todo { border-left-color: var(--warn); }
.purchase.is-ordered { border-left-color: var(--accent); }
.purchase.is-late { border-left-color: var(--bad); }
.purchase.is-done { border-left-color: var(--good); }
.purchase-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.purchase-head h3 { margin: 0; font-size: 1rem; }
.purchase-state { font-size: .85rem; font-weight: 600; }
.is-todo .purchase-state { color: var(--warn); }
.is-ordered .purchase-state { color: var(--accent); }
.is-late .purchase-state { color: var(--bad); }
.is-done .purchase-state { color: var(--good); }
.purchase-lines { font-size: .88rem; margin-bottom: .6rem; }
.purchase-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; }
.purchase-form { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; align-items: end; }
.purchase-form .span-note { grid-column: 1 / -2; }
.purchase-actions { display: flex; gap: .4rem; flex-wrap: wrap; grid-column: 1 / -1; }
.purchase-contact { font-size: .82rem; }
.orphan-note { display: flex; gap: .8rem; align-items: baseline; flex-wrap: wrap; margin-bottom: .6rem; }

/* ---------- Paramètres : logo, numérotation, mise à jour ---------- */
.logo-row { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; }
.logo-preview { width: 220px; height: 110px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; padding: .8rem; background: repeating-conic-gradient(#f3f5f6 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.logo-preview.is-empty { background: var(--bg); }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.logo-form input[type=file], .panel input[type=file] { width: auto; max-width: 100%; border-style: dashed; }
.numbering { display: grid; gap: 1rem; margin-top: .6rem; }
.num-preview { margin: 0; color: var(--muted); }
.num-preview strong { color: var(--ink); font-size: 1.05rem; }
.num-preview.is-invalid strong { color: var(--bad); font-weight: 500; font-size: .9rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.section-head h2, .section-head form { margin: 0; }
.steps { margin: 0; padding-left: 1.2rem; }
.steps li + li { margin-top: .25rem; }
.checks li { display: flex; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line-soft); }
.checks li:last-child { border-bottom: 0; }
.check-mark { width: 1.3rem; height: 1.3rem; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }
.is-ok .check-mark { background: var(--good-soft); color: var(--good); }
.is-ko .check-mark { background: var(--warn-soft); color: var(--warn); }

/* ---------- Responsive ---------- */
@media screen and (max-width: 1080px) {
  .order-layout { grid-template-columns: minmax(0, 1fr); }
  .line-head { display: none; }
  .line-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lc-main { grid-column: 1 / -1; }
  .lc-cost { grid-column: span 2; }
  .lc-out { grid-column: span 3; align-items: flex-start; }
  .lf-label { position: static; width: auto; height: auto; clip: auto; font-size: .78rem; color: var(--muted); display: block; margin-bottom: .15rem; }
  .lc-main .lf-label { display: none; }
}
@media screen and (max-width: 900px) {
  .purchase-form { grid-template-columns: 1fr 1fr; }
  .purchase-form .span-note { grid-column: 1 / -1; }
}
@media screen and (max-width: 720px) {
  .dropdown { flex-basis: 100%; }
  .dropdown[open] > summary { display: inline-flex; }
  .dropdown-panel { position: static; width: auto; margin-top: .5rem; box-shadow: none; }
  .sc-row { grid-template-columns: 1fr 1fr; }
  .sc-name { grid-column: 1 / -1; }
  .page { padding: 1rem .8rem 7rem; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .topbar-inner { gap: .6rem 1rem; }
  .topbar-actions { margin-left: 0; width: 100%; }
  .line-row { grid-template-columns: 1fr 1fr; }
  .lc-cost, .lc-out { grid-column: 1 / -1; }
  .topbar { position: static; }
  .summary-bar { position: static; box-shadow: none; padding: .6rem .8rem; gap: .6rem; }
  .summary-figures { display: grid; grid-template-columns: repeat(4, auto); gap: .2rem .9rem; width: 100%; }
  .summary-figures span { font-size: .7rem; }
  .summary-figures strong, .summary-margin strong { font-size: .95rem; }
  .summary-margin em { display: none; }
  .summary-actions { width: 100%; }
  .summary-actions .btn { flex: 1; padding: .4rem .6rem; }
  .doc { padding: 8mm 6mm; min-height: 0; }
  .doc-head, .doc-parties, .doc-bottom, .doc-extra { flex-direction: column; gap: 4mm; }
  .bank { grid-template-columns: 1fr; gap: .1rem; }
  .bank dd { margin-bottom: .5rem; }
  .doc-title { text-align: left; }
  .doc-parties > div:first-child { order: 0; margin-left: 0; }
  .doc-totals { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .line-row.just-moved { animation: none; }
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Abonnements ---------- */
.kpi-link { color: inherit; text-decoration: none; }
.kpi-link:hover .kpi-value { color: var(--accent); }
.kpi-value-sm { font-size: 1.05rem; }
.alert-list li { padding: .45rem .8rem; background: var(--warn-soft); border-left: 3px solid var(--warn); border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: .4rem; }
.number-list { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: .6rem; }
.section-head h2 { margin: 0; }
.section-head .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.section-head form, .page-head .actions form { margin: 0; }
.table tfoot th { border-top: 2px solid var(--line); padding: .55rem .7rem; text-align: left; }
.table tfoot th.num { text-align: right; }
.table-compact th, .table-compact td { font-size: .8rem; padding: .3rem .45rem; }
.month-strip { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 4px; }
.month-strip li { border: 1px solid var(--line); border-radius: var(--radius); padding: .35rem .45rem; background: var(--surface); display: flex; flex-direction: column; line-height: 1.25; }
.month-strip span { font-weight: 600; font-size: .85rem; }
.month-strip small { font-size: .72rem; color: var(--muted); }
.month-strip .is-prepaid { background: var(--good-soft); border-color: #bfdfcc; }
.month-strip .is-prepaid small { color: var(--good); }
.month-strip .is-off { opacity: .45; }
.month-strip .is-now { outline: 2px solid var(--accent); outline-offset: -1px; }
.prepay-form { margin-top: 1rem; flex-wrap: wrap; }
.recap-client { margin-bottom: 1rem; }
.recap-client.is-invoiced { border-left: 3px solid var(--good); }
.recap-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; margin-bottom: .6rem; }
.recap-head h2 { margin: 0; margin-right: auto; font-size: 1.05rem; }
.recap-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .7rem; }
.recap-foot form { margin: 0; }
.coef-field { max-width: 22rem; margin-bottom: .8rem; }
.rates-table input.in-num { width: 7.5rem; }
.row-included td { background: var(--good-soft); }
.mapping { margin: 1rem 0; }
.mapping > summary { cursor: pointer; font-weight: 600; }
.mapping[open] > summary { margin-bottom: .8rem; }
.statement-links a { margin-right: .5rem; white-space: nowrap; }
.sub-card p { margin: .3rem 0 0; }
.doc-h2 { font-size: 10.5pt; margin: 4mm 0 2mm; }
.doc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; }
.doc-two h3 { font-size: 9.5pt; margin: 0 0 1.5mm; }
.doc-table-sm th { font-size: 8pt; padding: 1.2mm 1.5mm; }
.doc-table-sm td { font-size: 8.5pt; padding: 1.2mm 1.5mm; }
@media print {
  .doc-break { break-before: page; page-break-before: always; margin-top: 0; }
  .doc-two { break-inside: avoid; }
  .recap-client { break-inside: avoid; }
}
@media screen and (max-width: 720px) {
  .doc-two { grid-template-columns: 1fr; gap: 2mm; }
  .month-strip { grid-template-columns: repeat(4, 1fr); }
  .rates-table input.in-num { width: 5.5rem; }
}

.bare-form { display: flex; flex-wrap: wrap; gap: .5rem .6rem; align-items: flex-end; margin: 0; }
.bare-form .field.grow { flex: 1 1 240px; }
.page-head .actions, .section-head .actions { align-items: center; }
.field[hidden] { display: none; }
.print-toolbar { flex-wrap: wrap; }
@media screen and (max-width: 720px) {
  .doc-statement .doc-table th, .doc-statement .doc-table td { padding: 1.2mm 1mm; font-size: .78rem; }
  .doc-statement .doc-table .num { white-space: normal; }
  .doc-calls th:nth-child(2), .doc-calls td:nth-child(2), .doc-calls th:nth-child(4), .doc-calls td:nth-child(4) { display: none; }
}
.print-toolbar { align-items: center; }
.month-strip .is-invoiced { background: var(--accent-soft); border-color: #c3d8e8; }
.month-strip .is-invoiced small { color: var(--accent); }
.month-strip .is-late { background: var(--warn-soft); border-color: #efd6a8; }
.month-strip .is-late small { color: var(--warn); }
.month-strip .is-covered small { color: var(--muted); }

/* ---------- Code d'accès ---------- */
.access-panel { max-width: 34rem; }
.access-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-top: .8rem; }
.access-code { font-size: 1.5rem; letter-spacing: .35em; width: 10.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.recap-invoice > summary { list-style: none; cursor: pointer; }
.recap-invoice > summary::-webkit-details-marker { display: none; }
.recap-invoice[open] { flex-basis: 100%; }
.recap-invoice[open] > form { margin-top: .6rem; padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius); }
.recap-foot .bare-form > input { width: 15rem; }

/* Échéancier détaillé : abonnement + consommations */
.month-strip-detail { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.month-strip-detail li { padding: 0; }
.month-strip-detail li > a, .month-strip-detail li > span:first-child { display: flex; flex-direction: column; padding: .4rem .5rem; color: inherit; text-decoration: none; height: 100%; }
.month-strip-detail li > a:hover { background: rgba(31, 95, 139, .06); }
.month-strip-detail li:not(:has(> a)) { padding: .4rem .5rem; }
.month-strip-detail .st { display: block; padding-left: .8rem; position: relative; }
.month-strip-detail .st::before { content: ""; position: absolute; left: 0; top: .42em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--line); }
.st-paid::before, .st-prepaid::before { background: var(--good) !important; }
.st-invoiced::before { background: var(--accent) !important; }
.st-due::before, .st-missing::before { background: var(--warn) !important; }
.st-included::before { background: var(--seg-fees) !important; }
.month-strip .is-paid { background: var(--good-soft); border-color: #bfdfcc; }
.month-strip .is-due { background: var(--warn-soft); border-color: #efd6a8; }
.month-strip .is-upcoming { background: var(--surface); }
.in-code { width: 6.5rem; }
.rates-table .in-label { width: 13rem; }
#personnalisation h3 { margin-top: 1.2rem; }
#personnalisation td .bare-form { flex-wrap: nowrap; align-items: center; }
#personnalisation td .bare-form input[name=label] { width: 13rem; }
@media screen and (max-width: 720px) { #personnalisation td .bare-form { flex-wrap: wrap; } }

/* ---------- Espace client ---------- */
.page-portal { max-width: 1180px; }
.portal-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.2rem 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; margin-bottom: 1.5rem; border-top: 3px solid var(--accent); }
.portal-hero h1 { margin: 0; font-size: 1.6rem; }
.portal-hero p { margin: .15rem 0 0; }
.portal-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 600; color: var(--accent); margin: 0 0 .2rem !important; }
.portal-stats { display: flex; flex-wrap: wrap; gap: .6rem; }
.portal-stat { min-width: 150px; padding: .65rem .9rem; border-radius: var(--radius); background: var(--bg, #f4f6f8); border: 1px solid var(--line); display: flex; flex-direction: column; }
.portal-stat span { font-size: .75rem; color: var(--muted); }
.portal-stat strong { font-size: 1.35rem; line-height: 1.25; font-variant-numeric: tabular-nums; }
.portal-stat small { font-size: .75rem; color: var(--muted); }
.portal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
.portal-section { margin-bottom: 1.6rem; }
.portal-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; margin-bottom: .6rem; }
.portal-section-head h2 { margin: 0; font-size: 1.1rem; }
.portal-aside { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 1rem; }
.portal-aside .panel h2 { font-size: 1rem; margin: 0 0 .6rem; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-flush .table { margin: 0; }
.sub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.sub-card { display: flex; flex-direction: column; gap: .45rem; margin: 0; }
.sub-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.sub-card h3 { margin: 0; font-size: 1rem; }
.sub-card p { margin: 0; }
.sub-price strong { font-size: 1.15rem; }
.sub-numbers li { padding: .15rem 0; }
.sub-meta { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; margin: .2rem 0 0; font-size: .85rem; }
.sub-meta dt { color: var(--muted); }
.sub-meta dd { margin: 0; }
.sub-prepaid { margin-top: auto !important; padding: .35rem .6rem; border-radius: var(--radius); background: var(--good-soft); color: var(--good); font-size: .85rem; font-weight: 600; }
.row-links { text-align: right; white-space: nowrap; }
.row-links a + a { margin-left: .8rem; }
.invoice-list li { display: flex; flex-direction: column; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.invoice-list li:last-child { border-bottom: 0; }
.invoice-list a { font-weight: 600; display: inline-flex; align-items: center; gap: .45rem; }
.pdf-ico { font-size: .6rem; font-weight: 700; color: #fff; background: #c0392b; border-radius: 3px; padding: .1rem .25rem; letter-spacing: .03em; }
.invoice-list + .more, .more { margin-top: .4rem; }
.more > summary { cursor: pointer; font-size: .85rem; color: var(--accent); }
.contact-list li { padding: .15rem 0; }
.portal-logout { display: flex; flex-direction: column; gap: .2rem; padding: 0 .3rem; }
.portal-logout .btn-link { align-self: flex-start; }
@media screen and (max-width: 980px) {
  .portal-grid { grid-template-columns: minmax(0, 1fr); }
  .portal-aside { position: static; }
}
@media screen and (max-width: 600px) {
  .portal-hero { padding: 1.1rem; }
  .portal-stats { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .portal-stat { min-width: 0; }
  .hide-sm { display: none; }
}
.sub-cards > .sub-card, .portal-aside > .panel, .portal-section > .panel { margin: 0; }
.portal-aside .bank { display: block; }
.portal-aside .bank dt { font-size: .78rem; color: var(--muted); margin-top: .5rem; }
.portal-aside .bank dt:first-child { margin-top: 0; }
.portal-aside .bank dd { margin: .1rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
@media screen and (max-width: 600px) {
  .row-links a { display: block; }
  .row-links a + a { margin: .3rem 0 0; }
  .portal-section .table td, .portal-section .table th { padding-left: .55rem; padding-right: .55rem; }
}

/* ---------- Réponse au devis ---------- */
.quote-answer { border-top: 3px solid var(--accent); }
.answer-grid { display: flex; flex-direction: column; gap: 1rem; margin-top: .8rem; }
.answer-accept { display: flex; flex-direction: column; gap: .7rem; max-width: 34rem; }
.answer-accept .btn-lg { align-self: flex-start; }
.btn-lg { padding: .7rem 1.4rem; font-size: 1rem; }
.answer-refuse > summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.answer-refuse form { display: flex; flex-direction: column; gap: .6rem; max-width: 34rem; margin-top: .6rem; align-items: flex-start; }
.answer-refuse .field { width: 100%; }
.quote-decided p { margin: 0; font-weight: 600; }
.decision-note { margin: .3rem 0 0; font-size: .85rem; padding: .3rem .6rem; border-radius: var(--radius); display: inline-block; }
.decision-accepted { background: var(--good-soft); color: var(--good); }
.decision-refused { background: var(--warn-soft); color: var(--warn); }

/* ---------- Grilles tarifaires datées ---------- */
.plan-list { list-style: none; margin: .6rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem; }
.plan-list a { display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; height: 100%; }
.plan-list a:hover { border-color: var(--accent); }
.plan-list .is-selected a { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.plan-new > summary { list-style: none; cursor: pointer; }
.plan-new > summary::-webkit-details-marker { display: none; }
.plan-new[open] > form { margin-top: .7rem; }
.section-title { font-size: 1.1rem; margin: 1.4rem 0 .6rem; }
.rates-filter { max-width: 16rem; }
.included-list li { padding: .25rem 0; }
.portal-hero .actions { display: flex; gap: .5rem; }
.badge-old { background: #eef0f2; color: var(--muted); border-color: var(--line); }

/* ---------- Destinations incluses par abonnement ---------- */
.inc-box { display: flex; flex-direction: column; gap: .4rem; }
.inc-custom { margin-top: .5rem; display: flex; flex-direction: column; gap: .9rem; padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius); }
.inc-custom[hidden], .inc-box[hidden] { display: none; }
.inc-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .9rem; margin-bottom: .4rem; }
.inc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .2rem .8rem; }
.inc-grid .check { margin: 0; }
