/* ── VuHow / شوف كيفاش ───────────────────────────────────────── */
:root {
  --red: #c84646;
  --red-dark: #a83636;
  --red-soft: #fbeeee;
  --gold: #b8860b;
  --gold-soft: #fbf4e2;
  --ink: #1f1a1a;
  --muted: #6b6363;
  --line: #ece6e6;
  --bg: #faf8f7;
  --card: #ffffff;
  --green: #1f8a4c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 26, 26, .05), 0 6px 24px rgba(31, 26, 26, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--red); }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
small { font-size: .78em; color: var(--muted); font-weight: 500; }
.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 16px; }

/* ── En-tête ── */
.top { background: var(--red); color: #fff; position: sticky; top: 0; z-index: 10; }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand__eye { width: 38px; height: 19px; }
.brand__eye path { fill: #fff; }
.brand__eye circle:nth-of-type(1) { fill: var(--red); }
.brand__eye circle:nth-of-type(2) { fill: #fff; }
.brand__name { font-weight: 800; font-size: 1.25rem; }
.brand__en { font-size: .7rem; letter-spacing: .18em; opacity: .75; font-weight: 700; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a[aria-current] { background: rgba(255, 255, 255, .16); }

/* ── Bandeau ── */
.hero { background: linear-gradient(180deg, var(--red) 0%, var(--red-dark) 100%); color: #fff; padding: 40px 0 56px; }
.hero h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); font-weight: 800; }
.hero h1 span { color: #ffd98a; }
.hero__kicker { letter-spacing: .25em; font-weight: 700; font-size: .8rem; opacity: .8; margin: 0 0 6px; }
.hero .lead { font-size: 1.08rem; max-width: 640px; opacity: .95; margin: 0; }
.hero--tool { padding: 24px 0 64px; }
.hero--tool h1 { font-size: clamp(1.5rem, 4.4vw, 2.2rem); }
.hero--gold { background: linear-gradient(180deg, #8a5a00 0%, #6e4700 100%); }
.crumbs { font-size: .85rem; opacity: .85; margin-bottom: 8px; }
.crumbs a { color: #fff; }
.crumbs span { margin: 0 4px; }

/* ── Cartes et outils ── */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card__title { font-size: 1.15rem; }
.tool-grid { display: grid; gap: 16px; margin-top: -40px; position: relative; }
.tool-grid > *, .karats > *, .row2 > * { min-width: 0; }
.tool-grid--flat { margin-top: 0; }
@media (min-width: 820px) { .tool-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

.field { display: block; margin-bottom: 16px; }
.field__label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.field__input { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.field__input:focus-within, select:focus { border-color: var(--red); outline: 3px solid var(--red-soft); }
.field__input input { flex: 1; width: 100%; min-width: 0; border: 0; padding: 12px 14px; font: inherit; font-size: 1.05rem; background: transparent; outline: none; direction: ltr; text-align: right; }
.field__input--big input { font-size: 1.6rem; font-weight: 800; padding: 12px 16px; }
.field__unit { padding: 0 14px; color: var(--muted); font-weight: 500; white-space: nowrap; }
select { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; font: inherit; background: #fff; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 .field { margin-bottom: 0; }

.seg { display: flex; border: 0; padding: 4px; margin: 0 0 18px; background: var(--bg); border-radius: 12px; gap: 4px; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 9px 6px; border-radius: 9px; cursor: pointer; font-weight: 700; font-size: .92rem; color: var(--muted); }
.seg input:checked + span { background: #fff; color: var(--red); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--red); }

.result { border-top: 4px solid var(--red); }
.hero--gold ~ .wrap .result { border-top-color: var(--gold); }
.result__label { margin: 0; color: var(--muted); font-weight: 700; }
.result__big { margin: 0; font-size: clamp(2.2rem, 8vw, 3rem); font-weight: 800; color: var(--red); line-height: 1.2; direction: ltr; text-align: right; }
.result__big small { font-size: 1rem; }
.result__sub { margin: 2px 0 14px; color: var(--muted); }

.bar { height: 10px; background: var(--red-soft); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.bar__net { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .25s; }

.breakdown { width: 100%; border-collapse: collapse; font-size: .96rem; }
.breakdown th { text-align: right; font-weight: 500; padding: 8px 0; border-bottom: 1px solid var(--line); }
.breakdown td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); direction: ltr; font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown .neg { color: var(--red-dark); }
.breakdown .total th, .breakdown .total td { font-weight: 800; border-bottom: 0; font-size: 1.05rem; color: var(--green); }
.breakdown--small { font-size: .9rem; }
.more { margin: 8px 0 14px; }
.more summary { cursor: pointer; color: var(--red); font-weight: 700; font-size: .92rem; }

.btn { display: inline-block; background: var(--red); color: #fff; border: 0; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--red-dark); }
.btn--ghost { background: transparent; color: var(--red); border: 1.5px solid var(--red); width: 100%; }
.btn--ghost:hover { background: var(--red-soft); }
.hero .btn { background: #fff; color: var(--red); }

/* ── Or ── */
.karats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: -40px; position: relative; }
@media (min-width: 820px) { .karats { grid-template-columns: repeat(4, 1fr); } }
.karat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; border-top: 4px solid #e8d7ae; }
.karat--main { border-top-color: var(--gold); background: var(--gold-soft); }
.karat p { margin: 0; }
.karat__k { font-weight: 800; color: var(--gold); }
.karat__price { font-size: 1.5rem; font-weight: 800; line-height: 1.3; }
.karat__price small { display: block; font-size: .8rem; }
.karat__hint { font-size: .82rem; color: var(--muted); }
.meta { font-size: .88rem; color: var(--muted); margin: 14px 0 20px; }
.meta strong { color: var(--ink); direction: ltr; unicode-bidi: isolate; }
.stale { color: var(--red); }
.hero--gold ~ .wrap .result__big { color: var(--gold); }
.chart { padding: 14px; color: var(--gold); margin-bottom: 16px; }
.spark { width: 100%; height: 120px; display: block; }
.up { color: var(--green); }
.down { color: var(--red); }
.notice { margin-top: -40px; position: relative; text-align: center; }

/* ── Accueil ── */
.section-title { font-size: 1.35rem; margin-top: 28px; }
.tools { display: grid; gap: 14px; margin-top: -36px; position: relative; }
@media (min-width: 720px) { .tools { grid-template-columns: 1fr 1fr; } }
.tool { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; color: inherit; text-decoration: none; border: 1.5px solid transparent; transition: border-color .15s, transform .15s; }
.tool:hover { border-color: var(--red); transform: translateY(-2px); }
.tool__icon { flex: none; width: 52px; height: 52px; border-radius: 12px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; }
.tool__icon svg { width: 28px; height: 28px; }
.tool--gold .tool__icon { background: var(--gold-soft); color: var(--gold); }
.tool--gold:hover { border-color: var(--gold); }
.tool__body { display: flex; flex-direction: column; gap: 2px; }
.tool__body strong { font-size: 1.1rem; }
.tool__body span { color: var(--muted); font-size: .94rem; }
.tool__body .tool__live { margin-top: 6px; color: var(--ink); font-size: .9rem; }
.tool__live b { color: var(--green); }
.why { margin: 12px 0 40px; }
.why__grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .why__grid { grid-template-columns: repeat(3, 1fr); } }
.why__grid div { background: var(--card); border-radius: var(--radius); padding: 16px; border: 1px solid var(--line); }
.why__grid p { margin: 4px 0 0; color: var(--muted); font-size: .94rem; }

/* ── Articles ── */
.prose { max-width: 760px; padding-top: 28px; padding-bottom: 40px; }
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.prose li { margin-bottom: .4em; }
.steps { padding-inline-start: 1.2em; }
.note { font-size: .9rem; color: var(--muted); background: #fff; border-inline-start: 3px solid var(--line); padding: 10px 14px; border-radius: 6px; }
.table-scroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; font-size: .93rem; box-shadow: var(--shadow); }
.data th { background: var(--red-soft); color: var(--red-dark); font-weight: 700; text-align: right; padding: 10px 12px; white-space: nowrap; }
.data td { padding: 9px 12px; border-top: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.data a { text-decoration: none; font-weight: 700; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 8px 0 0; color: #3d3535; }
.contact-mail { font-size: 1.3rem; font-weight: 800; }

/* ── Publicité ── */
.ad { margin: 24px 0; text-align: center; min-height: 100px; }
.ad__label { display: block; font-size: .7rem; color: var(--muted); margin-bottom: 4px; }
.ad--placeholder { display: grid; place-items: center; border: 2px dashed #d8cfcf; border-radius: 10px; color: #a99; font-size: .85rem; }

/* ── Pied de page ── */
.foot { background: #1f1a1a; color: #cfc6c6; padding: 28px 0; font-size: .92rem; }
.foot__in { display: grid; gap: 14px; }
.foot strong { color: #fff; font-size: 1.1rem; }
.foot p { margin: 4px 0 0; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: #fff; }
.foot__copy { font-size: .82rem; opacity: .7; }
