/* Page d'accueil et page d'installation. Chargée après pilmil.css et commun.css. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light dark; }
body {
  margin: 0;
  background: var(--pm-bg) radial-gradient(48rem 34rem at 92% -6%, color-mix(in srgb, var(--pm-accent) 20%, transparent), transparent 62%) no-repeat;
  color: var(--pm-fg);
  font-size: clamp(1rem, .95rem + .25vw, 1.125rem);
  line-height: 1.6;
  overflow-wrap: break-word;
}
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--pm-accent); outline-offset: 3px; border-radius: 6px; }
.pm-wrap { padding-inline: max(1.25rem, env(safe-area-inset-left, 0px)); }
h1, h2, h3 { text-wrap: balance; }
section[id], article[id], [id="bientot"] { scroll-margin-top: 1rem; }

.skip { position: absolute; left: .5rem; top: -4rem; z-index: 10; padding: 10px 16px; border-radius: 8px; background: var(--pm-fg); color: var(--pm-bg); font-weight: 700; }
.skip:focus { top: .5rem; }

/* En-tête et pied de page : zones de clic de 44 px */
.top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1.5rem; padding-block: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; text-decoration: none; font-family: var(--pm-display); font-weight: 700; font-size: 1.4rem; }
.brand img { border-radius: 10px; }
.nav { display: flex; flex-wrap: wrap; column-gap: 1.25rem; font-size: .95rem; color: var(--pm-muted); }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.nav a:hover { color: var(--pm-fg); text-decoration: underline; }
.foot { border-top: 1px solid var(--pm-line); padding-top: 1rem; font-size: .95rem; color: var(--pm-muted); }
.foot ul { display: flex; flex-wrap: wrap; column-gap: 1.25rem; list-style: none; margin: 0 0 .5rem; padding: 0; }
.foot li a { display: inline-flex; align-items: center; min-height: 44px; color: var(--pm-fg); }

/* Hero */
.hero { display: grid; gap: var(--pm-gap); align-items: center; padding-block: 1.5rem 2rem; }
@media (min-width: 800px) { .hero { grid-template-columns: 1.4fr .6fr; column-gap: 3rem; } }
.hero h1 { font-size: clamp(2.1rem, 1.5rem + 2.8vw, 3.4rem); line-height: 1.06; letter-spacing: -.025em; margin: .6rem 0 .8rem; }
.nb { white-space: nowrap; }
.lead { color: var(--pm-muted); font-size: 1.15em; max-width: 34em; margin: 0; }
.hero .pm-phone { justify-self: center; }
.engagements { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; list-style: none; margin: 1.5rem 0 0; padding: .85rem 0 0; border-top: 1px solid var(--pm-line); font-weight: 700; font-size: .95rem; }
.engagements li::before { content: "✓ "; color: var(--pm-accent); }

/* Instruments : ce que les visiteurs cherchent */
.instruments { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); list-style: none; padding: 0; margin: 0; }
.instruments a { display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 64px; padding: .75rem 1rem; border: 1px solid var(--pm-line); border-left: 4px solid var(--pm-accent); border-radius: 12px; background: var(--pm-surface); text-decoration: none; line-height: 1.35; }
.instruments a:hover { border-color: var(--pm-accent); }
.instruments span { color: var(--pm-muted); font-size: .9rem; }

