:root{
  --bg: #f3f4f6;        /* gris clair */
  --card: #ffffffcc;
  --text: #111827;      /* noir doux */
  --muted: #4b5563;     /* gris texte */
  --line: #6b7280;      /* gris lignes */
  --accent: #2563eb;    /* bleu sobre */
  --accent2: #10b981;   /* vert */
  --focus: rgba(37, 99, 235, 0.25);
  --shadow: 0 10px 24px rgba(17,24,39,.08);
  --radius: 14px;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 10% 10%, #ffffff 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.35;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(8px);
  background: rgba(243,244,246,0.72);
  border-bottom: 1px solid rgba(107,114,128,0.25);
}

.logo{
  width: 70px;
  height: auto;
  border-radius: 90px;
  display: grid;
  place-items: center;
  display: block;
}

.title{
  font-size: 22px;
  font-weight: 800;
}
.subtitle{
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.container{
  max-width: 1040px;
  padding: 18px 16px 48px;
  margin: 0 auto;
}

.card{
  background: var(--card);
  border: 1px solid rgba(107,114,128,0.25);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-top: 14px;
}

h2{
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
}

.grid{
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0,1fr));
}

@media (max-width: 900px){
  .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

.field{
  display:flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(107,114,128,0.25);
  border-radius: 12px;
  background: rgba(255,255,255,0.55);
}

.field > span{
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

input, select{
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(107,114,128,0.35);
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  outline: none;
}

input:focus, select:focus{
  border-color: rgba(37,99,235,0.65);
  box-shadow: 0 0 0 4px var(--focus);
}

.help{
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

small.help{ margin-top: -2px; }

.row{
  display:flex;
  gap: 10px;
  align-items: center;
}
.hint{
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  min-width: 18px;
}

.muted{ color: var(--muted); font-weight: 600; }

.result{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.resultRow{
  padding: 12px;
  border: 1px solid rgba(107,114,128,0.25);
  border-radius: 12px;
  background: rgba(255,255,255,0.65);
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.resultRow.small{
  background: rgba(255,255,255,0.45);
}

.label{
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}
.value{
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.2px;
}

.actions{
  margin-top: 12px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn{
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(37,99,235,0.35);
  background: rgba(37,99,235,0.10);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  transition: transform .05s ease, background .15s ease;
}
.btn:hover{ background: rgba(37,99,235,0.16); }
.btn:active{ transform: translateY(1px); }

.btn.secondary{
  border-color: rgba(107,114,128,0.35);
  background: rgba(255,255,255,0.5);
}

.footer{
  padding: 10px 4px 0;
}

.barWrap{
  margin-top: 8px;
}

.barMeta{
  display:flex;
  justify-content: flex-start;
  margin: 8px 0 6px;
}

.pill{
  display:inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(16,185,129,0.35);
  background: rgba(16,185,129,0.10);
  color: var(--text);
  font-weight: 900;
}

.barSvg{
  border: 1px solid rgba(107,114,128,0.25);
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.45));
  border-radius: 14px;
  padding: 10px;
  overflow: hidden;
}

.barSvg svg{
  width: 100%;
  height: auto;
  display:block;
}

@media (max-width: 700px){
  .value{ font-size: 20px; }
  .grid{ grid-template-columns: 1fr; }
}
