/* Page de préinscription Artyste. Aucune ressource externe : polices et logo
   sont servis par le site lui-même (la CSP n'autorise que 'self'). */

@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("polices/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("polices/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("polices/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("polices/poppins-latin-700-normal.woff2") format("woff2"); }

:root {
  --fond: #0e1a14;
  --fond-2: #142a20;
  --vert: #21372b;
  --or: #d2ac4e;
  --or-clair: #e3c476;
  --ivoire: #fffef8;
  --texte: #1b2b22;
  --texte-doux: #4a5b51;
  --trait: #6f8077;
  --erreur: #7a1f27;
  --sur-fond: rgba(255, 254, 248, 0.78);
  --police: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--police);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ivoire);
  background-color: var(--fond);
  background-image:
    radial-gradient(60rem 38rem at 100% -8%, rgba(210, 172, 78, 0.22), transparent 62%),
    radial-gradient(48rem 36rem at -10% 110%, rgba(33, 55, 43, 0.9), transparent 70%);
  background-repeat: no-repeat;
}

h1, h2, h3, p { margin: 0; }

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.25rem 1.25rem 1.5rem;
  max-width: 78rem;
  margin: 0 auto;
}

/* Un anneau doré très discret derrière le titre : de la matière, pas de décor. */
.page::before {
  content: "";
  position: absolute;
  top: 3rem;
  left: -9rem;
  width: 26rem;
  height: 26rem;
  border: 1px solid rgba(210, 172, 78, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

/* ── En-tête ─────────────────────────────────────────────────────────── */

.entete { position: relative; display: flex; }

.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.375rem 1.125rem 0.375rem 0.5rem;
  border: 1px solid rgba(255, 254, 248, 0.2);
  border-radius: 999px;
  background: rgba(255, 254, 248, 0.04);
}
.logo { display: block; width: 2rem; height: 2rem; }
.separateur { width: 1px; height: 1.25rem; background: rgba(255, 254, 248, 0.3); }
.mot {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ivoire);
}

/* ── Accroche ────────────────────────────────────────────────────────── */

.principal {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex: 1;
}

.accroche { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }

.pastille {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3125rem 0.875rem;
  border: 1px solid rgba(210, 172, 78, 0.55);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--or-clair);
}
.point { width: 0.4375rem; height: 0.4375rem; border-radius: 50%; background: var(--or); }

.titre {
  font-size: clamp(2.5rem, 8.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.titre .or { color: var(--or); }

.sous-titre {
  max-width: 30rem;
  font-size: 1.0625rem;
  color: var(--sur-fond);
}

.avertissement {
  padding: 0.75rem 1rem;
  border: 1px solid var(--or);
  border-radius: 0.75rem;
  color: var(--ivoire);
  font-size: 0.9375rem;
}

/* ── Carte du formulaire ─────────────────────────────────────────────── */

.carte {
  background: var(--ivoire);
  color: var(--texte);
  border-radius: 1.25rem;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 1.5rem 3.5rem rgba(0, 0, 0, 0.35);
}
.carte-titre { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 1rem; }
.merci { display: flex; flex-direction: column; gap: 0.75rem; }
.merci .carte-titre { margin-bottom: 0; }
.merci:focus { outline: none; }

.formulaire { display: flex; flex-direction: column; gap: 1rem; }
.champs { display: flex; flex-direction: column; gap: 0.875rem; }
.rangee { display: grid; grid-template-columns: 1fr; gap: 0.875rem; }
.champ { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }

label, legend { font-size: 0.8125rem; font-weight: 500; color: var(--texte); padding: 0; }
.facultatif { font-weight: 400; color: var(--texte-doux); }

input[type="text"], input[type="email"], select {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.75rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--texte);
  background: #fff;
  border: 1px solid var(--trait);
  border-radius: 0.625rem;
  appearance: none;
  -webkit-appearance: none;
}
select {
  padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--vert) 50%), linear-gradient(135deg, var(--vert) 50%, transparent 50%);
  background-position: calc(100% - 1.125rem) 50%, calc(100% - 0.8125rem) 50%;
  background-size: 0.3125rem 0.3125rem;
  background-repeat: no-repeat;
}
input::placeholder { color: var(--texte-doux); }

.aide { font-size: 0.75rem; color: var(--texte-doux); }
.erreur { font-size: 0.75rem; font-weight: 500; color: var(--erreur); }

[aria-invalid="true"] { border-color: var(--erreur); box-shadow: 0 0 0 1px var(--erreur); }

/* Focus visible partout : anneau vert sur l'ivoire, doré sur le fond sombre. */
:focus-visible { outline: 3px solid var(--vert); outline-offset: 2px; }
.page > :is(header, aside) :focus-visible, .accroche :focus-visible { outline-color: var(--or); }
.carte :focus-visible { outline: 3px solid var(--vert); outline-offset: 2px; box-shadow: 0 0 0 5px rgba(210, 172, 78, 0.55); }

/* ── Groupes de boutons radio ────────────────────────────────────────── */

