/* 06-parrainage.css — Formulaire Parrainage (aligné main.js) */

/* Espace avec la section précédente */
.pf-card{ margin-top:46px; }  /* ajuste 32–64px selon ton œil */

/* ===== Carte + ombre ===== */
.pf-card{
  position:relative;
  background:
    radial-gradient(160% 200% at 50% 40%,
      var(--g1) 0%, var(--g2) 38%, var(--g3) 68%, var(--g4) 100%);
  border-radius:16px;
  box-shadow:
    0 0 0 1px rgba(230,231,255,.36),
    0 16px 40px rgba(198,201,255,.55),
    0 4px 10px rgba(0,0,0,.14),
    0 0 0 3px rgba(198,201,255,1),
    0 26px 60px rgba(158,168,255,.78),
    0 10px 22px rgba(0,0,0,.24);
  padding:28px;
  color:#fff;
  display:flow-root;
}
.pf-card::before{
  content:"";
  position:absolute; inset:8px 12px;
  border:1px solid rgba(230,231,255,.9);
  border-radius:12px;
  pointer-events:none;
  opacity:.92;
}

/* ===== Titre + message haut ===== */
.pf-title{
  margin:0 0 8px;
  text-align:center;
  font-family: var(--ff-serif);
  text-transform: uppercase;
  letter-spacing:.06em;
  color:var(--ink);
  font-size:clamp(1.4rem, 2.2vw, 1.8rem);
}
.pf-msg{
  min-height:1.25rem;
  text-align:center;
  margin:4px 0 18px;
  font-family: var(--ff-serif);
  text-transform: uppercase;
  letter-spacing:.08em;
  color:transparent;
}
.pf-msg[data-ok="1"]{ color:#0c7039; }

/* ===== Grille ===== */
.pf-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px 18px;
  margin-bottom:16px;
}
.pf-span-2{ grid-column:1 / -1; }

/* ===== Labels en noir ===== */
.pf-field label{
  display:block;
  margin:0 0 6px;
  font-family: var(--ff-serif);
  text-transform: uppercase;
  letter-spacing:.06em;
  color:var(--ink);
  opacity:1;
  font-size:.92rem;
}

/* ===== Champs ===== */
.pf-field input,
.pf-field select{
  width:100%;
  border-radius:10px;
  border:1px solid rgba(230,231,255,.85);
  padding:12px 14px;
  background:#fff;
  color:var(--ink);
}
.pf-field input::placeholder{ color:#8a90b2; opacity:.9; }

/* Focus / invalid / disabled */
.pf-field input:focus,
.pf-field select:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(230,231,255,.35);
}
.pf-field [aria-invalid="true"]{
  border-color:#8F0E2C;
  box-shadow:0 0 0 3px rgba(143,14,44,.15);
}
.pf-field input:disabled,
.pf-field select:disabled{ opacity:.6; cursor:not-allowed; }

/* ===== Téléphone composite ===== */
.pf-phone{
  display:grid;
  grid-template-columns: 170px 1fr;
  gap:10px;
}
.pf-field select#tel-prefix{ padding-right:28px; }

/* Alignement et chevron du select préfixe */
.pf-phone select{
  -webkit-appearance:none;
  appearance:none;
  background:
    #fff
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'><path d='M6 9l6 6 6-6' fill='none' stroke='%232E2C62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>")
    no-repeat right 12px center;
  background-size:14px;
  padding-right:40px;
  white-space:nowrap;
  direction:ltr;
  font-family:var(--ff-sans);
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1;
}
.pf-phone select option{
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1;
}

/* Bordure rouge uniquement sur le numéro (pas sur le select) */
.pf-phone.invalid input#tel-local{
  border-color:#8F0E2C;
  box-shadow:0 0 0 3px rgba(143,14,44,.15);
}

/* ===== Erreurs sous champs ===== */
.pf-err{
  display:block;
  margin-top:6px;
  font-size:.78rem;
  color:#8F0E2C;
  font-family: var(--ff-serif);
  text-transform:none;
  line-height:1.3;
  min-height:1.1em;
}
.pf-err--tel{ grid-column:2; margin-top:-4px; }

