/* =============================================================
   Composants partagés : primitives, boutons, formulaires,
   modales, animations
   ============================================================= */

/* ---------- Animations ---------- */
@keyframes marquee      { from { transform: translateX(0); }   to { transform: translateX(-50%); } }
@keyframes halo-pulse   { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.85; } }
@keyframes overlay-in   { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in     { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes form-slide-in{ from { opacity: 0; transform: translate(-18px, 22px); } to { opacity: 1; transform: none; } }
@keyframes label-pop    { 0% { opacity: 0; transform: scale(0.82); } 60% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }

/* ---------- Label de section (kicker) ---------- */
.kicker {
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: var(--space-4);
}
.kicker--on-dark { color: var(--pink); }

/* ---------- Cartes de section ---------- */
.section-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: clamp(32px, 4.5vw, 56px);
}
.section-card--tint { background: var(--surface-tint); }
.section-card--dark {
  position: relative;
  overflow: hidden;
  background: var(--gradient-dark);
  color: var(--on-dark);
}

/* Halo décoratif dans les sections sombres */
.halo {
  position: absolute;
  border-radius: 50%;
  background: var(--halo-purple);
  pointer-events: none;
}

/* ---------- Titres de section ---------- */
.section-title {
  font-weight: var(--fw-light);
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--purple);
}
.section-card--dark .section-title { color: var(--on-dark); }

.section-intro {
  font-weight: var(--fw-light);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-soft);
}
.section-card--dark .section-intro { color: var(--on-dark-65); }

/* ---------- Ligne éditoriale (Flecha M) ---------- */
.editorial {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: var(--fw-medium);
  font-size: clamp(22px, 2.8vw, 32px);
  line-height: 1.1;
  color: var(--purple);
}

/* ---------- Boutons ---------- */
@property --cta-r { syntax: '<length-percentage>'; inherits: false; initial-value: 0%; }

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 7px 7px 7px 26px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: var(--fw-medium);
  font-size: 16px;
  cursor: pointer;
  transition: color var(--dur-base) ease;
}
.btn--block { width: 100%; }
.btn--spread { justify-content: space-between; }
.btn__disc {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.35s ease;
}
.btn__disc svg { transition: transform var(--dur-base) var(--ease-out); }
.btn:hover .btn__disc svg { transform: rotate(45deg); }

/* Rempli rose -> se remplit de violet au survol */
.btn--pink {
  color: var(--purple);
  background: radial-gradient(circle at calc(100% - 30px) 50%, var(--purple) 0 var(--cta-r, 0%), var(--pink) var(--cta-r, 0%));
  transition: --cta-r 0.6s var(--ease-out), color 0.35s ease;
}
.btn--pink .btn__disc { background: var(--white); }
.btn--pink:hover { --cta-r: 150%; color: var(--on-dark); }

/* Rempli violet -> se remplit de rose au survol */
.btn--purple {
  color: var(--on-dark);
  background: radial-gradient(circle at calc(100% - 30px) 50%, var(--pink) 0 var(--cta-r, 0%), var(--purple) var(--cta-r, 0%));
  transition: --cta-r 0.6s var(--ease-out), color 0.35s ease;
}
.btn--purple .btn__disc { background: var(--pink); }
.btn--purple:hover { --cta-r: 150%; color: var(--purple); }
.btn--purple:hover .btn__disc { background: var(--white); }

/* Lien texte (action secondaire discrète) */
.text-link {
  display: inline-block;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent-ink);
  font: inherit;
  font-weight: var(--fw-medium);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-2);
  cursor: pointer;
  transition: color var(--dur-fast) ease, text-decoration-color var(--dur-fast) ease;
}
.text-link:hover { color: var(--purple); text-decoration-color: currentColor; }

@media (prefers-reduced-motion: reduce) {
  .btn--pink, .btn--purple { transition: none; }
}

/* ---------- Champs de formulaire ---------- */
.field { display: block; }
.field + .field { margin-top: var(--space-3); }
.field__label {
  display: block;
  font-weight: var(--fw-medium);
  font-size: 12.5px;
  color: var(--grey-700);
  margin-bottom: 6px;
}
.input, .textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--grey-100);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: var(--fw-light);
  color: var(--grey-900);
  background: var(--white);
  transition: border-color var(--dur-fast) ease;
}
.input:focus, .textarea:focus { border-color: var(--purple); outline: none; }
.textarea { resize: vertical; min-height: 88px; }
::placeholder { color: var(--grey-300); }
.form-error { font-size: 12.5px; color: var(--purple-600); margin-top: 6px; }
.field-hint { font-size: 12.5px; line-height: 1.4; color: var(--accent-ink); margin-top: 5px; }
/* Dans le volet contact (flex avec gap), on rapproche le message du champ. */
.lead__form .field-hint { margin-top: -4px; }
.form-note {
  font-size: 13px;
  font-weight: var(--fw-light);
  color: var(--text-soft);
  text-align: center;
  margin-top: var(--space-3);
  line-height: 1.45;
}

/* ---------- Confirmation d'envoi ---------- */
.confirm { text-align: center; }
.confirm__icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--pink);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
}
.confirm__title { font-weight: var(--fw-medium); font-size: 19px; color: var(--purple); margin-bottom: var(--space-2); }
.confirm__text { font-weight: var(--fw-light); font-size: 14px; line-height: 1.5; color: var(--text-soft); }
.confirm__email { font-weight: var(--fw-medium); font-size: 14.5px; color: var(--purple); word-break: break-all; }

/* ---------- Modales ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  padding: clamp(16px, 4vh, 40px) 20px;
  background: var(--scrim);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: overlay-in var(--dur-base) ease both;
}
.modal-overlay[hidden] { display: none; }
.modal-overlay--diag {
  z-index: 120;
  background: var(--scrim-diag);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 460px;
  margin: auto 0; /* centré si ça tient, sinon l'overlay scrolle (pas de scroll interne) */
}
.modal--diag { max-width: 620px; }
.modal--diag.is-result { max-width: 960px; }
.modal__card {
  --card-pad: clamp(24px, 4vw, 40px);
  position: relative;
  z-index: 2;
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: 100%;
  overflow: hidden; /* la carte grandit avec son contenu ; clippe les coins (barre de progression) */
  padding: var(--card-pad);
  box-shadow: var(--shadow-pop);
  animation: modal-in 0.3s var(--ease-out) both;
}
.modal__close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--purple);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--dur-fast) ease, transform var(--dur-base) var(--ease-out);
}
.modal__close:hover { background: var(--surface-soft); transform: rotate(90deg); }
.modal__close--corner { position: absolute; top: 16px; right: 16px; z-index: 3; }