.groupe { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.segments { display: grid; gap: 0.5rem; }
.segments-3 { grid-template-columns: repeat(3, 1fr); }
.segments-2 { grid-template-columns: repeat(2, 1fr); }
.segment { position: relative; display: block; cursor: pointer; }
.segment input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.segment span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--texte);
  background: #fff;
  border: 1px solid var(--trait);
  border-radius: 0.625rem;
  text-align: center;
}
.segment input:checked + span { background: var(--vert); border-color: var(--vert); color: var(--ivoire); }
.segment input:focus-visible + span { outline: 3px solid var(--vert); outline-offset: 2px; box-shadow: 0 0 0 5px rgba(210, 172, 78, 0.55); }
.segment:hover input:not(:checked) + span { background: #f1efe3; }

.bloc-mineur { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.75rem; background: #f4f1e2; border-radius: 0.75rem; }

/* ── Cases à cocher ──────────────────────────────────────────────────── */

.case { display: grid; grid-template-columns: 1.25rem 1fr; column-gap: 0.625rem; row-gap: 0.25rem; align-items: start; }
.case input { width: 1.25rem; height: 1.25rem; margin: 0.125rem 0 0; accent-color: var(--vert); }
.case label { font-size: 0.8125rem; font-weight: 400; line-height: 1.4; }
.case .erreur { grid-column: 2; }

.lien {
  display: inline;
  padding: 0;
  font: inherit;
  font-weight: 500;
  color: var(--vert);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  background: none;
  border: 0;
  cursor: pointer;
}
.lien:hover { color: #0e1a14; }

/* ── Champ piège : hors écran, hors clavier, hors lecteurs d'écran ───── */

.piege { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ── Bouton et état d'envoi ──────────────────────────────────────────── */

.statut { min-height: 0; font-size: 0.8125rem; font-weight: 500; color: var(--erreur); }
.statut:empty { display: none; }

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 3rem;
  padding: 0 1.5rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1a1405;
  background: var(--or);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.bouton:hover { background: var(--or-clair); }
.bouton[disabled] { cursor: progress; background: #b9a066; }
.bouton-secondaire { width: auto; color: var(--ivoire); background: var(--vert); }
.bouton-secondaire:hover { background: #2c4a3a; }
.sans-js .bouton { display: none; }

/* ── Bandeau de l'offre ──────────────────────────────────────────────── */

.offre {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.375rem;
  padding: 0.875rem 1.25rem;
  border: 1px solid rgba(210, 172, 78, 0.45);
  border-radius: 1rem;
  background: rgba(255, 254, 248, 0.05);
}
.offre-etiquette { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--or); }
.offre-corps { font-size: 1rem; }
.offre-corps strong { font-weight: 700; color: var(--or-clair); }
.offre-code {
  padding: 0.125rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--or-clair);
  border: 1px dashed rgba(210, 172, 78, 0.7);
  border-radius: 0.375rem;
}
.offre-note { font-size: 0.75rem; color: var(--sur-fond); }

/* ── Notice RGPD (fenêtre intégrée) ──────────────────────────────────── */

.notice {
  width: min(40rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  color: var(--texte);
  background: var(--ivoire);
  border: 0;
  border-radius: 1.25rem;
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.5);
}
.notice::backdrop { background: rgba(8, 14, 10, 0.75); }
.notice-corps { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.5rem; max-height: calc(100dvh - 2rem); overflow-y: auto; }
.notice h2 { font-size: 1.25rem; font-weight: 600; }
.notice h3 { margin-top: 0.75rem; font-size: 0.9375rem; font-weight: 600; }
.notice p { font-size: 0.875rem; color: var(--texte); }
.notice .aide { color: var(--texte-doux); }
.notice a { color: var(--vert); font-weight: 500; }
.notice-actions { display: flex; justify-content: flex-end; margin-top: 1rem; }

/* Sans JavaScript, la notice n'a pas de bouton pour s'ouvrir : on la montre à la suite de la page. */
.sans-js .notice { display: block; position: static; width: auto; max-width: 40rem; margin: 1.5rem 0 0; }
.sans-js .notice-actions { display: none; }
.sans-js .lien { text-decoration: none; cursor: default; }

/* ── Écran large : tout tient sur un écran, sans défilement ──────────── */

@media (min-width: 640px) {
  .rangee { grid-template-columns: 1fr 1fr; }
  .carte { padding: 1.75rem; }
}

@media (min-width: 1024px) and (min-height: 700px) {
  html, body { height: 100%; overflow: hidden; }
  .page {
    height: 100dvh;
    min-height: 0;
    padding: 1.5rem 3rem 1.5rem;
    gap: 1rem;
  }
  .page::before { top: 4rem; left: -6rem; }
  .principal {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
    align-items: center;
    gap: 4rem;
    min-height: 0;
  }
  .accroche { gap: 1.5rem; }
  .carte { max-height: 100%; overflow-y: auto; padding: 1.5rem 1.75rem; }
  .carte-titre { margin-bottom: 0.75rem; }
  .formulaire { gap: 0.875rem; }
  .champs { gap: 0.625rem; }
  .offre {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
  }
  .offre-note { margin-left: auto; }
}

@media (min-width: 1024px) and (min-height: 700px) and (max-height: 820px) {
  .titre { font-size: clamp(2.5rem, 5.4vw, 4rem); }
  .champs { gap: 0.5rem; }
  .carte { padding: 1.25rem 1.5rem; }
  .carte-titre { font-size: 1.25rem; margin-bottom: 0.5rem; }
  .formulaire { gap: 0.625rem; }
  input[type="text"], input[type="email"], select, .segment span { height: 2.25rem; }
  .bouton { height: 2.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .segment input:checked + span { outline: 2px solid Highlight; }
}