/* Simulateur : maquette toujours claire, quel que soit le thème */
.sim-frame {
  --accent: #A04B08; --paper: #FAF8F4; --paper-ink: #1E1D1A; --paper-green: #285D4D; --paper-line: #D5D1C7;
  --key-white: #FFFFFF; --key-black: #1C1917; --key-line: #D6D3CD; --key-accent: #B45309;
  width: min(100%, 400px); margin-inline: auto; padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px;
  border: 8px solid var(--paper-ink); border-radius: 32px; background: var(--paper); color: var(--paper-ink);
  overflow: hidden; box-shadow: 0 18px 44px rgba(0,0,0,.22);
}
.sim-frame > * { min-width: 0; }
.sim-frame :focus-visible { outline-color: var(--paper-ink); }
.sim-head, .sim-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.sim-head strong { font-size: 16px; }
#fr-key-badge { font-size: .75rem; line-height: 1.4; color: var(--paper-green); background: #E6F0EC; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.sim-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; }
.sim-frame select, .sim-toolbar button, .sim-octave button { font: inherit; font-size: .9rem; font-weight: 700; min-height: 44px; min-width: 44px; padding: 8px 12px; border: 1px solid var(--paper-line); border-radius: 999px; background: var(--key-white); color: var(--paper-ink); cursor: pointer; }
.sim-toolbar button.primary { background: var(--key-accent); border-color: var(--key-accent); color: #FFFFFF; }
#fr-inst { flex: 1 1 100%; min-width: 0; }
#fr-durs { gap: 4px; }
#fr-durs button { flex: 1 1 auto; white-space: nowrap; }
.sim-staff { border: 1px solid var(--paper-line); border-radius: 14px; background: #FFFFFF; padding: 6px; overflow-x: auto; }
.sim-staff svg { display: block; }
.sim-foot { flex-wrap: wrap; }
#fr-status { flex: 1 1 14rem; margin: 0; font-size: .75rem; line-height: 1.4; color: var(--paper-green); }
.sim-octave { display: flex; align-items: center; gap: 4px; }
.sim-octave button { padding: 8px 10px; border-radius: 8px; }
#fr-oct-label { font-size: .75rem; line-height: 1.4; color: #6B675E; font-weight: 700; min-width: 54px; text-align: center; }
.piano-scroll { overflow-x: auto; }
.piano { position: relative; display: flex; height: 105px; border-radius: 14px; overflow: hidden; border: 1px solid var(--paper-line); user-select: none; }
.wkey { flex: 1; background: var(--key-white); color: var(--key-black); border: 0; border-right: 1px solid var(--key-line); display: flex; align-items: flex-end; justify-content: center; padding: 0 0 .5rem; font: inherit; font-size: .75rem; font-weight: 700; cursor: pointer; }
.wkey:last-child { border-right: 0; }
.wkey:active { background: #F3EDE2; }
.bkey { position: absolute; top: 0; height: 60%; width: 7.5%; padding: 0; background: var(--key-black); color: #FAFAF9; border: 0; border-radius: 0 0 6px 6px; font: inherit; font-size: .75rem; cursor: pointer; z-index: 2; transform: translateX(-50%); }
.bkey:active { background: var(--key-accent); }
@media (max-width: 700px) {
  .piano { min-width: 448px; }
  .bkey { width: 44px; }
}

/* Et aussi, questions, page d'installation */
.also { display: grid; gap: .75rem var(--pm-gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); padding-left: 1.15em; margin: 0; color: var(--pm-muted); }
.also strong { color: var(--pm-fg); }
.faq details { border-top: 1px solid var(--pm-line); max-width: 70ch; }
.faq details:last-of-type { border-bottom: 1px solid var(--pm-line); }
.faq summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; }
.faq details p, .faq details ul { margin: 0 0 .75rem; color: var(--pm-muted); }
.pm-card p a, .pm-card details a { color: var(--pm-accent); }
.pm-card details p, .pm-card details ul { color: var(--pm-muted); margin: 0 0 .75rem; }
.pm-card details ul { list-style: disc; padding-left: 1.15em; }
code { overflow-wrap: anywhere; font-size: .88em; }
.prose { max-width: 46rem; padding-bottom: 3rem; }
.prose h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); line-height: 1.1; }
.prose h2 { margin: 2.25rem 0 .5rem; line-height: 1.2; }
.prose p, .prose li { color: var(--pm-muted); }
.prose strong { color: var(--pm-fg); }
.prose .pm-way p, .prose .pm-way h3 { margin: 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body { background: #fff; color: #000; }
  .top, .skip, .pm-actions, .hero .pm-phone, #simulateur { display: none; }
}
