/* =========================================================
   Rapports (js/ui/reports.js): a grid of small cards — thin outline, round icon and buttons, vertical bars.
   Same place as the list screens (class table-view).
   ========================================================= */
.app[data-view="reports"] .reports-view{display:flex;}
.rep-scroll{flex:1;min-height:0;overflow:auto;padding:14px 0 16px;}
.rep-grid{display:grid;margin-bottom:14px;grid-template-columns:repeat(auto-fill, minmax(min(100%, 300px), 360px));gap:14px;align-items:stretch;}   /* the cards of a line, same height */
.rep-card{display:flex;flex-direction:column;gap:14px;padding:16px;border:1px solid var(--line);border-radius:22px;background:var(--card);}

.rep-card-head{display:flex;align-items:center;gap:10px;}
.rep-ico,.rep-round{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border:1px solid var(--line);border-radius:50%;background:none;color:var(--ink);}
.rep-round{transition:border-color .15s, color .15s;}
.rep-round:hover{border-color:var(--blue);color:var(--blue-d);}
.rep-card-title{flex:1;min-width:0;}
.rep-card-title h2{margin:0;font-size:15px;}
.rep-card-title p{margin:1px 0 0;font-size:11.5px;color:var(--gray-l);}
.rep-card-title p::first-letter{text-transform:uppercase;}
.rep-card-tools{display:flex;align-items:center;gap:8px;}

.rep-figure-label{font-size:11.5px;color:var(--gray-l);}
.rep-figure-line{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;}
.rep-big{font-size:38px;font-weight:500;line-height:1.05;letter-spacing:-.02em;}
.rep-unit{font-size:13px;color:var(--gray);}
.rep-chip{margin-left:auto;align-self:center;padding:3px 9px;border-radius:999px;background:var(--client-l);color:var(--client-d);font-size:11.5px;font-weight:500;}
.rep-chip.is-down{background:var(--peach);color:var(--orange-d);}

.rep-chart{display:grid;grid-template-columns:repeat(3, 1fr);gap:10px;align-items:end;}
.rep-group{display:flex;flex-direction:column;align-items:center;gap:6px;}
.rep-bars{display:flex;align-items:flex-end;justify-content:center;gap:5px;width:100%;height:120px;padding-top:24px;}
.rep-bar{position:relative;width:min(34px, 42%);border-radius:10px;}
.rep-bar.is-cur{background:var(--blue);}
.rep-bar.is-prev{border:1px solid var(--lav);
  background:repeating-linear-gradient(135deg, var(--lav) 0 3px, var(--card) 3px 7px);}
.rep-bar b{position:absolute;bottom:calc(100% + 4px);left:50%;transform:translateX(-50%);padding:1px 7px;border-radius:999px;background:var(--lav);color:var(--blue-d);font-size:11px;white-space:nowrap;}
.rep-bar i{position:absolute;bottom:calc(100% + 4px);left:50%;transform:translateX(-50%);font-style:normal;font-size:11px;color:var(--gray-l);}
.rep-group-label{font-size:12px;color:var(--gray);}
.rep-legend{display:flex;gap:14px;font-size:11.5px;color:var(--gray);text-transform:capitalize;}
.rep-legend span{display:flex;align-items:center;gap:5px;}
.rep-key{width:10px;height:10px;border-radius:3px;}
.rep-key.is-cur{background:var(--blue);}
.rep-key.is-prev{border:1px solid var(--lav);background:repeating-linear-gradient(135deg, var(--lav) 0 2px, var(--card) 2px 4px);}

/* Revenue card: MRR and ARR side by side, a thin line between them; a 12-month MRR curve; a footer line */
.rep-figure{display:flex;flex-direction:column;gap:4px;min-width:0;}
.rep-duo{display:grid;grid-template-columns:1fr 1fr;}
.rep-duo .rep-figure + .rep-figure{padding-left:14px;border-left:1px solid var(--line);}
.rep-duo .rep-figure:first-child{padding-right:14px;}
.rep-duo .rep-big{font-size:28px;white-space:nowrap;}
.rep-big.is-soft{color:var(--gray);}
/* MRR ajouté: the figure grows and fills the height left by its neighbours (same-height line) */
.rep-hero{flex:1;justify-content:center;gap:8px;}
.rep-hero .rep-big{font-size:clamp(40px, 4.6vw, 60px);}
.rep-hero .rep-pct{font-size:15px;}
.rep-curve{position:relative;height:90px;margin-top:6px;}
.rep-curve svg{display:block;width:100%;height:100%;overflow:visible;}
.rep-curve-area{fill:var(--lav);opacity:.45;}
.rep-curve-line{fill:none;stroke:var(--blue);stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke;}
.rep-curve-dot{position:absolute;width:10px;height:10px;margin:-5px 0 0 -5px;border-radius:50%;background:var(--blue);border:2px solid var(--card);}
.rep-curve-hits{position:absolute;inset:0;display:grid;grid-template-columns:repeat(12, 1fr);}
.rep-curve-hits span:hover{background:linear-gradient(var(--line), var(--line)) center / 1px 100% no-repeat;}
.rep-curve-months{display:grid;grid-template-columns:repeat(12, 1fr);font-size:11px;color:var(--gray-l);text-align:center;}
.rep-foot{display:flex;justify-content:space-between;gap:10px;padding-top:12px;border-top:1px solid var(--line);font-size:12px;color:var(--gray);}
.rep-foot b{color:var(--ink);font-weight:600;}

