/* Agent Presse — interface (démo). Aucune ressource externe : fonctionne hors ligne / sur réseau fermé. */
:root {
  --navy: #14223d;
  --navy-2: #1d2f52;
  --navy-3: #2a4170;
  --accent: #e8772e;
  --accent-2: #f39a5c;
  --accent-soft: #fdf0e6;
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #e2e6ee;
  --border-strong: #cfd6e3;
  --text: #1b2333;
  --muted: #677189;
  --faint: #9aa3b5;
  --ok: #17915a;
  --ok-soft: #e5f6ee;
  --warn: #c27c00;
  --warn-soft: #fff4dc;
  --danger: #d23f3f;
  --danger-soft: #fdeaea;
  --info: #2f6fde;
  --info-soft: #e8f0fd;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(20, 34, 61, .06), 0 2px 8px rgba(20, 34, 61, .05);
  --shadow-lg: 0 10px 40px rgba(20, 34, 61, .18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.hidden { display: none !important; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
.ic.sm { width: 15px; height: 15px; vertical-align: -3px; }
.ic.lg { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ coque */
.shell { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 232px; flex: none; background: var(--navy); color: #c9d3e6; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), #d4561a); display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; letter-spacing: -.02em; box-shadow: 0 2px 8px rgba(232, 119, 46, .35); }
.brand b { display: block; font-size: 15px; }
.brand small { display: block; color: #8d9bb8; font-size: 11.5px; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 10px; }
.nav-group { padding: 14px 10px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #6f7f9f; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: #c9d3e6; font-weight: 500; position: relative; }
.nav a:hover { background: var(--navy-2); color: #fff; text-decoration: none; }
.nav a.on { background: var(--navy-3); color: #fff; }
.nav a.on::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav a.locked { opacity: .45; }
.nav a .lock { margin-left: auto; width: 13px; height: 13px; }
.nav .count { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; border-radius: 10px; padding: 0 7px; font-weight: 700; }
.sidebar-foot { padding: 12px 16px 16px; border-top: 1px solid #22345a; font-size: 12px; color: #8d9bb8; }
.sidebar-foot .lic { display: flex; align-items: center; gap: 6px; color: #c9d3e6; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--ok); }
.dot.warn { background: #f0a500; }
.dot.bad { background: var(--danger); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 58px; flex: none; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; padding: 0 22px; }
.gsearch { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; width: min(460px, 50vw); color: var(--muted); }
.gsearch input { border: 0; background: transparent; outline: none; height: 36px; flex: 1; font: inherit; color: var(--text); }
.gsearch kbd { font-family: var(--font); font-size: 11px; border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; color: var(--faint); }
.userchip { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 4px; border-radius: 22px; cursor: pointer; border: 1px solid transparent; background: none; font: inherit; color: inherit; }
.userchip:hover { background: var(--surface-2); border-color: var(--border); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy-3); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; }
.userchip .who { text-align: left; line-height: 1.2; }
.userchip .who small { display: block; color: var(--muted); font-size: 11.5px; }
.view { flex: 1; overflow: auto; padding: 22px 26px 40px; }
.banner { padding: 9px 22px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.banner.warn { background: var(--warn-soft); color: #7a5300; border-bottom: 1px solid #f2dca8; }
.banner.bad { background: var(--danger-soft); color: #8f2323; border-bottom: 1px solid #f2c4c4; }
.banner.info { background: var(--info-soft); color: #1d4c9e; border-bottom: 1px solid #c9dafa; }

/* ------------------------------------------------------------------ éléments */
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-body { padding: 16px 18px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.span4 { grid-column: span 4; }
.span5 { grid-column: span 5; }
.span-all { grid-column: 1 / -1; }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--surface-2); border-color: #b9c2d3; text-decoration: none; }
.btn:active { transform: translateY(.5px); }
.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.accent:hover { background: #d9671f; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: #eab0b0; }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--border); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 13px; }
.btn.xs { height: 24px; padding: 0 7px; font-size: 12px; gap: 4px; }
.btn.icon { padding: 0; width: 34px; justify-content: center; }
.btn.icon.sm { width: 28px; }
.btn.on { background: var(--navy); color: #fff; border-color: var(--navy); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; margin-bottom: 14px; box-shadow: var(--shadow); }
.tgroup { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.tsep { width: 1px; align-self: stretch; background: var(--border); margin: 2px 4px; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { border: 0; background: var(--surface); height: 32px; padding: 0 12px; font: inherit; font-weight: 550; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button + button { border-left: 1px solid var(--border-strong); }
.seg button.on { background: var(--navy); color: #fff; }
.found { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: #8a3d0c; border: 1px solid #f6d3b8; border-radius: 20px; padding: 3px 12px; font-weight: 600; font-size: 13px; }
.found b { font-size: 14.5px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: #bfe8d3; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: #f2dca8; }
.badge.bad { background: var(--danger-soft); color: var(--danger); border-color: #f2c4c4; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: #c9dafa; }
.badge.navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.badge.accent { background: var(--accent-soft); color: #b0510f; border-color: #f6d3b8; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 20px; background: var(--info-soft); color: #1d4c9e; font-size: 12.5px; font-weight: 600; border: 1px solid #c9dafa; }
.chip button { border: 0; background: transparent; color: inherit; cursor: pointer; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; opacity: .6; padding: 0; }
.chip button:hover { opacity: 1; background: rgba(47, 111, 222, .15); }
.chip.plain { padding-right: 10px; cursor: pointer; }
.chip.plain:hover { background: #dbe7fc; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-mini { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 10px; background: var(--info-soft); color: #1d4c9e; margin: 1px 2px 1px 0; white-space: nowrap; }

/* ------------------------------------------------------------------ formulaires */
label.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
label.f > span { font-size: 12px; color: var(--muted); font-weight: 550; display: flex; align-items: center; gap: 5px; }
input, select, textarea { font: inherit; color: var(--text); }
.input, label.f input:not([type=checkbox]):not([type=radio]), label.f select, label.f textarea, .field-input {
  height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); outline: none; width: 100%; min-width: 0; transition: border-color .12s, box-shadow .12s;
}
label.f textarea, textarea.input { height: auto; min-height: 90px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.input:focus, label.f input:focus, label.f select:focus, label.f textarea:focus { border-color: var(--info); box-shadow: 0 0 0 3px rgba(47, 111, 222, .14); }
label.f input:disabled, label.f select:disabled, label.f textarea:disabled { background: var(--surface-2); color: var(--muted); }
label.f input.ro { background: var(--surface-2); border-style: dashed; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--navy); }
input[type=checkbox] { accent-color: var(--navy); }
.form-section { padding: 16px 0 6px; }
.form-section:first-child { padding-top: 0; }
.form-section h4 { margin-bottom: 10px; }
.save-state { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.save-state.ok { color: var(--ok); }
.save-state.err { color: var(--danger); }
.hint { font-size: 12.5px; color: var(--muted); }
.error-text { color: var(--danger); font-size: 13px; }

/* ------------------------------------------------------------------ tableaux */
.table-wrap { overflow: auto; border-radius: var(--radius); }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
table.t th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; z-index: 1; }
table.t th.sortable { cursor: pointer; }
table.t th.sortable:hover { color: var(--text); }
table.t td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover td { background: #f6f8fd; }
table.t tbody tr.sel td { background: #fff7f0; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t .row-actions { opacity: 0; transition: opacity .1s; }
table.t tr:hover .row-actions { opacity: 1; }
.list-foot { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; color: var(--muted); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty .ic { width: 36px; height: 36px; color: var(--faint); margin-bottom: 8px; }

/* ------------------------------------------------------------------ onglets */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 12px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 11px 12px 10px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--navy); border-bottom-color: var(--accent); }
.tabs .n { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; font-size: 11.5px; padding: 0 6px; color: var(--muted); }
.tabs button.on .n { background: var(--accent-soft); border-color: #f6d3b8; color: #b0510f; }
.tabs .tick { color: var(--ok); font-weight: 800; }
.tab-body { padding: 18px 20px; }

/* ------------------------------------------------------------------ fiche contact */
.recnav { display: flex; align-items: center; gap: 8px; }
.recnav .pos { font-variant-numeric: tabular-nums; color: var(--muted); }
.recnav .pos b { color: var(--text); }
.fiche-head { display: flex; align-items: flex-start; gap: 18px; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.fiche-head .who { flex: 1; min-width: 0; }
.support-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.support-line a { color: var(--accent); }
.fiche-name { font-size: 24px; font-weight: 700; margin: 2px 0 2px; letter-spacing: -.02em; }
.fiche-name .nm { text-transform: uppercase; }
.coche-box { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 8px; cursor: pointer; font-weight: 600; user-select: none; }
.coche-box.on { background: var(--accent-soft); border-color: #f2bf98; color: #8a3d0c; }
.coche-box input { width: 17px; height: 17px; accent-color: var(--accent); }
.fiche-id { text-align: right; font-size: 12px; color: var(--faint); line-height: 1.5; }
.fiche-grid { padding: 16px 20px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 14px; border-bottom: 1px solid var(--border); }
.rubriques { padding: 12px 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.rubriques .lbl { font-weight: 650; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rubriques .input { width: 190px; height: 30px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.address-box { border: 1px dashed var(--border-strong); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); line-height: 1.55; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tl-item:last-child { border-bottom: 0; }
.tl-date { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ recherche */
.search-panel { background: var(--surface); border: 1px solid #c9dafa; box-shadow: 0 0 0 4px var(--info-soft), var(--shadow); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.search-panel h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

/* ------------------------------------------------------------------ menus & modales */
.menu-wrap { position: relative; display: inline-block; }
.menu { position: absolute; top: calc(100% + 4px); left: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow-lg); padding: 5px; z-index: 50; }
.menu.right { left: auto; right: 0; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: none; padding: 7px 10px; border-radius: 6px; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--surface-2); text-decoration: none; }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.menu .on { font-weight: 700; color: var(--navy); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 34, 61, .42); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .12s; }
.modal { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .14s; }
.modal.wide { width: min(880px, 100%); }
.modal.xwide { width: min(1100px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 12px 12px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(6px) scale(.985); opacity: 0; } }
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 9px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px; max-width: 420px; animation: pop .15s; }
.toast.err { background: var(--danger); }
.toast.warn { background: #a76a00; }

/* ------------------------------------------------------------------ tableaux de bord */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi .lbl { color: var(--muted); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 26px; font-weight: 750; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12.5px; color: var(--muted); }
.kpi.accent::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.kpi.bad .val { color: var(--danger); }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 90px; gap: 10px; align-items: center; font-size: 13px; }
.bar-row .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--navy-3), #4d6aa8); border-radius: 6px; }
.bar-fill.accent { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.vbars { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 10px; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.vbar .col { width: 100%; max-width: 46px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-radius: 5px 5px 2px 2px; min-height: 2px; position: relative; }
.vbar .col:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; font-size: 11.5px; padding: 3px 7px; border-radius: 5px; white-space: nowrap; }
.vbar .x { font-size: 11.5px; color: var(--muted); }
.tonbar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.tonbar div { height: 100%; }
.ton-pos { background: #2fb37a; }
.ton-neu { background: #b8c2d6; }
.ton-neg { background: #e06161; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ------------------------------------------------------------------ connexion */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 480px) 1fr; }
.login-form { background: var(--surface); padding: 48px 52px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.login-form h1 { font-size: 26px; }
.login-side { background: radial-gradient(1200px 600px at 80% 10%, #2a4170, var(--navy)); color: #dbe3f3; padding: 60px; display: flex; flex-direction: column; justify-content: center; gap: 22px; position: relative; overflow: hidden; }
.login-side h2 { color: #fff; font-size: 30px; line-height: 1.2; max-width: 560px; }
.login-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 520px; }
.login-side li { display: flex; gap: 10px; align-items: flex-start; }
.login-side li .ic { color: var(--accent-2); margin-top: 1px; }
.login-side .seal { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.login-side .seal span { border: 1px solid #3b5385; border-radius: 20px; padding: 4px 12px; font-size: 12.5px; color: #b9c7e3; }

/* ------------------------------------------------------------------ licence */
.lic-card { background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; border-radius: 14px; padding: 22px 24px; display: grid; grid-template-columns: 1fr auto; gap: 16px; box-shadow: var(--shadow-lg); }
.lic-card .ed { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.lic-card .meta { color: #b9c7e3; font-size: 13px; }
.lic-card .seats { text-align: right; }
.lic-card .seats b { font-size: 30px; }
.module-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.module { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.module.off { background: var(--surface-2); color: var(--faint); }
.module .ic { color: var(--ok); }
.module.off .ic { color: var(--faint); }
.locked-view { max-width: 560px; margin: 60px auto; text-align: center; }
.locked-view .ic { width: 46px; height: 46px; color: var(--accent); }

/* ------------------------------------------------------------------ mailing */
.mailing { display: grid; grid-template-columns: 250px minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.tpl-list { display: flex; flex-direction: column; }
.tpl-list label { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.tpl-list label:hover { background: var(--surface-2); }
.tpl-list label.on { background: var(--accent-soft); font-weight: 650; }
.tpl-list .num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); font-size: 11.5px; font-weight: 700; color: var(--muted); flex: none; }
.tpl-list label.on .num { background: var(--accent); color: #fff; border-color: var(--accent); }
.mail-preview { white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; max-height: 340px; overflow: auto; }

/* ------------------------------------------------------------------ étiquettes */
.label-formats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.label-format { border: 1.5px solid var(--border-strong); border-radius: 10px; padding: 14px; cursor: pointer; background: var(--surface); text-align: center; transition: border-color .12s, box-shadow .12s; }
.label-format:hover { border-color: var(--navy-3); }
.label-format.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.label-format b { display: block; }
.label-format small { color: var(--muted); }
.label-format .mini { margin: 0 auto 10px; width: 64px; height: 88px; border: 1px solid var(--border-strong); border-radius: 3px; display: grid; gap: 2px; padding: 3px; background: #fff; }
.label-format .mini i { background: var(--info-soft); border-radius: 1px; }

/* ------------------------------------------------------------------ import */
.dropzone { border: 2px dashed var(--border-strong); border-radius: 12px; padding: 34px; text-align: center; background: var(--surface); cursor: pointer; transition: border-color .12s, background .12s; }
.dropzone:hover, .dropzone.over { border-color: var(--info); background: var(--info-soft); }
.steps { display: flex; gap: 8px; margin-bottom: 16px; }
.step { display: flex; align-items: center; gap: 8px; color: var(--faint); font-weight: 600; }
.step .n { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-size: 12px; }
.step.on { color: var(--navy); }
.step.on .n { background: var(--navy); color: #fff; border-color: var(--navy); }
.step.done { color: var(--ok); }
.step.done .n { background: var(--ok); color: #fff; border-color: var(--ok); }
.step + .step::before { content: ""; width: 28px; height: 1.5px; background: var(--border-strong); margin-right: 8px; }

/* ------------------------------------------------------------------ impression */
#print-root { display: none; }
body.preview-open #print-root { display: block; position: fixed; inset: 0; z-index: 300; background: #525a68; overflow: auto; }
body.preview-open { overflow: hidden; }
.print-toolbar { position: sticky; top: 0; z-index: 2; background: var(--navy); color: #fff; padding: 10px 18px; display: flex; align-items: center; gap: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.print-toolbar .btn { height: 32px; }
.sheet { width: 210mm; height: 297mm; background: #fff; margin: 14px auto; box-shadow: 0 4px 20px rgba(0, 0, 0, .35); position: relative; overflow: hidden; color: #000; font-family: Arial, Helvetica, sans-serif; }
.sheet.flow { height: auto; min-height: 297mm; padding: 16mm 16mm 18mm; }
.labels-grid { position: absolute; display: grid; }
.lbl-cell { overflow: hidden; display: flex; flex-direction: column; justify-content: center; font-size: 9.5pt; line-height: 1.25; padding: 3mm 5mm; }
.lbl-cell .l1 { font-weight: 700; }
.lbl-cell.badge-cell { align-items: center; text-align: center; }
.lbl-cell.badge-cell .bn { font-size: 15pt; font-weight: 800; text-transform: uppercase; }
.lbl-cell.badge-cell .bp { font-size: 13pt; }
.lbl-cell.badge-cell .bs { font-size: 9pt; margin-top: 2mm; color: #444; text-transform: uppercase; letter-spacing: .04em; }
.lbl-cell[contenteditable] { outline: 1px dashed #b9c7e3; outline-offset: -2px; }
.letter { position: relative; height: 297mm; padding: 20mm 20mm 20mm 22mm; font-size: 11pt; line-height: 1.5; }
.letter .exp { font-weight: 700; font-size: 13pt; color: #14223d; }
.letter .addr { position: absolute; top: 50mm; left: 110mm; width: 85mm; line-height: 1.4; }
.letter .date { position: absolute; top: 92mm; left: 110mm; }
.letter .body { position: absolute; top: 108mm; left: 22mm; right: 20mm; white-space: pre-wrap; }
.doc h1 { font-size: 18pt; margin-bottom: 4mm; }
.doc table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.doc th, .doc td { border: 1px solid #999; padding: 1.6mm 2mm; text-align: left; }
.doc th { background: #eee; }
.doc .boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; margin: 6mm 0; }
.doc .box { border: 1px solid #999; padding: 3mm 4mm; min-height: 30mm; }
.doc .box h3 { font-size: 10pt; text-transform: uppercase; margin-bottom: 2mm; color: #444; }
.doc .sign { display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; margin-top: 12mm; }
.doc .sign div { border-top: 1px solid #999; padding-top: 2mm; font-size: 9pt; color: #444; height: 22mm; }
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; height: auto; overflow: visible !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; position: static !important; background: none !important; overflow: visible !important; }
  .print-toolbar { display: none !important; }
  .sheet { margin: 0 !important; box-shadow: none !important; break-after: page; page-break-after: always; }
  .lbl-cell[contenteditable] { outline: none; }
}

@media (max-width: 1200px) {
  .fiche-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mailing { grid-template-columns: 220px minmax(0, 1fr); }
  .mailing > :last-child { grid-column: 1 / -1; }
  .g5, .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar { width: 64px; }
  .brand div, .nav a span, .nav-group, .sidebar-foot, .nav .count { display: none; }
  .nav a { justify-content: center; }
  .view { padding: 16px; }
  .g2, .g3, .g4, .g5, .g6, .fiche-grid { grid-template-columns: minmax(0, 1fr); }
  .span2, .span3, .span4, .span5 { grid-column: 1 / -1; }
  .tsep { display: none; }
  .login { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .mailing { grid-template-columns: 1fr; }
}

/* ======================================================================== VUE CLASSIQUE (RP Pro)
   Même organisation, mêmes boutons, mêmes couleurs que RP Pro (FileMaker), dessinés proprement. */
.classic { --cl-theme: #f1d6ec; --cl-theme-2: #e7c2e0; --cl-theme-line: #d9a9d1; height: 100vh; display: flex; flex-direction: column;
  background: repeating-linear-gradient(to bottom, #f7f7f7 0, #f7f7f7 3px, #eeeeee 3px, #eeeeee 4px); color: #1d1d1d; font-size: 13.5px; }
.classic.c-rose { --cl-theme: #f1d6ec; --cl-theme-2: #e7c2e0; --cl-theme-line: #d9a9d1; }
.classic.c-bleu { --cl-theme: #d7e5f6; --cl-theme-2: #c3d6ef; --cl-theme-line: #9fbbe2; }
.classic.c-vert { --cl-theme: #d9efd9; --cl-theme-2: #c4e5c4; --cl-theme-line: #9fcf9f; }
.classic.c-lavande { --cl-theme: #dfdcfd; --cl-theme-2: #cdc8fb; --cl-theme-line: #aaa2f2; }
.classic.c-gris { --cl-theme: #e6e6e6; --cl-theme-2: #d8d8d8; --cl-theme-line: #bdbdbd; }
.classic.c-jaune { --cl-theme: #f7efc8; --cl-theme-2: #efe2a6; --cl-theme-line: #dccb7a; }
.cl-titlebar { height: 36px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: linear-gradient(#ececec, #dcdcdc); border-bottom: 1px solid #c4c4c4; }
.cl-titlebar .ttl { flex: 1; text-align: center; font-weight: 700; color: #3a3a3a; font-size: 13.5px; }
.cl-titlebar .wins { display: flex; gap: 2px; }
.cl-titlebar .wins a { padding: 3px 9px; border-radius: 5px; color: #444; font-weight: 600; font-size: 12.5px; }
.cl-titlebar .wins a:hover { background: rgba(0,0,0,.06); text-decoration: none; }
.cl-titlebar .wins a.on { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15); color: #111; }
.cl-titlebar .tb-btn { border: 1px solid #b9b9b9; background: linear-gradient(#fdfdfd, #ececec); border-radius: 6px; height: 26px; padding: 0 10px; font: inherit; font-size: 12.5px; font-weight: 600; color: #333; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.cl-titlebar .tb-btn:hover { background: #fff; }
.cl-view { flex: 1; overflow: auto; padding: 0 0 30px; }
.cl-modern-host { padding: 18px 22px 40px; background: var(--bg); font-size: 14px; color: var(--text); }
.cl-bar { background: #cdcdcd; border-bottom: 1px solid #bdbdbd; padding: 6px 14px; display: flex; align-items: center; gap: 6px; }
.cl-bar.light { background: #d6d6d6; }
.cl-band { background: #d0d0d0; padding: 5px 14px; display: flex; align-items: center; gap: 10px; color: #333; }
.cl-btns { display: grid; gap: 5px 6px; padding: 7px 14px; }
.cl-btn { height: 28px; border-radius: 6px; border: 1px solid rgba(0,0,0,.18); background: linear-gradient(#9a9a9a, #858585); color: #fff; font: inherit; font-weight: 700; font-size: 13px;
  cursor: pointer; padding: 0 10px; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 1px rgba(0,0,0,.12); text-shadow: 0 -1px 0 rgba(0,0,0,.2); display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.cl-btn:hover { filter: brightness(1.08); text-decoration: none; }
.cl-btn:active { transform: translateY(1px); }
.cl-btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.cl-btn.dark { background: linear-gradient(#636363, #4f4f4f); }
.cl-btn.darker { background: linear-gradient(#3f3f3f, #2a2a2a); }
.cl-btn.beige { background: linear-gradient(#b9aa9b, #a19080); }
.cl-btn.orange { background: linear-gradient(#f5ac70, #ea8f47); }
.cl-btn.red { background: linear-gradient(#df4b3f, #c0392b); }
.cl-btn.white { background: linear-gradient(#ffffff, #ececec); color: #222; text-shadow: none; font-weight: 600; }
.cl-btn.sq { width: 34px; padding: 0; }
.cl-btn.mini { height: 22px; font-size: 12px; padding: 0 7px; border-radius: 4px; }
.cl-btn.empty { background: linear-gradient(#a6a6a6, #979797); }
.cl-count { display: inline-flex; border: 1px solid #9f9f9f; border-radius: 3px; overflow: hidden; background: #fff; font-variant-numeric: tabular-nums; }
.cl-count span { min-width: 64px; padding: 3px 8px; text-align: center; border-right: 1px solid #c8c8c8; font-size: 13px; }
.cl-count span:last-child { border-right: 0; }
.cl-count .found { background: #fff7c7; font-weight: 700; color: inherit; border: 0; border-right: 1px solid #c8c8c8; border-radius: 0; }
.cl-tri { background: #f1f1f1; border: 1px solid #c8c8c8; padding: 2px 14px; font-size: 12.5px; }
.cl-mini-field { background: #fff; border: 1px solid #a9a9a9; height: 24px; padding: 0 6px; min-width: 70px; font: inherit; }
.cl-main { display: grid; grid-template-columns: minmax(720px, 1040px) 340px; gap: 14px; padding: 10px 14px; align-items: start; }
.cl-panel { background: var(--cl-theme); border: 1px solid var(--cl-theme-line); border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.cl-panel.plain { background: #ededed; border-color: #cfcfcf; }
.cl-sec { padding: 10px 14px; }
.cl-support-name { display: flex; align-items: center; gap: 10px; }
.cl-support-name .big { flex: 1; background: #fff; border: 1px solid #d0d0d0; font-size: 25px; font-weight: 700; letter-spacing: -.01em; padding: 4px 8px; text-transform: uppercase; min-height: 42px; }
.cl-lbl { font-size: 12px; color: #555; display: block; margin-bottom: 1px; }
.cl-f { background: #fff8d6; border: 1px solid #d8cf9b; border-radius: 0; height: 28px; width: 100%; padding: 0 6px; font: inherit; font-weight: 600; color: #111; outline: none; min-width: 0; }
.cl-f.white { background: #fff; border-color: #c9c9c9; font-weight: 500; }
.cl-f.big { font-size: 15px; }
.cl-f:focus { border-color: #4a7fd6; box-shadow: 0 0 0 2px rgba(74,127,214,.2); }
.cl-f:disabled, .cl-f[readonly] { background: #fbf6e2; color: #333; }
textarea.cl-f { height: auto; min-height: 60px; padding: 5px 6px; resize: vertical; font-weight: 500; line-height: 1.4; }
.cl-row { display: grid; gap: 6px 10px; align-items: end; }
.cl-inline { display: flex; align-items: center; gap: 4px; }
.cl-ico { height: 28px; width: 34px; border: 1px solid #333; background: #3a3a3a; color: #fff; font-weight: 700; font-size: 11.5px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.cl-ico:hover { background: #222; text-decoration: none; color: #fff; }
.cl-codes-btns { display: flex; gap: 3px; flex-wrap: wrap; }
.cl-codes-btns button { height: 26px; border: 1px solid #c8c8c8; background: linear-gradient(#fbfbfb, #e9e9e9); font: inherit; font-size: 12.5px; padding: 0 9px; cursor: pointer; border-radius: 3px; }
.cl-codes-btns button:hover { background: #fff; }
.cl-codes { background: #fff; border: 1px solid #d0d0d0; min-height: 48px; max-height: 76px; overflow: auto; padding: 4px 8px; font-size: 13.5px; line-height: 1.45; }
.cl-codes .c { color: #c0392b; cursor: pointer; }
.cl-codes .c:nth-child(3n) { color: #1d1d1d; }
.cl-codes .c:hover { text-decoration: underline; }
.cl-tabs { display: flex; gap: 4px; padding: 0 14px; margin-top: 8px; flex-wrap: wrap; }
.cl-tabs button { height: 28px; min-width: 96px; border: 1px solid #c4c4c4; background: linear-gradient(#fafafa, #e8e8e8); border-radius: 4px 4px 0 0; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.cl-tabs button.on { background: linear-gradient(#9a9a9a, #858585); color: #fff; border-color: #777; }
.cl-tabs button .x { font-weight: 800; }
.cl-tabs .sp { flex: 1; }
.cl-tabbody { background: var(--cl-theme); border-top: 1px solid var(--cl-theme-line); padding: 14px; border-radius: 0 0 8px 8px; }
.cl-kv { display: grid; grid-template-columns: 96px 1fr; gap: 3px 6px; align-items: center; }
.cl-kv > span { text-align: right; font-size: 12.5px; color: #333; }
.cl-kv .cl-f { height: 24px; font-weight: 500; background: #fff; border-color: #cfcfcf; }
.cl-side { display: flex; flex-direction: column; gap: 12px; }
.cl-box { background: #fff; border: 1px solid #cfcfcf; box-shadow: 2px 2px 4px rgba(0,0,0,.12); position: relative; }
.cl-box .cap { position: absolute; right: 8px; bottom: 6px; font-size: 12px; color: #555; }
.cl-photo { height: 320px; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.cl-photo img { max-width: 100%; max-height: 100%; object-fit: cover; }
.cl-photo .x { position: absolute; top: 4px; right: 8px; font-weight: 700; cursor: pointer; }
.cl-box textarea { border: 0; width: 100%; min-height: 150px; padding: 8px 10px; font: inherit; resize: vertical; outline: none; }
.cl-warn { color: #d32f2f; font-weight: 600; font-size: 12.5px; }
.cl-coche { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; cursor: pointer; }
.cl-coche input { width: 22px; height: 22px; accent-color: #333; }
.cl-findmode { background: #3b6fd8; color: #fff; padding: 7px 14px; display: flex; align-items: center; gap: 12px; font-weight: 600; }
.cl-findmode .cl-btn { height: 26px; }
.cl-find .cl-f { background: #eef4ff; border-color: #9db8ec; }
table.cl-t { border-collapse: collapse; width: 100%; background: #fff; }
table.cl-t th { background: #d9d9d9; border: 1px solid #b9b9b9; font-weight: 600; font-size: 12.5px; padding: 3px 6px; text-align: left; white-space: nowrap; position: sticky; top: 0; }
table.cl-t th.sortable { cursor: pointer; }
table.cl-t td { border: 1px solid #c9c9c9; padding: 2px 6px; font-size: 13px; height: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
table.cl-t tr:nth-child(even) td { background: #efefef; }
table.cl-t tr.click { cursor: pointer; }
table.cl-t tr.click:hover td { background: #fff7d6; }
table.cl-t td.b { font-weight: 700; }
table.cl-t td.v, table.cl-t tr:nth-child(even) td.v, table.cl-t tr.click:hover td.v { background: #111; color: #fff; font-weight: 700; text-align: center; width: 24px; cursor: pointer; }
table.cl-t tr.sel td { background: #fff1b8 !important; }
.cl-list-title { background: #fff; border: 1px solid #a9a9a9; height: 26px; font-weight: 700; font-size: 16px; padding: 0 8px; min-width: 360px; }
.cl-sortgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 40px; padding: 14px; max-width: 1240px; }
.cl-sortkey { display: grid; grid-template-columns: 170px 1fr; gap: 8px; align-items: center; margin-bottom: 5px; }
.cl-sortkey button { height: 28px; border: 1px solid #b9b9b9; background: linear-gradient(#f3f3f3, #dcdcdc); border-radius: 4px; font: inherit; font-weight: 600; cursor: pointer; }
.cl-sortkey button:hover { background: #fff; }
.cl-sortkey .val { background: #fff; border: 1px solid #c9c9c9; height: 28px; padding: 4px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cl-sortkey button.red { background: linear-gradient(#e2554a, #c0392b); color: #fff; border-color: #a8322a; box-shadow: 0 2px 4px rgba(0,0,0,.25); }
.cl-head-dark { background: #4b4b4b; color: #fff; padding: 9px 14px; font-size: 16px; text-align: center; }
.cl-head-dark b { font-size: 18px; margin-left: 6px; }
.cl-label-btn { background: #ececec; border: 1px solid #d6d6d6; border-radius: 6px; margin: 10px 18px; text-align: center; padding: 6px 8px 8px; }
.cl-label-btn .t { font-weight: 700; border-bottom: 1px solid #c9c9c9; padding-bottom: 4px; margin-bottom: 4px; }
.cl-label-btn .s { display: flex; justify-content: space-around; }
.cl-label-btn .s button { border: 0; background: none; font: inherit; font-weight: 700; cursor: pointer; padding: 2px 8px; border-radius: 4px; }
.cl-label-btn .s button:hover { background: #fff; }
.cl-opt { margin: 8px 30px; text-align: center; }
.cl-opt .k { background: #ececec; border: 1px solid #d6d6d6; border-radius: 6px; padding: 5px; font-weight: 700; }
.cl-opt .v { padding: 6px; cursor: pointer; }
.cl-prefs { display: grid; grid-template-columns: 1fr 200px; border-top: 1px solid #ddd; max-width: 780px; }
.cl-prefs > * { border-bottom: 1px solid #ddd; padding: 6px 10px; background: #fff; }
.cl-prefs > span { text-align: right; }
.cl-prefs select { border: 0; font: inherit; width: 100%; background: transparent; }

/* --------------------------------------------------- Press Tower (classique : lavande, comme FileMaker) */
.pt-classic { background: #fff; min-height: 100%; }
.pt-head { display: flex; align-items: stretch; gap: 0; border-bottom: 3px solid #bfb8ff; }
.pt-year { background: #cdc8ff; font-size: 44px; font-weight: 800; letter-spacing: .12em; padding: 6px 20px; color: #111; }
.pt-title { flex: 1; font-size: 40px; font-weight: 800; color: #c7c0ff; padding: 8px 18px; letter-spacing: .02em; }
.pt-agency { padding: 8px 18px; text-align: right; color: #b3463c; font-weight: 700; font-size: 20px; line-height: 1.1; }
.pt-agency small { display: block; letter-spacing: .25em; font-size: 10px; color: #b3463c; font-weight: 500; }
.pt-tools { display: flex; align-items: flex-end; gap: 26px; padding: 10px 20px 8px; border-bottom: 2px solid #d8d4ff; }
.pt-tool { display: flex; align-items: flex-end; gap: 6px; background: none; border: 0; font: inherit; font-size: 15px; color: #333; cursor: pointer; padding: 4px; border-radius: 6px; }
.pt-tool:hover { background: #f1efff; }
.pt-tool .ic { width: 38px; height: 38px; color: #5b5bd6; }
.pt-go { margin-left: auto; background: linear-gradient(#f6a85f, #e9862e); color: #fff; font-weight: 800; font-size: 24px; letter-spacing: .08em; border: 0; border-radius: 10px; padding: 6px 26px; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.pt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 14px; padding: 12px 20px; max-width: 1180px; }
.pt-lav { background: #cdc8ff; font-weight: 800; font-size: 19px; padding: 4px 8px; min-height: 32px; }
.pt-gray { background: #eeeeee; font-weight: 800; font-size: 18px; padding: 4px 8px; min-height: 34px; text-transform: uppercase; }
.pt-gray input, .pt-lav select, .pt-lav input { all: unset; width: 100%; font: inherit; }
.pt-label { font-size: 15px; }
.pt-lnk { color: #c0392b; text-decoration: underline; font-size: 13px; }
.pt-analyse { background: #dcdde8; padding: 10px 12px; border-radius: 2px; }
.pt-analyse h3 { text-align: right; color: #8a7a6a; font-size: 32px; font-weight: 400; margin: -10px 0 0; }
.pt-box { background: #fff; border: 1px solid #c9c9d9; padding: 6px 10px; }
.pt-tirages { display: flex; gap: 14px; }
.pt-tirages button { border: 2px solid #6b5520; border-radius: 12px; background: linear-gradient(#f3cf63, #e2b33a); padding: 6px 16px; font: inherit; font-weight: 800; color: #2a2205; cursor: pointer; line-height: 1.15; }
.pt-tirages button:first-child { background: linear-gradient(#b28a3e, #8c6a2b); color: #1a1206; }
.pt-strip { background: #f7d58a; padding: 10px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.pt-strip .slot { background: #fff; height: 74px; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; position: relative; }
.pt-strip .slot img { max-height: 100%; max-width: 100%; }
.pt-strip .slot .rm { position: absolute; top: 2px; right: 4px; color: #c0392b; font-weight: 800; }
.pt-foot { display: flex; justify-content: center; gap: 60px; padding: 8px; font-size: 15px; }
.pt-listing td.b { background: #cdc8ff; font-weight: 800; font-size: 15px; text-transform: uppercase; }
.pt-listing tr td { border: 0; border-bottom: 10px solid #fff; height: 40px; background: #fff; }
.pt-listing tr:nth-child(even) td { background: #fff; }
.pt-listing tr:nth-child(even) td.b { background: #cdc8ff; }

/* --------------------------------------------------- Press Tower (moderne) */
.pt-scan { background: #f4f1ea; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; min-height: 160px; overflow: hidden; }
.pt-scan img { max-width: 100%; max-height: 420px; display: block; }
.pt-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-thumb { width: 88px; height: 112px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #f4f1ea; position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pt-thumb .rm { position: absolute; top: 3px; right: 3px; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: 12px; }
.pt-thumb.add { border-style: dashed; color: var(--muted); font-size: 12px; text-align: center; padding: 6px; }
.valeur-box { background: var(--accent-soft); border: 1px solid #f6d3b8; border-radius: 8px; padding: 10px 14px; }
.valeur-box b { font-size: 22px; color: #8a3d0c; }
.pb-cover { height: 297mm; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14mm; text-align: center; padding: 20mm; }
.pb-cover .t { font-size: 38pt; font-weight: 800; letter-spacing: .08em; color: #1d1d6b; }
.pb-cover img { max-width: 120mm; max-height: 45mm; }
.pb-divider { height: 297mm; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6mm; background: linear-gradient(135deg, #f1efff, #ffffff); }
.pb-divider .t { font-size: 30pt; font-weight: 800; color: #3a2fb7; }
.pb-tirage { padding: 12mm 14mm; }
.pb-band { border: 1.5px solid #222; display: grid; grid-template-columns: 1fr auto; gap: 2mm 8mm; padding: 3mm 5mm; margin-bottom: 5mm; font-size: 10.5pt; }
.pb-band .j { font-size: 16pt; font-weight: 800; text-transform: uppercase; }
.pb-band .r { text-align: right; }
.pb-scan { text-align: center; }
.pb-scan img { max-width: 182mm; max-height: 225mm; border: 1px solid #ddd; }

/* --------------------------------------------------- Agenda */
.ag-grid { display: grid; grid-template-columns: 62px repeat(5, minmax(120px, 1fr)) repeat(2, minmax(70px, .5fr)); border: 1px solid var(--border); background: var(--surface); border-radius: 10px; overflow: hidden; }
.ag-grid .h { background: var(--surface-2); text-align: center; padding: 6px 4px; font-weight: 700; border-bottom: 1px solid var(--border); font-size: 13px; }
.ag-grid .h small { display: block; font-weight: 500; color: var(--muted); }
.ag-grid .h.we, .ag-grid .c.we { background: #fafafa; color: var(--faint); }
.ag-grid .t { font-weight: 700; font-size: 12px; padding: 0 6px; border-top: 1px solid var(--border); display: flex; align-items: center; height: 26px; color: var(--muted); }
.ag-grid .c { border-top: 1px solid var(--border); border-left: 1px solid var(--border); height: 26px; position: relative; cursor: pointer; }
.ag-grid .c:hover { background: #f6f8fd; }
.ag-ev { position: absolute; left: 2px; right: 2px; z-index: 2; background: var(--accent-soft); border: 1px solid #f2bf98; border-left: 3px solid var(--accent); border-radius: 5px; padding: 2px 5px; font-size: 12px; overflow: hidden; cursor: pointer; line-height: 1.25; }
.ag-ev b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.classic .ag-grid { border-radius: 0; border-color: #9f9f9f; }
.classic .ag-grid .h { background: #fff; }
.classic .ag-grid .c, .classic .ag-grid .t { border-color: #b9b9b9; }
.classic .ag-ev { background: var(--cl-theme); border-color: var(--cl-theme-line); border-left-color: #555; }

/* --------------------------------------------------- Aide & visite guidée */
.help-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--surface); box-shadow: var(--shadow-lg); z-index: 150; display: flex; flex-direction: column; animation: slidein .16s; color: var(--text); font-size: 14px; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.help-drawer header { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.help-drawer .body { padding: 16px 18px; overflow: auto; flex: 1; line-height: 1.55; }
.help-drawer h4 { margin: 16px 0 8px; }
.help-drawer ul { padding-left: 18px; margin: 0; }
.help-drawer li { margin-bottom: 4px; }
.help-map { width: 100%; border-collapse: collapse; font-size: 13px; }
.help-map td { border-bottom: 1px solid var(--border); padding: 5px 4px; vertical-align: top; }
.help-map td:first-child { font-weight: 600; width: 46%; padding-right: 10px; }
.help-drawer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.help-drawer .body > p, .help-drawer li { font-size: 14px; }
.tour-shade { position: fixed; inset: 0; z-index: 400; pointer-events: auto; }
.tour-hole { position: fixed; z-index: 401; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(15, 25, 45, .58); transition: all .22s ease; pointer-events: none; outline: 3px solid var(--accent); outline-offset: 2px; }
.tour-bubble { position: fixed; z-index: 402; width: min(380px, calc(100vw - 24px)); background: #fff; color: var(--text); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 16px 18px 14px; animation: pop .16s; font-size: 14px; }
.tour-bubble h3 { font-size: 16px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.tour-bubble p { margin: 0 0 12px; line-height: 1.55; color: #333; }
.tour-bubble .foot { display: flex; align-items: center; gap: 8px; }
.tour-dots { display: flex; gap: 4px; flex: 1; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: #d5dbe6; }
.tour-dots i.on { background: var(--accent); }
@media print { .help-drawer, .tour-shade, .tour-hole, .tour-bubble { display: none !important; } }

/* --------------------------------------------------- Coque classique : barre de titre type fenêtre */
.cl-dots { display: inline-flex; gap: 6px; margin-right: 4px; }
.cl-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.2); }
.cl-dots i:nth-child(2) { background: #febc2e; }
.cl-dots i:nth-child(3) { background: #28c840; }
.cl-titlebar .ttl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cl-av { width: 18px; height: 18px; border-radius: 50%; background: #555; color: #fff; font-size: 9px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.cl-titlebar .menu { font-size: 14px; }
@media (max-width: 1100px) { .cl-titlebar .ttl { visibility: hidden; } .cl-dots { display: none; } }
@media (max-width: 760px) { .cl-titlebar { height: auto; flex-wrap: wrap; padding: 6px 10px; } .cl-titlebar .ttl { display: none; } .cl-titlebar .wins { flex-wrap: wrap; } }

/* --------------------------------------------------- Menu : option spécifique */
.nav-tag { margin-left: auto; font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px; border-radius: 8px; background: rgba(244, 128, 52, .18); color: #ffb98a; font-weight: 700; }
.nav a.on .nav-tag { background: rgba(255,255,255,.18); color: #fff; }

/* --------------------------------------------------- Interrupteurs & options */
.sub { color: var(--muted); font-size: 13px; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #cfd6e2; border-radius: 24px; transition: background .15s; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.switch input:disabled + span { opacity: .45; cursor: not-allowed; }
.opt-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.opt-row.off { background: var(--surface-2); }
.opt-ic { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.opt-row.off .opt-ic { background: #eceff4; color: var(--faint); }

/* --------------------------------------------------- Mes préférences */
.vue-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vue-card { position: relative; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); padding: 10px; text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: border-color .12s, box-shadow .12s; }
.vue-card:hover { border-color: var(--border-strong); }
.vue-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.vue-card .vue-txt b { display: block; }
.vue-card .vue-txt span { font-size: 12.5px; color: var(--muted); }
.vue-check { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.vue-mini { height: 92px; border-radius: 8px; background: #f3f5f9; border: 1px solid var(--border); position: relative; overflow: hidden; }
.vue-mini i { position: absolute; display: block; border-radius: 3px; }
.vue-mini.moderne .side { left: 0; top: 0; bottom: 0; width: 26%; background: #1d2a44; border-radius: 0; }
.vue-mini.moderne .top { left: 30%; right: 6%; top: 8px; height: 10px; background: #e3e8f0; }
.vue-mini.moderne .l1 { left: 30%; right: 6%; top: 28px; height: 14px; background: #fff; border: 1px solid #e3e8f0; }
.vue-mini.moderne .l2 { left: 30%; right: 6%; top: 48px; height: 14px; background: #fff; border: 1px solid #e3e8f0; }
.vue-mini.moderne .l3 { left: 30%; width: 22%; top: 70px; height: 10px; background: var(--accent); }
.vue-mini.classique { background: repeating-linear-gradient(to bottom, #f7f7f7 0, #f7f7f7 3px, #eeeeee 3px, #eeeeee 4px); }
.vue-mini.classique .bar { left: 0; right: 0; top: 0; height: 14px; background: #cdcdcd; border-radius: 0; }
.vue-mini.classique .btns { left: 6%; right: 30%; top: 20px; height: 9px; background: repeating-linear-gradient(to right, #8a8a8a 0, #8a8a8a 16%, transparent 16%, transparent 19%); }
.vue-mini.classique .panel { left: 6%; right: 6%; top: 36px; bottom: 8px; border: 1px solid rgba(0,0,0,.12); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px 4px 5px; background: var(--surface); font: inherit; font-size: 13px; cursor: pointer; color: inherit; }
.swatch span { width: 20px; height: 20px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.15); }
.swatch.on { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(29,42,68,.15); font-weight: 600; }
@media (max-width: 640px) { .vue-cards { grid-template-columns: 1fr; } }

/* --------------------------------------------------- Vue classique sur écran plus étroit (portable 13", tablette) */
@media (max-width: 1180px) {
  .cl-main { grid-template-columns: minmax(0, 1fr); }
  .cl-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cl-photo { height: 200px; }
  .pt-grid { grid-template-columns: minmax(0, 1fr); }
}
