/* ============================================================
   RESONANTIA — Diagnostic Hypnothérapeute
   Design system : "L'Éveil" — cercles d'induction, respiration,
   pénombre dorée. Direction : nuit profonde, or ancien, violet
   mystique en accent discret.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,500&family=Roboto:wght@400;500;700&display=swap');

:root{
  /* Couleurs */
  --void:        #0a0a12;
  --void-2:      #0f0f1a;
  --panel:       rgba(19, 19, 32, 0.62);
  --panel-solid: #15151f;
  --ink:         #ece9f4;
  --ink-dim:     #928fa3;
  --ink-faint:   #5c5a6c;

  --gold:        #c9a961;
  --gold-bright: #eccf8e;
  --gold-dim:    rgba(201, 169, 97, 0.35);
  --gold-line:   rgba(201, 169, 97, 0.16);
  --gold-wash:   rgba(201, 169, 97, 0.08);

  --violet:      #6f5aa8;
  --violet-glow: rgba(111, 90, 168, 0.35);

  --emerald:     #6fbf9a;
  --amber:       #d8a24f;
  --rose:        #d97a86;

  /* Typo */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Rythme */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*{ box-sizing: border-box; }

html{ height: 100%; }

body{
  min-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* ------------------------------------------------------------
   Scène ambiante — anneaux d'induction + respiration
   ------------------------------------------------------------ */
body::before{
  /* fond en dégradé profond, légère teinte violette en haut */
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(111,90,168,0.14), transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(201,169,97,0.06), transparent 60%),
    var(--void);
}

.ambient-rings{
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(1100px, 140vw);
  height: min(1100px, 140vw);
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.ambient-rings svg{
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ring{
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
}

.ring--1{ animation: orbit 90s linear infinite, ring-breathe 5s ease-in-out infinite; }
.ring--2{ animation: orbit-reverse 130s linear infinite, ring-breathe 7s ease-in-out infinite 0.6s; }
.ring--3{ animation: orbit 190s linear infinite, ring-breathe 9s ease-in-out infinite 1.2s; }

@keyframes orbit{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}

@keyframes orbit-reverse{
  from{ transform: rotate(360deg); }
  to{ transform: rotate(0deg); }
}

@keyframes ring-breathe{
  0%, 100%{ opacity: 0.28; }
  50%{ opacity: 0.7; }
}

.ambient-breath{
  position: fixed;
  top: 42%;
  left: 50%;
  width: 640px;
  height: 640px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--violet-glow) 0%, transparent 68%);
  z-index: 0;
  pointer-events: none;
  animation: breathe 7s var(--ease) infinite;
  filter: blur(10px);
}

@keyframes breathe{
  0%, 100%{ transform: translate(-50%, -50%) scale(0.92); opacity: 0.55; }
  50%{ transform: translate(-50%, -50%) scale(1.08); opacity: 0.85; }
}

/* légère dérive du fond, pour que la scène ne soit jamais tout à fait statique */
body::before{
  animation: bg-drift 26s ease-in-out infinite;
}

@keyframes bg-drift{
  0%, 100%{ background-position: 50% 0%, 50% 100%, 0 0; }
  50%{ background-position: 52% 4%, 48% 96%, 0 0; }
}

