/* MIDI — page provisoire. Jetons issus de la charte MIDI v0.1 */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Couleurs */
  --ink: #15161c;
  --ink-soft: #22232b;
  --paper: #f3f2ee;
  --surface: #ffffff;
  --sand: #e4e2db;
  --line: #d2d0c8;
  --text-muted: #4a4b55;
  --text-subtle: #6b6c75;
  --on-ink-muted: #b9bac4;
  --violet: #4b3bff;
  --violet-dark: #3a2be0;
  --lime: #d4f24a;
  --alert: #b42318;

  /* Typo */
  --font-sans: "Instrument Sans", Arial, sans-serif;
  --font-logo: Arial, Helvetica, sans-serif;

  /* Espacements et rayons */
  --space-xs: 16px;
  --space-s: 24px;
  --space-card: 32px;
  --space-m: 40px;
  --space-l: 56px;
  --space-xl: 72px;
  --radius-s: 14px;
  --radius-m: 20px;
  --radius-l: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

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

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.11em;
  line-height: 1;
  text-decoration: none;
}
.logo__dot { width: 0.75em; height: 0.75em; border-radius: 50%; background: var(--lime); flex: none; }
.logo--on-ink { color: var(--paper); }
.logo--mono { color: var(--text-subtle); font-size: 18px; }
.logo--mono .logo__dot { background: currentColor; }

/* ---------- Typo commune ---------- */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: var(--space-xs);
}
.eyebrow--lime { color: var(--lime); }

.section__title {
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.025em;
  max-width: 18ch;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--radius-pill);
  font: 600 16px/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: #def763; }
.btn--violet { background: var(--violet); color: var(--paper); }
.btn--violet:hover { background: var(--violet-dark); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ---------- Accroche ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  min-height: min(92vh, 820px);
  display: flex;
}
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--gutter) clamp(56px, 9vw, 112px);
  display: flex;
  flex-direction: column;
}
.hero__content { margin-top: auto; padding-top: clamp(120px, 22vh, 220px); max-width: 640px; }
.hero__title {
  font-size: clamp(56px, 10vw, 128px);
  line-height: .95;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-s);
}
.hero__lead {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
  font-weight: 500;
  color: var(--on-ink-muted);
  max-width: 34ch;
  margin-bottom: var(--space-m);
}

/* Cercles signature */
.hero__art { position: absolute; inset: 0; pointer-events: none; }
.disc { position: absolute; border-radius: 50%; }
.disc--violet {
  width: clamp(280px, 46vw, 620px);
  aspect-ratio: 1;
  background: var(--violet);
  top: clamp(-180px, -12vw, -60px);
  right: clamp(-200px, -10vw, -60px);
}
.disc--lime {
  width: clamp(170px, 28vw, 380px);
  aspect-ratio: 1;
  background: var(--lime);
  top: clamp(150px, 26vw, 360px);
  right: clamp(-90px, 4vw, 120px);
}

/* Sur mobile, les cercles passent en haut et restent discrets derrière le titre */
@media (max-width: 720px) {
  .hero { min-height: auto; }
  .disc--violet { width: 300px; top: -110px; right: -120px; }
  .disc--lime { width: 170px; top: 90px; right: -50px; }
  .hero__content { padding-top: 190px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 128px) 0; }
.section__title + .cards { margin-top: var(--space-l); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-s); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border-radius: var(--radius-l);
  padding: var(--space-card);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.card__title { font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin-top: 10px; }
.card__text { color: var(--text-muted); }

.pill {
  display: inline-block;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.pill--violet { background: var(--violet); color: var(--paper); }
.pill--ink { background: var(--ink); color: var(--paper); }
.pill--sand { background: var(--sand); color: var(--ink); }

/* ---------- Contact ---------- */
.section--contact { padding-top: 0; }
.contact {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-xl);
  align-items: start;
}
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; gap: var(--space-m); } }

.contact__intro { position: sticky; top: 32px; }
@media (max-width: 900px) { .contact__intro { position: static; } }
.contact__lead { margin-top: var(--space-s); font-size: 19px; color: var(--text-muted); max-width: 32ch; }
.contact__mail { margin-top: var(--space-s); color: var(--text-muted); }
.contact__mail a { color: var(--ink); font-weight: 600; text-decoration-color: var(--violet); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.contact__mail a:hover { color: var(--violet); }

.form {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 44px);
  display: grid;
  gap: 20px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }

.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.req { color: var(--violet); }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: 400 16px/1.4 var(--font-sans); /* 16px : pas de zoom auto sur iOS */
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 14px 16px;
  transition: border-color .15s ease, background-color .15s ease;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2315161c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--text-subtle); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--violet); background: var(--surface); box-shadow: 0 0 0 3px rgba(75, 59, 255, .18); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--alert); }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-muted); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--violet); flex: none; }
.consent.is-invalid span { color: var(--alert); }

.form .btn { justify-self: start; }
@media (max-width: 560px) { .form .btn { justify-self: stretch; } }

.form__status { font-size: 15px; font-weight: 500; min-height: 1.4em; }
.form__status.is-error { color: var(--alert); }
.form__status.is-success {
  color: var(--ink);
  background: var(--lime);
  padding: 14px 18px;
  border-radius: var(--radius-s);
}
.form__status:empty { display: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pied de page ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer__inner { display: flex; align-items: center; gap: var(--space-s); flex-wrap: wrap; }
.footer__text { font-size: 14px; color: var(--text-subtle); }
.footer__link {
  margin-left: auto;
  background: none;
  border: 0;
  padding: 0;
  font: 400 14px var(--font-sans);
  color: var(--text-subtle);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.footer__link:hover { color: var(--ink); }
@media (max-width: 560px) { .footer__link { margin-left: 0; } }

/* ---------- Fenêtre mentions légales ---------- */
.modal {
  border: 0;
  border-radius: var(--radius-l);
  padding: 0;
  max-width: 560px;
  width: calc(100% - 32px);
  color: var(--ink);
  background: var(--surface);
}
.modal::backdrop { background: rgba(21, 22, 28, .6); }
.modal__body { padding: clamp(24px, 5vw, 40px); display: grid; gap: 14px; font-size: 15px; color: var(--text-muted); }
.modal__body h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 4px; }
.modal__body strong { color: var(--ink); }
.modal__body .btn { justify-self: start; margin-top: 8px; }