/* ===== Consentement RGPD — texte + case sur une ligne ===== */
.pf-consent{
  margin-top:8px;
  grid-column:1 / -1;
}

.pf-consent .pf-consent__label{
  display:block;               /* paragraphe classique */
  font-family: var(--ff-sans);
  text-transform:none;
  color:var(--ink);
  font-size:.95rem;
  line-height:1.4;
  letter-spacing:0;
}

.pf-consent .pf-consent__label input[type="checkbox"]{
  margin-left:8px;             /* un peu d’espace après la phrase */
  vertical-align:middle;
  accent-color:#0E1030;        /* coche noire */
}

/* Harmonisation du contour rouge du téléphone avec les autres champs */
.pf-phone.invalid input#tel-local{
  border-color:#8F0E2C !important;
  box-shadow:0 0 0 3px rgba(143,14,44,.15) !important;
}


/* ===== Zone actions + bouton animé ===== */
.pf-actions{
  text-align:center;
  display:flex;
  justify-content:center;
  align-items:center;
  padding-top:18px;
  margin-top:6px;
  border-top:1px solid rgba(230,231,255,.20);
}
.mp-ebp__btn{ margin:0 auto; }

.mp-ebp__btn{
  display:inline-block;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  cursor:pointer;
  box-sizing:border-box;
  --scale:1; --hover-scale:1.24;
  padding:18px 34px;
  border-radius:9999px;
  font-family: var(--ff-accent);
  font-weight:900;
  font-size:1.45rem;
  line-height:1.1;
  text-transform:uppercase;
  color:#0e1030;
  border:0;
  background:
    radial-gradient(160% 200% at 50% 40%,
      #C6C9FF 0%, #9EA8FF 38%, #6F79B7 68%, #2E2C62 100%);
  background-color:#2E2C62;
  box-shadow:
    0 0 0 1px rgba(230,231,255,.28),
    0 12px 26px rgba(198,201,255,.40),
    0 2px 6px rgba(0,0,0,.12),
    0 0 0 2px rgba(198,201,255,.95),
    0 18px 46px rgba(158,168,255,.65),
    0 6px 16px rgba(0,0,0,.2) !important;
  transform:scale(var(--scale));
  transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s ease;
}
.mp-ebp__btn:hover{
  --scale:var(--hover-scale);
  box-shadow:
    0 0 0 1px rgba(230,231,255,.36),
    0 16px 40px rgba(198,201,255,.55),
    0 4px 10px rgba(0,0,0,.14),
    0 0 0 3px rgba(198,201,255,1),
    0 26px 60px rgba(158,168,255,.78),
    0 10px 22px rgba(0,0,0,.24) !important;
}
.mp-ebp__btn:focus{ outline:none; }
.mp-ebp__btn:focus-visible{
  box-shadow:
    0 0 0 4px #fff,
    0 0 0 8px rgba(158,168,255,.85),
    0 26px 60px rgba(158,168,255,.78),
    0 10px 22px rgba(0,0,0,.24) !important;
  transition: box-shadow .2s ease;
}
.mp-ebp__label{ position:relative; display:inline-block; }
.mp-ebp__label::after{
  content:"";
  position:absolute; left:50%; bottom:-8px;
  width:90%; height:3px; background:#fff; border-radius:2px;
  box-shadow: 0 0 6px rgba(255,255,255,.95), 0 0 14px rgba(255,255,255,.75), 0 0 28px rgba(255,255,255,.45);
  transform:translateX(-130%); opacity:0; pointer-events:none;
}
.mp-ebp__btn:hover .mp-ebp__label::after{
  opacity:1; animation: mp-ebp-underline 900ms cubic-bezier(.2,.7,.3,1) forwards 120ms;
}
.mp-ebp__arrow{
  position:absolute; top:50%; left:0%;
  width:26px; height:26px;
  transform: translate(-140%, -50%);
  color: currentColor;
  opacity:0; pointer-events:none;
}
.mp-ebp__btn:hover .mp-ebp__arrow{ animation: mp-ebp-arrow 800ms cubic-bezier(.18,.66,.26,.99) forwards; }
.mp-ebp__btn::before,
.mp-ebp__btn::after{
  content:"";
  position:absolute; top:50%;
  width:10px; height:10px; border-radius:50%;
  transform: translate(-50%,-50%) scale(.25);
  opacity:0; pointer-events:none;
  box-shadow:
    inset 0 0 6px rgba(0,0,0,.45),
    0 0 10px rgba(198,201,255,.55);
  background: radial-gradient(circle at 50% 50%,
    rgba(0,0,0,.55) 0%,
    rgba(0,0,0,.25) 70%,
    rgba(0,0,0,0) 100%);
}
.mp-ebp__btn::before{ left:0%; }
.mp-ebp__btn::after{  left:100%; }
.mp-ebp__btn:hover::before{ animation: mp-ebp-hole-in 800ms ease-out forwards; }
.mp-ebp__btn:hover::after{  animation: mp-ebp-hole-out 800ms ease-out forwards; }
.mp-ebp__spark{
  --dx:0px; --dy:0px; --t:0ms;
  position:absolute; top:50%; left:100%;
  width:6px; height:6px; border-radius:50%;
  background:#fff; filter:blur(.2px);
  transform: translate(-50%,-50%) scale(0); opacity:0; pointer-events:none;
  box-shadow: 0 0 6px rgba(255,255,255,.9), 0 0 12px rgba(198,201,255,.7);
}
.mp-ebp__btn:hover .mp-ebp__spark{
  animation: mp-ebp-spark 700ms ease-out forwards;
  animation-delay: var(--t);
}
.mp-ebp__spark.s1{ --dx:28px; --dy:-14px; --t:40ms; }
.mp-ebp__spark.s2{ --dx:18px; --dy: 12px; --t:60ms; }
.mp-ebp__spark.s3{ --dx:36px; --dy:  6px; --t:80ms; }

/* Animations clés */
@keyframes mp-ebp-arrow{
  0%{   opacity:0; transform: translate(-140%, -50%); }
  15%{  opacity:1; }
  50%{  transform: translate(0%, -50%); }
  100%{ opacity:0; transform: translate(140%, -50%); }
}
@keyframes mp-ebp-hole-in{
  0%{   opacity:0; transform: translate(-50%,-50%) scale(.2); left:0%; }
  25%{  opacity:1; transform: translate(-50%,-50%) scale(1);  left:8%; }
  60%{  opacity:1; transform: translate(-50%,-50%) scale(.92); left:16%; }
  100%{ opacity:0; transform: translate(-50%,-50%) scale(.6); left:24%; }
}
@keyframes mp-ebp-hole-out{
  0%{   opacity:0; transform: translate(-50%,-50%) scale(.2); left:76%; }
  40%{  opacity:1; transform: translate(-50%,-50%) scale(1);  left:88%; }
  80%{  opacity:1; transform: translate(-50%,-50%) scale(.92); left:96%; }
  100%{ opacity:0; transform: translate(-50%,-50%) scale(.6); left:100%; }
}
@keyframes mp-ebp-spark{
  0%{   opacity:0; transform: translate(-50%,-50%) scale(.4); }
  20%{  opacity:1; transform: translate(calc(-50% + 4px), calc(-50%)) scale(.8); }
  100%{ opacity:0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.2); }
}
@keyframes mp-ebp-underline{
  0%{   transform: translateX(-130%); }
  100%{ transform: translateX(130%); }
}

/* Motion-safe */
@media (prefers-reduced-motion: reduce){
  .mp-ebp__btn, .mp-ebp__btn:hover{ transform:none; }
  .mp-ebp__arrow,
  .mp-ebp__spark,
  .mp-ebp__btn::before,
  .mp-ebp__btn::after,
  .mp-ebp__label::after{ animation:none !important; opacity:1; transform:none; }
}

/* ===== Responsive ===== */
@media (max-width:720px){
  .pf-grid{ grid-template-columns:1fr; }
  .pf-phone{ grid-template-columns: 1fr 1fr; }
  .pf-err--tel{ grid-column:1 / -1; }
}
