/* style.css */
:root{
  --accent:#6a6af4;
  --badge:#E1000F;

  --text:#2e2e2e;
  --text-strong:#111111;
  --muted:#6a6a6a;

  --border:#d8d8d8;
  --bg-soft:#f1f1f1;
  --bg-soft-2:#f6f6f6;

  --page-w:800px;
  --menu-w:1200px;
  --text-spacing: 0 0 16px 0;
}

*{ box-sizing:border-box; }
*{ border-radius: 0 !important; }

html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:#fff;
}

.skip-link{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left:12px;
  top:12px;
  width:auto;
  height:auto;
  padding:10px 12px;
  background:#fff;
  border:1px solid var(--border);
  z-index:9999;
}

/* Header / menu */
.site-header{
  margin-top:12px;
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  background:#fff;
}

.menu-wrap{
  max-width: var(--menu-w);
  margin:0 auto;
  padding:14px 16px;
}
.menu{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.logo-link{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
  min-width:0;
}
.logo{ display:block; width:56px; height:56px; }

.brand{
  display:flex;
  flex-direction:column;
  margin-left:12px;
  line-height:1.15;
  min-width:0;
}

.site-name{
  font-weight:700;
  font-size:18px;
  line-height:24px;
  color: var(--text-strong);
}
.site-slogan{
  margin-top:2px;
  font-size:14px;
  line-height:18px;
  color: var(--muted);
}

.badge{
  display:inline-flex;
  align-items:center;
  padding:10px 12px;
  border:1px solid var(--badge);
  background: var(--badge);
  color:#fff;
  font-weight:700;
  font-size:14px;
  line-height:18px;
  white-space:nowrap;
}

/* Page layout */
.page{
  max-width: var(--page-w);
  margin: 34px auto 60px auto;
  padding: 0 16px;
}

/* Typo */
h1{
  margin: 0 0 12px 0;
  color: var(--text-strong);
  font-size:32px;
  line-height:40px;
  font-weight:700;
}
p{
  font-size:18px !important;
  line-height:28px !important;
  margin: var(--text-spacing);
  color: var(--text);
}
p strong{
  color: var(--text-strong);
  font-weight:700;
}

.section{ margin: 0 0 28px 0; }

/* Intro */
.intro{
  margin-top:0;
  padding: 0 0 0 14px;
  border:0;
  border-left:4px solid var(--accent);
  background:transparent;
}

/* Simulator */
.simulator{
  border:1px solid var(--border);
  background:#fff;
  padding:14px;
}

/* Tabs */
.tabs{
  display:flex;
  gap:10px;
  margin: 2px 0 14px 0;
  flex-wrap:wrap;
}
.tab{
  appearance:none;
  border:1px solid var(--border);
  background: var(--bg-soft-2);
  color: var(--text-strong);
  padding:12px 14px;
  cursor:pointer;
  font-weight:700;
  font-size:18px;
  line-height:22px;
}
.tab:hover{ background: #ededed; }
.tab:focus{
  outline:none;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.12);
}
.tab.is-active{
  background:#fff;
  border-color: var(--text-strong);
  color: var(--text-strong);
}

.sim-grid{
  display:flex;
  gap:16px;
  align-items:stretch;
}
.sim-left,.sim-right{ width:50%; min-width:0; }

.form{ padding: 8px 6px 6px 6px; }
.field-row{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:12px;
}

label{
  font-size:18px;
  line-height:28px;
  font-weight:700;
  color: var(--text-strong);
}

input{
  width:100%;
  padding:12px 12px;
  border:1px solid var(--border);
  font-size:17px;
  outline:none;
}
input:focus{
  border-color: var(--text-strong);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.10);
}

.formula{ margin: 8px 0 0 0; color: var(--text-strong); }
.hint{
  margin:10px 0 0 0;
  color: var(--muted);
  font-size:16px !important;
  line-height:22px !important;
  min-height:22px;
}

/* Diagrammes */
.diagram{
  border:0 !important;
  background:transparent !important;
  height:220px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:visible;
}
.diagram svg{
  width:100%;
  height:220px;
  display:block;
}

/* Separator & result */
.separator{
  height:1px;
  background: var(--border);
  margin:16px 0 12px 0;
}
.result-row{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 2px 2px 6px 2px;
}
.result-label{
  font-weight:400;
  color: var(--text-strong);
}
.result-box{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  background: var(--bg-soft);
  border:1px solid var(--border);
  color: var(--text-strong);
}
.result-strong{ font-weight:700; }

/* Accordions */
.accordion{
  border:1px solid var(--border);
  background:#fff;
  margin:0 0 14px 0;
}
.accordion:hover{ background: #f8f8f8; }

.accordion-summary{
  cursor:pointer;
  list-style:none;
  padding: 12px 12px;
}
.accordion-summary::-webkit-details-marker{ display:none; }

.accordion-summary h2{
  margin:0;
  font-size:20px;
  line-height:28px;
  color: var(--text-strong);
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-weight:700;
}
.accordion-summary h2::after{
  content:"▾";
  font-size:18px;
  color: var(--text-strong);
}
details[open] .accordion-summary h2::after{ content:"▴"; }

/* Ouverture/fermeture */
.accordion-body{
  background:#fff;
  padding: 16px 12px 12px 12px;
  overflow:hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 250ms ease, opacity 200ms ease;
}
details[open] .accordion-body{
  max-height: 900px;
  opacity: 1;
}

/* Listes */
.bullets{
  margin: 0 0 14px 18px;
  padding:0;
}
.bullets li{
  margin: 0 0 8px 0;
  font-size:18px;
  line-height:28px;
  color: var(--text);
}

/* Tableau conversions */
.table-wrap{
  overflow:auto;
  border:1px solid var(--border);
  background:#fff;
  margin-top:10px;
}
.conv-table{
  width:100%;
  border-collapse:collapse;
  min-width:520px;
}
.conv-table th,
.conv-table td{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align:top;
}
.conv-table th{
  background:#f2f2f2;
  color: var(--text-strong);
  font-weight:700;
}
.conv-table tr:last-child td{ border-bottom:0; }

.example{
  margin-top:16px;
}

/* Footer */
.site-footer{
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  background:#fff;
  margin-top:40px;
}

.footer-wrap{
  max-width: var(--menu-w);
  margin:0 auto;
  padding:18px 16px;
  text-align:center;
}

.footer-line{
  margin:4px 0;
  font-size:14px !important;
  line-height:20px !important;
  color: var(--muted);
}

.site-footer a{
  color: var(--text-strong);
  text-decoration:none;
  font-weight:600;
}
.site-footer a:hover{
  text-decoration:underline;
}

/* Responsive */
@media (max-width: 780px){
  .sim-grid{ flex-direction:column; }
  .sim-left,.sim-right{ width:100%; }
  .diagram{ height:200px; }
  .diagram svg{ height:200px; }
  h1{ font-size:28px; line-height:36px; }
  .conv-table{ min-width:420px; }
  .badge{ padding:8px 10px; font-size:13px; }
}