/* poussière dorée en suspension */
.particles{
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.particles span{
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 6px 1px rgba(236, 207, 142, 0.55);
  opacity: 0;
  animation: drift linear infinite;
}

.particles span:nth-child(1){ left: 6%;  animation-duration: 22s; animation-delay: 0s;  }
.particles span:nth-child(2){ left: 16%; animation-duration: 28s; animation-delay: 3s;  }
.particles span:nth-child(3){ left: 27%; animation-duration: 19s; animation-delay: 1s;  }
.particles span:nth-child(4){ left: 39%; animation-duration: 25s; animation-delay: 6s;  }
.particles span:nth-child(5){ left: 52%; animation-duration: 21s; animation-delay: 2s;  }
.particles span:nth-child(6){ left: 63%; animation-duration: 30s; animation-delay: 5s;  }
.particles span:nth-child(7){ left: 74%; animation-duration: 23s; animation-delay: 8s;  }
.particles span:nth-child(8){ left: 84%; animation-duration: 26s; animation-delay: 4s;  }
.particles span:nth-child(9){ left: 92%; animation-duration: 20s; animation-delay: 7s;  }
.particles span:nth-child(10){ left: 46%; animation-duration: 33s; animation-delay: 10s; }

@keyframes drift{
  0%{ transform: translateY(0) translateX(0); opacity: 0; }
  8%{ opacity: 0.7; }
  92%{ opacity: 0.4; }
  100%{ transform: translateY(-108vh) translateX(24px); opacity: 0; }
}

/* ------------------------------------------------------------
   En-tête
   ------------------------------------------------------------ */
.site-header{
  position: relative;
  z-index: 2;
  background: rgba(10, 10, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gold-line);
  padding: 18px 0;
}

.site-header__inner{
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.brand__mark{
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.brand__mark circle{
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.1;
}

.badge{
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: var(--gold-wash);
  border: 1px solid var(--gold-line);
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ------------------------------------------------------------
   Scène principale + carte verre
   ------------------------------------------------------------ */
.stage{
  position: relative;
  z-index: 2;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.glass-card{
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--panel);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-lg);
  box-shadow:
    0 30px 80px -30px rgba(0,0,0,0.65),
    0 0 0 1px rgba(255,255,255,0.02) inset;
  padding: 44px 40px;
}

@media (max-width: 560px){
  .glass-card{ padding: 34px 24px; }
}

.reveal{
  animation: rise 0.6s var(--ease) both;
}

.reveal--delay-1{ animation-delay: 0.08s; }
.reveal--delay-2{ animation-delay: 0.16s; }
.reveal--delay-3{ animation-delay: 0.24s; }
.reveal--delay-4{ animation-delay: 0.32s; }

@keyframes rise{
  from{ opacity: 0; transform: translateY(14px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------
   Alertes flash
   ------------------------------------------------------------ */
.flash{
  margin-bottom: 22px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.5;
  border: 1px solid;
  background: rgba(255,255,255,0.02);
}
.flash--danger{ color: var(--rose); border-color: rgba(217,122,134,0.3); background: rgba(217,122,134,0.08); }
.flash--warning{ color: var(--amber); border-color: rgba(216,162,79,0.3); background: rgba(216,162,79,0.08); }
.flash--info{ color: var(--emerald); border-color: rgba(111,191,154,0.3); background: rgba(111,191,154,0.08); }

/* ------------------------------------------------------------
   Écran de garde
   ------------------------------------------------------------ */
.gate{ text-align: center; }

.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 18px;
}

.eyebrow::before,
.eyebrow::after{
  content: "";
  width: 18px;
  height: 1px;
  background: var(--gold-dim);
}

.gate h1{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  line-height: 1.28;
  color: var(--ink);
  margin: 0 0 18px;
}

.gate h1 em{
  font-style: italic;
  color: var(--gold-bright);
}

.gate p{
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 34px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* ------------------------------------------------------------
   Boutons
   ------------------------------------------------------------ */
.btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  padding: 16px 28px;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

.btn:focus-visible{
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.btn--gold{
  color: #191307;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 60%, #a3854a);
  box-shadow: 0 14px 34px -14px rgba(201, 169, 97, 0.55);
}

.btn--dark{
  color: var(--ink);
  background: linear-gradient(180deg, #1c1c29, #131319);
  border: 1px solid var(--gold-line);
}

.btn--outline{
  color: var(--gold-bright);
  background: transparent;
  border: 1px solid var(--gold-dim);
}

.btn:hover{ transform: translateY(-2px); filter: brightness(1.06); }
.btn:active{ transform: translateY(0) scale(0.99); }

.btn::before{
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s var(--ease);
}
.btn:hover::before{ left: 130%; }

.btn__icon{ width: 16px; height: 16px; flex-shrink: 0; transition: opacity 0.2s var(--ease); }

/* État "chargement" déclenché au clic, en attendant la réponse serveur */
.btn.is-loading{
  pointer-events: none;
  cursor: default;
}

.btn.is-loading .btn__label{ opacity: 0; }
.btn.is-loading .btn__icon{ opacity: 0; }

.btn.is-loading::after{
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: currentColor;
  animation: spin 0.7s linear infinite;
}

.btn--dark.is-loading::after,
.btn--outline.is-loading::after{ border-top-color: var(--gold-bright); }

@keyframes spin{
  to{ transform: rotate(360deg); }
}

/* ------------------------------------------------------------
   Voile de transition entre les pages
   ------------------------------------------------------------ */
.page-loader{
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(8, 8, 14, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

body.is-loading .page-loader{
  opacity: 1;
  pointer-events: all;
}

.page-loader__ring{
  width: 46px;
  height: 46px;
}

.page-loader__ring svg{
  width: 100%;
  height: 100%;
  animation: spin 1.4s linear infinite;
}

.page-loader__ring circle{
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 120;
  stroke-dashoffset: 90;
  opacity: 0.85;
}

.page-loader__text{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

/* ------------------------------------------------------------
   Formulaires
   ------------------------------------------------------------ */
.field{ margin-bottom: 18px; }

.field-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 420px){
  .field-grid{ grid-template-columns: 1fr; }
}

.field__label{
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 7px;
}

.field__control{
  position: relative;
}

.field__control input,
.field__control select,
.field__control textarea{
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14.5px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.field__control input::placeholder{ color: var(--ink-faint); }

.field__control input:hover{ border-color: rgba(201,169,97,0.28); }

.field__control input:focus{
  outline: none;
  border-color: var(--gold);
  background: rgba(201,169,97,0.05);
  box-shadow: 0 0 0 3px rgba(201,169,97,0.14);
}

.consent{
  font-size: 11px;
  color: var(--ink-faint);
  text-align: center;
  line-height: 1.6;
  margin: 18px 0 0;
}

/* ------------------------------------------------------------
   Quiz — progression
   ------------------------------------------------------------ */
.progress{
  margin-bottom: 28px;
}

.progress__meta{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.progress__step{
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 12px;
  line-height: 1;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

.progress__step strong{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1;
  color: var(--gold-bright);
  font-weight: 600;
}

.progress__pct{
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.progress__track{
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
}

.progress__fill{
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width 0.9s var(--ease);
}

.progress__fill::after{
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 9px; height: 9px;
  transform: translate(40%, -50%);
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 10px 3px rgba(236, 207, 142, 0.7);
}

/* ------------------------------------------------------------
   Quiz — question
   ------------------------------------------------------------ */
.question__category{
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: var(--gold-wash);
  border: 1px solid var(--gold-line);
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}

.question__text{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 26px;
}

/* Options en cartes verre, radio natif masqué */
.options{
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 30px;
}

.option{
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease), transform 0.22s var(--ease);
}

.option:hover{
  border-color: var(--gold-dim);
  background: rgba(201,169,97,0.05);
  transform: translateY(-1px);
}

.option input{
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.option__mark{
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.22);
  display: grid;
  place-items: center;
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease);
}

.option__mark::after{
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-bright);
  transform: scale(0);
  transition: transform 0.2s var(--ease);
}

.option__text{
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-dim);
  transition: color 0.22s var(--ease);
}

.option.is-selected{
  border-color: var(--gold);
  background: rgba(201,169,97,0.09);
  box-shadow: 0 0 0 1px var(--gold-dim), 0 10px 26px -16px rgba(201,169,97,0.5);
}

.option.is-selected .option__mark{ border-color: var(--gold-bright); }
.option.is-selected .option__mark::after{ transform: scale(1); }
.option.is-selected .option__text{ color: var(--ink); }

/* ------------------------------------------------------------
   Résultats
   ------------------------------------------------------------ */
.result{ text-align: center; }

.result__ring{
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 26px;
  display: grid;
  place-items: center;
}

.result__ring svg{ position: absolute; inset: 0; width: 100%; height: 100%; }

.result__ring circle{
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.result__ring .ring-track{ stroke: rgba(255,255,255,0.08); }

.result__ring .ring-draw{
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  transform-origin: center;
  transform: rotate(-90deg);
  animation: draw-ring 1.1s var(--ease) 0.2s forwards;
}

@keyframes draw-ring{
  to{ stroke-dashoffset: 0; }
}

.result__ring .result__icon{
  position: relative;
  width: 22px;
  height: 22px;
}

.result--a .ring-draw{ stroke: var(--emerald); }
.result--a .result__icon{ color: var(--emerald); }

.result--b .ring-draw{ stroke: var(--amber); }
.result--b .result__icon{ color: var(--amber); }

.result--c .ring-draw{ stroke: var(--ink-faint); }
.result--c .result__icon{ color: var(--ink-dim); }

.result__title{
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.result--a .result__title{ color: var(--gold-bright); }
.result--b .result__title{ color: var(--amber); }
.result--c .result__title{ color: var(--ink-dim); }

.result__body{
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-dim);
  text-align: left;
  margin: 0 0 24px;
}

.result__panel{
  text-align: left;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 8px;
  border: 1px solid;
  background: rgba(255,255,255,0.02);
}

.result--a .result__panel{ border-color: rgba(111,191,154,0.22); background: rgba(111,191,154,0.05); }
.result--b .result__panel{ border-color: rgba(216,162,79,0.22); background: rgba(216,162,79,0.05); }
.result--c .result__panel{ border-color: rgba(255,255,255,0.08); }

.result__panel h4{
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
}

.result__panel p{
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-dim);
  margin: 0 0 18px;
}

/* ------------------------------------------------------------
   Pied de page
   ------------------------------------------------------------ */
.site-footer{
  position: relative;
  z-index: 2;
  padding: 26px 0;
  border-top: 1px solid var(--gold-line);
  background: rgba(10,10,18,0.6);
}

.site-footer p{
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
}

/* ------------------------------------------------------------
   Accessibilité — mouvement réduit
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce){
  body::before,
  .ring,
  .ambient-breath,
  .particles span,
  .reveal,
  .option,
  .btn,
  .btn.is-loading::after,
  .page-loader__ring svg,
  .progress__fill,
  .ring-draw{
    animation: none !important;
    transition: none !important;
  }

  .particles{ display: none; }
}