/* =============================================================
   SUPAPUNK · Les outils (calculateurs)
   Chargé seulement par les pages d'outils. Mêmes jetons que le
   thème : sur fond clair (.inv), les réglages à gauche, le
   résumé foncé à droite, le détail et le texte en dessous.
   ============================================================= */
.ot { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(18px, 2.4vw, 32px); align-items: start; }
@media (max-width: 1000px) { .ot { grid-template-columns: 1fr; } }

.ot-group { border: 0; background: var(--card); border-radius: var(--r-card); padding: clamp(20px, 2.4vw, 30px); margin: 0 0 14px; min-width: 0; }
.ot-group > legend { float: left; width: 100%; padding: 0; margin-bottom: 18px; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(22px, 2.2vw, 28px); line-height: 1; color: var(--ink); display: flex; align-items: center; gap: 12px; }
.ot-group > legend b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c-signal); color: #fff; font-family: var(--mono); font-size: 13px; font-weight: 700; flex: none; }
.ot-group > legend + * { clear: both; }

.ot-f + .ot-f { margin-top: 22px; }
.ot-lab { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ot-lab label, .ot-lab .ot-t { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); line-height: 1.4; }
.ot-num { display: inline-flex; align-items: baseline; gap: 6px; flex: none; }
.ot-num input { width: 5.6em; font-family: var(--display); font-weight: 900; font-size: 28px; line-height: 1; color: var(--ink); text-align: right; border: 0; border-bottom: 2px solid var(--line-2); background: transparent; padding: 2px 0; -moz-appearance: textfield; appearance: textfield; }
.ot-num input::-webkit-outer-spin-button, .ot-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ot-num input:focus { outline: 0; border-bottom-color: var(--c-signal); }
.ot-num i { font-style: normal; font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--ink-mute); }
.ot-help { font-size: 13.5px; line-height: 1.5; color: var(--ink-mute); margin: 6px 0 12px; }
.ot-f input[type="range"] { margin-top: 12px; }
.ot .tags { gap: 8px; }
.ot button.tag { background: transparent; cursor: pointer; font-size: 10.5px; padding: 10px 14px; }
.ot button.tag:hover { border-color: var(--c-signal); color: var(--ink); }
.ot button.tag.is-selected { background: var(--c-signal); border-color: var(--c-signal); color: #fff; }
.ot-check { display: inline-flex; gap: 10px; align-items: center; margin-top: 12px; font-size: 14px; color: var(--ink-mute); cursor: pointer; }
.ot-check input { width: 18px; height: 18px; accent-color: var(--c-signal); }
.ot-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.ot-checks .ot-check { margin-top: 6px; }
.ot-checks small { color: var(--ink-mute); opacity: .75; margin-left: auto; font-size: 12px; }
@media (max-width: 560px) { .ot-checks { grid-template-columns: 1fr; } .ot-num input { width: 4.4em; font-size: 24px; } }

/* le résumé, toujours visible à côté des réglages */
.ot-res { position: sticky; top: 96px; background: var(--st-navy, var(--sp-ink, #17150F)); color: #fff; border-radius: var(--r-card); padding: clamp(22px, 2.6vw, 32px); }
@media (max-width: 1000px) { .ot-res { position: static; } }
.ot-res .k { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--sp-yellow, #FCE118); }
.ot-big { font-family: var(--display); font-weight: 900; font-size: clamp(52px, 6vw, 84px); line-height: .9; margin-top: 10px; }
.ot-big small { font-size: .32em; color: #ADBDCC; margin-left: 8px; letter-spacing: 0; }
.ot-sub { font-size: 15px; line-height: 1.5; color: #C9D6E3; margin-top: 10px; }
.ot-badge { margin-top: 16px; font-size: 14px; line-height: 1.5; border-radius: var(--r-sm); padding: 12px 14px; background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 3px 0 0 rgba(255,255,255,.28); }
.ot-badge.is-ok { box-shadow: inset 3px 0 0 var(--sp-yellow, #FCE118); }
/* plus d'orange : c'est le jaune de la marque qui signale ce qui demande
   un regard, et le filet neutre qui tient le reste. */
.ot-badge.is-warn { box-shadow: inset 3px 0 0 var(--sp-yellow, #FCE118); background: rgba(252,225,24,.10); }
.ot-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.ot-tile { background: rgba(255,255,255,.06); border-radius: var(--r-sm); padding: 14px 16px; min-width: 0; }
.ot-tile span { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #ADBDCC; }
.ot-tile b { display: block; font-family: var(--display); font-weight: 900; font-size: 32px; line-height: 1; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ot-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ot-actions button, .ot-actions a { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; border: 0; border-radius: var(--r-pill); padding: 11px 15px; cursor: pointer; text-decoration: none; background: rgba(255,255,255,.1); color: #fff; }
.ot-actions .is-main { background: var(--sp-yellow, #FCE118); color: var(--sp-ink, #17150F); }
.ot-actions button:hover, .ot-actions a:hover { background: #fff; color: var(--sp-ink, #17150F); }
.ot-copied { font-family: var(--mono); font-size: 11px; color: var(--sp-yellow, #FCE118); margin-top: 10px; min-height: 1em; }

/* le détail */
.ot-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: clamp(28px, 3.4vw, 44px); }
@media (max-width: 800px) { .ot-detail { grid-template-columns: 1fr; } }
.ot-card { background: var(--card); border-radius: var(--r-card); padding: clamp(20px, 2.4vw, 30px); min-width: 0; }
.ot-card.wide { grid-column: 1 / -1; }
.ot-card h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(22px, 2.2vw, 28px); line-height: 1; margin-bottom: 14px; color: var(--ink); }
.ot-card.is-best { box-shadow: inset 0 0 0 2px var(--c-signal); }
.ot-dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.ot-dl div:first-child { border-top: 0; }
.ot-dl dt { font-size: 14.5px; color: var(--ink-mute); }
.ot-dl dd { font-weight: 700; font-size: 15px; color: var(--ink); text-align: right; white-space: nowrap; }
.ot-dl div.is-total dt { color: var(--ink); font-weight: 700; }
.ot-dl div.is-total dd { font-family: var(--display); font-weight: 900; font-size: 26px; }
.ot-note { font-size: 13.5px; line-height: 1.55; color: var(--ink-mute); margin-top: 12px; }
.ot-note a, .ot-text a { color: var(--c-signal); }
.ot-bars { display: grid; gap: 14px; }
.ot-bar .t { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink); }
.ot-bar .t b { white-space: nowrap; }
.ot-bar .tr { height: 12px; border-radius: 6px; background: var(--card-3); margin-top: 8px; overflow: hidden; }
.ot-bar .fill { height: 100%; border-radius: 6px; background: var(--c-signal); }
.ot-bar.is-muted .fill { background: #9AA8BA; }
.ot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .ot-cols { grid-template-columns: 1fr; } }
.ot-cols .ot-card { margin: 0; }
.ot-pros { margin-top: 14px; display: grid; gap: 6px; }
.ot-pros p { font-size: 13.5px; line-height: 1.5; color: var(--ink-mute); padding-left: 18px; position: relative; }
.ot-pros p::before { content: "+"; position: absolute; left: 0; color: var(--c-signal); font-weight: 700; }
.ot-pros p.m::before { content: "–"; color: #B54708; }

/* le texte pour comprendre (et pour les moteurs de recherche) */
.ot-text { max-width: 760px; }
.ot-text h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(30px, 3.6vw, 48px); line-height: .95; margin: 0 0 18px; }
.ot-text h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(22px, 2.2vw, 28px); line-height: 1; margin: 34px 0 10px; }
.ot-text p, .ot-text li { font-size: 16.5px; line-height: 1.7; color: var(--ink-mute); }
.ot-text p + p { margin-top: 14px; }
.ot-text ul { margin: 10px 0 0 20px; display: grid; gap: 6px; }
.ot-text strong { color: var(--ink); }
.ot-formula { font-family: var(--mono); font-size: 13.5px; line-height: 1.7; background: rgba(255,255,255,.06); border-radius: var(--r-sm); padding: 14px 16px; margin-top: 14px; color: var(--ink); }
.inv .ot-formula { background: var(--card); }
.ot-src { font-size: 13px; line-height: 1.6; margin-top: 22px; opacity: .8; }
.ot-faq { border-top: 1px solid var(--line); }
.ot-faq:last-child { border-bottom: 1px solid var(--line); }
.ot-faq summary { cursor: pointer; list-style: none; padding: 18px 34px 18px 0; position: relative; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(19px, 1.9vw, 24px); line-height: 1.05; color: var(--ink); }
.ot-faq summary::-webkit-details-marker { display: none; }
.ot-faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-family: var(--mono); font-size: 20px; color: var(--c-signal); }
.ot-faq[open] summary::after { content: "–"; }
.ot-faq p { font-size: 16px; line-height: 1.7; color: var(--ink-mute); padding-bottom: 18px; }

/* les autres outils */
.ot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.ot-link { display: flex; flex-direction: column; gap: 10px; text-decoration: none; background: var(--card); border-radius: var(--r-card); padding: clamp(20px, 2.4vw, 28px); color: var(--ink); transition: transform var(--fast), box-shadow var(--fast); }
.ot-link:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 2px var(--c-signal); }
.ot-link .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--c-signal); }
.ot-link b { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(24px, 2.4vw, 30px); line-height: .98; }
.ot-link p { font-size: 14.5px; line-height: 1.55; color: var(--ink-mute); }
.ot-link .go { margin-top: auto; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-signal); }
.ot-link.is-here { opacity: .55; pointer-events: none; }

/* barre du bas, sur mobile, quand le résumé n'est pas à l'écran */
.ot-bar-m { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; display: none; align-items: center; justify-content: space-between; gap: 12px; background: var(--sp-ink, #17150F); color: #fff; border-radius: 16px; padding: 12px 16px; box-shadow: 0 16px 40px -12px rgba(23,21,15,.5); }
.ot-bar-m b { font-family: var(--display); font-weight: 900; font-size: 24px; }
.ot-bar-m span { font-size: 12.5px; color: #C9D6E3; }
.ot-bar-m a { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--sp-ink, #17150F); background: var(--sp-yellow, #FCE118); border-radius: 999px; padding: 10px 14px; text-decoration: none; white-space: nowrap; }
@media (max-width: 1000px) { .ot-bar-m.on { display: flex; } body.int .mascot { display: none !important; } }

@media print {
  .site-header, .menu-btn, .mascot, .site-footer, .ot-form, .ot-actions, .ot-copied, .ot-bar-m, .ot-hide-print, .diag-modal, .v2-overlay { display: none !important; }
  body.int main > .section { margin: 0 !important; border-radius: 0 !important; padding-block: 12px !important; background: #fff !important; }
  body.int main > .section:first-of-type * { color: var(--sp-ink, #17150F) !important; -webkit-text-stroke-color: var(--sp-ink, #17150F) !important; }
  .ot { grid-template-columns: 1fr; }
  .ot-res { position: static; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ot-card { break-inside: avoid; box-shadow: inset 0 0 0 1px #E3E8EF; }
}
