/* Portefeuille boursier : feuille de style unique (aucun style en ligne exécuté sous la CSP). */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f5f7fa; color: #2d3748; font-size: 14px; }
.nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 10px 24px; background: #1a365d; color: #e2e8f0; }
.nav a { color: #e2e8f0; text-decoration: none; }
.nav a:hover, .nav a.actif { text-decoration: underline; }
.nav .qui { margin-left: auto; opacity: .85; }
.nav form { margin: 0; }
.nav button { background: none; border: 1px solid #a0aec0; color: #e2e8f0; border-radius: 4px; padding: 3px 10px; cursor: pointer; }
.container { max-width: 1280px; margin: 20px auto; background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.08); padding: 24px 28px; }
h1 { font-size: 22px; margin-bottom: 18px; }
h2 { font-size: 17px; color: #2b6cb0; margin: 24px 0 10px; }
h3 { font-size: 15px; margin: 16px 0 8px; }
p { margin: 8px 0; }
a { color: #2b6cb0; }
table { width: 100%; border-collapse: collapse; margin: 6px 0 12px; }
th { text-align: left; padding: 8px 6px; border-bottom: 2px solid #e2e8f0; color: #4a5568; font-size: 12px; white-space: nowrap; }
td { padding: 7px 6px; border-bottom: 1px solid #edf2f7; vertical-align: middle; }
td.n, th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 600; border-top: 2px solid #e2e8f0; }
.gain { color: #276749; }
.perte { color: #c53030; }
.muted { color: #718096; font-size: 12px; }
form.inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 2px 4px 2px 0; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; margin: 10px 0; }
.grille label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 12px; color: #4a5568; }
label.bloc { display: block; font-weight: 600; font-size: 12px; color: #4a5568; margin: 10px 0; }
textarea { display: block; width: 100%; margin-top: 4px; padding: 7px 9px; border: 1px solid #cbd5e0; border-radius: 6px; font: 13px/1.4 ui-monospace, Menlo, monospace; }
input, select { padding: 7px 9px; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 14px; font-weight: normal; }
.btn { padding: 7px 14px; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; text-decoration: none; display: inline-block; }
.btn-primary { background: #2b6cb0; color: #fff; }
.btn-secondary { background: #e2e8f0; color: #2d3748; }
.btn-danger { background: #e53e3e; color: #fff; }
.btn-warning { background: #ecc94b; color: #2d3748; }
.message { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.message.success { background: #c6f6d5; color: #22543d; }
.message.error { background: #fed7d7; color: #742a2a; }
.message.warning { background: #feebc8; color: #7b341e; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; background: #e2e8f0; }
.badge.ok { background: #c6f6d5; color: #22543d; }
.badge.ko { background: #fed7d7; color: #742a2a; }
.temp { background: #fffbea; border-left: 4px solid #ecc94b; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.temp code { font-size: 17px; background: #fff; padding: 2px 8px; border-radius: 4px; }
.badge.haussiere, .badge.achat { background: #c6f6d5; color: #22543d; }
.badge.baissiere, .badge.vente { background: #fed7d7; color: #742a2a; }
.badge.neutre { background: #edf2f7; color: #4a5568; }
.filtres { margin: 6px 0 10px; }
.periodes { display: flex; gap: 12px; margin: 14px 0 6px; }
.periodes a { text-decoration: none; }
.periodes a.actif { font-weight: 600; text-decoration: underline; }
.graphique { position: relative; height: 380px; margin: 6px 0 4px; }
.graphique.petit { height: 150px; }
table.etroit { width: auto; }
table.etroit th { white-space: normal; font-size: 13px; font-weight: normal; padding-right: 24px; }
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 10px 0 18px; }
.carte { background: #f7fafc; border-radius: 8px; padding: 12px 14px; }
.carte .val { font-size: 19px; font-weight: 600; margin-top: 4px; }
.login { max-width: 380px; margin: 80px auto; }
.login label { display: block; font-weight: 600; margin: 12px 0 6px; }
.login input { width: 100%; }
.login .btn { width: 100%; margin-top: 18px; padding: 11px; }
[hidden] { display: none !important; }
@media (max-width: 700px) {
  .container { margin: 0; border-radius: 0; padding: 16px; }
  table { display: block; overflow-x: auto; }
}

/* DEV environment (ADR 0014): never mistaken for PROD. */
.bandeau-dev { background: #b7791f; color: #fff; text-align: center; font-weight: 600; padding: 8px 16px; }