/* Market share card: half-ring of ticks (green = clients), the share inside, the rest of the market by phase below */
.rep-gauge{position:relative;width:min(100%, 260px);margin:4px auto 0;}
.rep-gauge svg{display:block;width:100%;height:auto;}
.rep-gauge line{stroke:var(--line);stroke-width:3.2;stroke-linecap:round;}
.rep-gauge line.is-on{stroke:var(--s-client);}
.rep-gauge line.is-open{stroke:var(--s-contact);}
.rep-gauge-text{position:absolute;left:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center;gap:3px;text-align:center;}
.rep-gauge-text .rep-chip{margin:2px 0 0;}
.rep-rows{display:flex;flex-direction:column;gap:7px;padding-top:12px;border-top:1px solid var(--line);font-size:12.5px;color:var(--gray);}
.rep-row{display:flex;align-items:center;gap:8px;}
.rep-row span{flex:1;}
.rep-row b{color:var(--ink);font-weight:600;}
.rep-dot{width:8px;height:8px;border-radius:50%;}

/* MRR added card: small % next to the figure; a button opens the pop-up of every crèche (links to their sheet) */
.rep-pct{align-self:center;font-size:13px;font-weight:500;color:var(--client-d);}
.rep-pct.is-down{color:var(--orange-d);}
.rep-more{display:flex;align-items:center;justify-content:center;gap:4px;padding:8px 12px;border:1px solid var(--line);border-radius:999px;background:none;font:inherit;font-size:12.5px;color:var(--ink);cursor:pointer;transition:border-color .15s, color .15s;}
.rep-more:hover{border-color:var(--blue);color:var(--blue-d);}
.rep-added{padding-top:0;border-top:0;max-height:60vh;overflow:auto;}
.rep-added .rep-figure-label{margin-top:6px;}
.rep-link{width:100%;padding:3px 0;border:0;background:none;font:inherit;color:inherit;text-align:left;cursor:pointer;}
.rep-link span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.rep-link:hover span{color:var(--blue-d);}

/* Workload card: one bar of what is left to call, by kind (blue: prospects, grey: already reached, orange: relances, red: late), a row per kind */
.rep-stack{display:flex;gap:2px;height:12px;overflow:hidden;border-radius:6px;}
.rep-stack i{min-width:3px;}
.rep-stack .is-never,.rep-dot.is-never{background:var(--blue);}
.rep-stack .is-touched,.rep-dot.is-touched{background:var(--s-new);}
.rep-stack .is-due,.rep-dot.is-due{background:var(--orange);}
.rep-stack .is-late,.rep-dot.is-late{background:var(--red);}
.rep-row small{color:var(--gray-l);}

/* « Par vendeur » (Activité): a table across the width */
.rep-card--wide{max-width:1100px;margin-top:2px;}
.rep-period{width:auto;}
.rep-period .segmented-btn{padding:0 12px;}
.rep-table-wrap{overflow-x:auto;}
.rep-table{width:100%;border-collapse:collapse;font-size:13px;font-variant-numeric:tabular-nums;}
.rep-table th{padding:6px 10px;border-bottom:1px solid var(--line);font-size:11px;font-weight:600;color:var(--gray);text-align:right;white-space:nowrap;}
.rep-table td{padding:9px 10px;border-bottom:1px solid var(--line);text-align:right;white-space:nowrap;}
.rep-table th:first-child,.rep-table td:first-child{text-align:left;}
.rep-table tr:last-child td{border-bottom:0;}
.rep-share{display:inline-block;width:56px;height:6px;margin-right:8px;border-radius:3px;background:var(--lav-2);vertical-align:middle;overflow:hidden;}
.rep-share i{display:block;height:100%;background:var(--blue);}
.rep-spark{display:inline-flex;align-items:flex-end;gap:2px;height:22px;vertical-align:middle;}
.rep-spark i{width:4px;border-radius:2px;background:var(--blue);opacity:.75;}
