/* WELD VISION — styles propres à l'onglet Calculs.
   Chargé après styles.css, dont il reprend les jetons (--navy-900, --accent…).
   Rien ici ne redéfinit une classe existante. */

/* ── Barre à cinq onglets ────────────────────────────────────────
   Un onglet de plus : on resserre le texte plutôt que de le tronquer. */
.bottomnav button { font-size: 9.5px; padding: 7px 1px; letter-spacing: -0.1px; }
.bottomnav button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 340px) { .bottomnav button { font-size: 9px; } }

/* ── Sommaire ────────────────────────────────────────────────────
   Quatre cartes tactiles ; une carte fermée reste lisible et cliquable,
   elle mène au mur payant au lieu de s'ouvrir à moitié. */
.calc-grille { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }

.calc-carte {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left;
  font-family: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); color: var(--text);
}
.calc-carte:active { transform: translateY(1px); }
.calc-carte .calc-ic {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(140deg, var(--navy-700), var(--accent-deep));
}
.calc-carte .calc-ic svg { width: 19px; height: 19px; }
.calc-carte .calc-txt { flex: 1; min-width: 0; }
.calc-carte .calc-txt b { display: block; font-size: 15px; font-weight: 700; color: var(--navy-900); margin-bottom: 3px; }
.calc-carte .calc-txt span { font-size: 12.5px; color: var(--muted); line-height: 1.45; display: block; }
.calc-carte .badge { flex-shrink: 0; margin-top: 2px; }
.calc-carte.verrou .calc-ic { background: #cbd5e1; }
.calc-carte.verrou .calc-txt b { color: var(--muted); }

/* ── Écran de calculatrice ───────────────────────────────────────*/
.calc-retour { justify-content: flex-start; padding-left: 0; margin-bottom: 2px; }
.calc-u { font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }

/* Deux ou trois champs sur une ligne : les cotes d'un joint se lisent
   ensemble, pas en colonne. */
.calc-duo, .calc-trio { display: grid; gap: 10px; }
.calc-duo { grid-template-columns: repeat(2, 1fr); }
.calc-trio { grid-template-columns: repeat(3, 1fr); }
.calc-duo .field, .calc-trio .field { margin-bottom: 12px; }
.calc-trio .field label { font-size: 11px; }
@media (max-width: 330px) { .calc-trio { grid-template-columns: repeat(2, 1fr); } }

/* ── Fiche de résultat ───────────────────────────────────────────
   Le chiffre qu'on vient chercher est en haut et en gros ; le reste est
   une liste de lignes, pas une grille de cartes. */
.calc-fiche { padding-top: 0; }
.calc-vedette {
  margin: 0 -14px 4px; padding: 16px 14px 14px;
  background: linear-gradient(140deg, var(--navy-900), var(--navy-950));
  border-radius: var(--radius) var(--radius) 0 0; color: #fff;
}
.calc-gros { display: block; font-size: 32px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.calc-gros small { font-size: 15px; font-weight: 700; color: var(--accent); margin-left: 4px; }
.calc-sous { display: block; font-size: 12px; color: #94a3b8; margin-top: 6px; line-height: 1.4; }

.calc-ligne {
  display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.calc-ligne:last-child { border-bottom: none; padding-bottom: 2px; }
.calc-l { font-size: 13px; color: var(--muted); }
.calc-v { font-size: 14px; font-weight: 700; color: var(--navy-900); text-align: right; font-variant-numeric: tabular-nums; }
.calc-n { grid-column: 1 / -1; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Classement des procédés ─────────────────────────────────────*/
.calc-rang {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 13px; margin-bottom: 10px;
}
.calc-rang.premier { border-color: var(--accent-deep); box-shadow: 0 4px 18px rgba(8, 145, 178, .13); }
.calc-rang.ecarte { opacity: .7; }
.calc-rang-h { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.calc-rang-h b { font-size: 14.5px; color: var(--navy-900); flex: 1; }
.calc-rang-n {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11px; font-weight: 800; color: var(--muted);
}
.calc-rang.premier .calc-rang-n { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }

.calc-jauge { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 10px; }
.calc-jauge span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--navy-700), var(--accent-deep)); }
.calc-jauge span.neg { background: #fca5a5; }

.calc-rang .lab {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); margin-bottom: 4px;
}
.calc-rang ul { list-style: none; display: flex; flex-direction: column; gap: 5px; margin-bottom: 9px; }
.calc-rang li { font-size: 12.5px; line-height: 1.4; padding-left: 17px; position: relative; color: var(--text); }
.calc-rang ul:last-child { margin-bottom: 0; }
.calc-pour li::before { content: '+'; position: absolute; left: 3px; top: -1px; color: var(--ok); font-weight: 800; }
.calc-contre li::before { content: '−'; position: absolute; left: 3px; top: -1px; color: var(--ko); font-weight: 800; }

/* Valeur trop longue pour la colonne de droite : elle passe sous l'étiquette. */
.calc-ligne.bloc { grid-template-columns: 1fr; }
.calc-ligne.bloc .calc-v { text-align: left; font-size: 13px; font-weight: 600; margin-top: 3px; line-height: 1.4; }

/* Pastille des calculatrices réservées au compte entreprise. */
.badge.calc-b-ent { background: #e0e7ff; color: #3730a3; }
