:root {
  --paper: #f0f1f3;
  --ink: #161b26;
  --ink-2: #4a5468;
  --muted: #566073;
  --line: #d3d8e0;
  --panel: #1c2331;
  --panel-2: #252e40;
  --amber: #f3b13f;
  --amber-dim: #8a6a33;
  --red: #e0442f;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, fieldset { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* En-tête */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4rem; }
.brand { font-weight: 800; text-decoration: none; letter-spacing: -0.01em; }
.menu { display: flex; align-items: center; gap: 1.75rem; list-style: none; padding: 0; }
.menu a { text-decoration: none; color: var(--muted); font-weight: 500; }
.menu a:hover { color: var(--ink); }
.menu .btn { color: #fff; }

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .7rem 1.2rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 600;
  transition: background-color .2s;
}
.btn:hover { background: #2b3446; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #ffc65e; }
.btn[disabled] { opacity: .6; cursor: wait; }
.dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(224, 68, 47, .25); }

/* Accueil */
.hero { padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4rem); }
.hero h1 {
  font-size: clamp(2.9rem, 9.5vw, 7.25rem);
  font-weight: 800;
  line-height: .92; letter-spacing: -0.035em;
}
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem 4rem; align-items: start; margin-top: clamp(1.75rem, 4vw, 2.75rem); }
.lead { font-size: clamp(1.2rem, 2.2vw, 1.45rem); line-height: 1.45; max-width: 34ch; }
.hero-side { color: var(--muted); max-width: 38ch; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Cadran */
.tuner-section { padding-bottom: clamp(3.5rem, 8vw, 6rem); }
.tuner {
  background: linear-gradient(180deg, var(--panel-2), var(--panel) 40%);
  color: #e8ebf1;
  border-radius: 1.25rem;
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  box-shadow: 0 30px 60px -30px rgba(22, 27, 38, .55), inset 0 1px 0 rgba(255,255,255,.06);
}
.tuner-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.tuner-head h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 700; }
.tuner-tools { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.tuner-hint { color: #9aa3b5; font-size: .95rem; }
.sound {
  display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 999px;
  padding: .35rem .8rem; font-size: .85rem; color: #c3c9d5; cursor: pointer;
}
.sound svg { width: 1rem; height: 1rem; }
.sound .on { display: none; }
.sound[aria-pressed="true"] { color: var(--amber); border-color: rgba(243,177,63,.5); }
.sound[aria-pressed="true"] .on { display: inline; }
.sound[aria-pressed="true"] .off { display: none; }

.dial {
  position: relative;
  height: 9.5rem;
  border-radius: .75rem;
  background: radial-gradient(120% 140% at 50% 120%, rgba(243,177,63,.16), transparent 60%), #10151f;
  box-shadow: inset 0 2px 10px rgba(0,0,0,.6);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}
.js .dial { cursor: grab; }
.dial.dragging { cursor: grabbing; }
.scale { position: absolute; inset: auto 2.5% 2.6rem 2.5%; height: 2.4rem; }
.tick { position: absolute; bottom: 0; width: 1px; height: .55rem; background: var(--amber-dim); }
.tick.major { height: 1.1rem; width: 2px; background: var(--amber); }
.tick span {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  margin-top: .35rem; font-size: .75rem; color: var(--amber); font-variant-numeric: tabular-nums;
}
/* 88 et 108 restent entiers sur les petits écrans */
.tick:first-child span { transform: translateX(-25%); }
.tick:last-child span { transform: translateX(-75%); }
.mhz { position: absolute; right: 1rem; bottom: .35rem; font-size: .7rem; color: var(--amber-dim); }
.stations { position: absolute; inset: 0 2.5%; }
.station {
  position: absolute; top: .9rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  background: none; border: 0; padding: .25rem .4rem; cursor: pointer;
  color: #9aa3b5; font-size: .8rem; line-height: 1.2; white-space: nowrap;
  z-index: 1; text-shadow: 0 0 6px #10151f, 0 0 3px #10151f;
  transition: color .2s;
}
.station.low { top: 3.1rem; }
.station.end { transform: translateX(calc(-100% + 1rem)); align-items: flex-end; }
.station strong { font-size: .95rem; color: #d8dde7; font-variant-numeric: tabular-nums; }
.station:hover, .station[aria-pressed="true"] { color: var(--amber); }
.station[aria-pressed="true"] strong { color: #fff; }
.needle {
  position: absolute; top: .5rem; bottom: .5rem; width: 3px; margin-left: -1.5px;
  background: var(--red); border-radius: 2px;
  box-shadow: 0 0 12px rgba(224, 68, 47, .8);
  left: 0;
  transition: left 1.1s cubic-bezier(.65, 0, .25, 1);
  pointer-events: none;
}
.dragging .needle { transition: none; }
.needle::before {
  content: ""; position: absolute; left: 50%; bottom: -.1rem; transform: translateX(-50%);
  width: .9rem; height: .9rem; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 4px rgba(224, 68, 47, .25);
}

.readout { display: grid; grid-template-columns: 13rem 1fr; gap: 1.5rem 2.5rem; margin-top: 2rem; }
.readout-freq { font-size: clamp(2.5rem, 6vw, 3.75rem); font-weight: 800; line-height: 1; color: var(--amber); font-variant-numeric: tabular-nums; }
.readout-freq small { display: block; font-size: .9rem; font-weight: 500; color: #9aa3b5; margin-top: .6rem; line-height: 1.4; }
.readout.static .readout-freq { color: #6b7488; }
.post + .post { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.08); }
.post h3 { font-size: 1.2rem; font-weight: 700; }
.readout .when { display: block; margin-bottom: .3rem; color: var(--amber); font-size: .95rem; font-variant-numeric: tabular-nums; }
.post p { color: #c3c9d5; margin-top: .4rem; max-width: 60ch; }
.panel[hidden] { display: none; }

/* Sections */
section.block { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--line); }
.block-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1rem 4rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); align-items: end; }
.block-head h2 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.block-head p { color: var(--muted); max-width: 52ch; }

/* Résultats */
.results { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; }
.results li { padding: 0 1.5rem; border-left: 2px solid var(--ink); }
.results .num { display: block; font-size: clamp(2.75rem, 5.5vw, 4.25rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.results .num sup { font-size: .42em; vertical-align: .95em; margin-left: .05em; }
.results p { color: var(--muted); margin-top: .75rem; font-size: 1rem; }

/* Services : horloge de programmation */
.services-ui { display: grid; grid-template-columns: minmax(0, 26rem) 1fr; gap: 3rem 5rem; align-items: center; }
.clock-wrap { display: none; }
.js .clock-wrap { display: block; }
.clock { position: relative; width: 100%; max-width: 26rem; margin-inline: auto; aspect-ratio: 1; }
.clock svg { width: 100%; height: 100%; display: block; overflow: visible; }
.seg { cursor: pointer; transition: opacity .25s, transform .25s; transform-origin: 180px 180px; }
.seg path { stroke: var(--paper); stroke-width: 3; }
.seg.p0 path { fill: var(--ink); }
.seg.p1 path { fill: var(--red); }
.seg.p2 path { fill: var(--amber); }
.seg { opacity: .28; }
.seg.in-pillar { opacity: .6; }
.seg.active { opacity: 1; transform: scale(1.035); }
.seg:hover { opacity: .9; }
.seg:focus { outline: none; }
.seg:focus-visible path { stroke: var(--ink); stroke-width: 3; stroke-dasharray: 4 3; }
.clock-tick { stroke: var(--ink-2); }
.clock-label { fill: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.hand { transition: transform .7s cubic-bezier(.65, 0, .25, 1); transform-origin: 180px 180px; }
.clock-center {
  position: absolute; inset: 31%; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  pointer-events: none; padding: .5rem;
}
.clock-center small { color: var(--muted); font-size: .8rem; line-height: 1.25; }
.clock-center strong { font-size: clamp(.95rem, 2.3vw, 1.1rem); line-height: 1.2; margin-top: .35rem; }
.clock-hint { text-align: center; color: var(--muted); font-size: .95rem; margin-top: 1rem; }

.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.js .services { display: block; }
.js .service:not(.active) { display: none; }
.service h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.25; padding-bottom: 1rem; border-bottom: 2px solid var(--ink); }
.js .service h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.service > p { color: var(--muted); margin-top: 1rem; max-width: 52ch; }
.service ul { list-style: none; padding: 0; margin-top: 1.5rem; }
.service li { position: relative; }
.service li + li { margin-top: 1.25rem; }
.js .service li { cursor: pointer; padding: .9rem 1rem .9rem 1.25rem; border-radius: .6rem; transition: background-color .2s; margin-top: .25rem; }
.js .service li::before { content: ""; position: absolute; left: 0; top: .9rem; bottom: .9rem; width: 3px; border-radius: 2px; background: transparent; }
.js .service li:hover { background: rgba(22, 27, 38, .04); }
.js .service li.active { background: #fff; box-shadow: 0 8px 24px -14px rgba(22,27,38,.35); }
.js .service li.active::before { background: var(--red); }
.service li strong { display: block; font-weight: 650; }
.service li span { color: var(--muted); font-size: .98rem; }

/* Expertise */
.expertise { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem 5rem; }
.expertise h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 1.25rem; }
.skills { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
.skills li { padding: .45rem .9rem; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-size: .95rem; }
.training { list-style: none; padding: 0; }
.training li { padding-block: .9rem; border-bottom: 1px solid var(--line); font-weight: 600; }
.training li:first-child { padding-top: 0; }
.training span { display: block; color: var(--muted); font-size: .95rem; font-weight: 400; margin-top: .1rem; }

/* Contact */
.contact { background: var(--panel); color: #e8ebf1; padding-block: clamp(4rem, 10vw, 7rem); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem 5rem; align-items: start; }
.contact h2 { font-size: clamp(2.25rem, 6vw, 4.5rem); font-weight: 800; line-height: .95; letter-spacing: -0.03em; max-width: 12ch; }
.contact .intro { color: #b3bbca; margin-top: 1.5rem; max-width: 40ch; font-size: 1.15rem; }
.channels { display: grid; gap: 1.25rem; margin-top: 2.5rem; list-style: none; padding: 0; }
.channels span { display: block; color: #8e98ab; font-size: .9rem; }
.channels a { color: #fff; font-size: clamp(1.1rem, 2.2vw, 1.3rem); font-weight: 600; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 5px; overflow-wrap: anywhere; }
.channels a:hover { color: var(--amber); }
.copy { margin-left: .6rem; background: none; border: 1px solid rgba(255,255,255,.2); color: #b3bbca; border-radius: 999px; padding: .15rem .65rem; font-size: .8rem; cursor: pointer; vertical-align: middle; }
.copy:hover { color: #fff; border-color: #fff; }

.brief { background: var(--panel-2); border: 1px solid rgba(255,255,255,.08); border-radius: 1.25rem; padding: clamp(1.25rem, 3vw, 2rem); }
.brief h3 { font-size: 1.3rem; font-weight: 700; }
.brief > p { color: #9aa3b5; font-size: .95rem; margin-top: .3rem; }
.brief fieldset { border: 0; padding: 0; margin-top: 1.5rem; }
.brief legend, .field label { display: block; font-size: .9rem; color: #c3c9d5; font-weight: 600; margin-bottom: .6rem; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: .45rem .9rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.18); color: #d8dde7; font-size: .92rem;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip span:hover { border-color: rgba(255,255,255,.45); }
.chip input:checked + span { background: var(--amber); border-color: var(--amber); color: var(--ink); font-weight: 600; }
.chip input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.field.full { grid-column: 1 / -1; }
.field input, .field textarea {
  width: 100%; background: #10151f; border: 1.5px solid rgba(255,255,255,.12); border-radius: .6rem;
  padding: .7rem .85rem; color: #fff; transition: border-color .15s;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--amber); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.brief-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.form-status { font-size: .95rem; color: #c3c9d5; }
.form-status.error { color: #ff8c7a; }
.form-done { text-align: left; padding-block: 1rem; }
.form-done h3 { font-size: 1.6rem; }
.form-done p { color: #b3bbca; margin-top: .6rem; max-width: 40ch; }

footer { background: var(--panel); color: #8e98ab; font-size: .9rem; }
footer .wrap { padding-block: 1.5rem; border-top: 1px solid rgba(255,255,255,.08); }

/* Responsive */
@media (max-width: 960px) {
  .services { grid-template-columns: 1fr; gap: 2.75rem; }
  .services-ui, .contact-grid { grid-template-columns: 1fr; }
  .clock { max-width: 22rem; }
  .results { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .expertise { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .menu li:not(:last-child) { display: none; }
  .hero-grid, .block-head, .readout { grid-template-columns: 1fr; }
  .readout { gap: 1rem; }
  .station { font-size: 0; gap: 0; }
  .station strong { font-size: .85rem; }
  .dial { height: 8rem; }
  .station.low { top: 2.6rem; }
  .tick.odd span { display: none; }
  .fields { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .results { grid-template-columns: 1fr; }
  .btn { padding: .6rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .needle, .hand, .seg { transition: none; }
}
