/* ==========================================================================
   Simulateur de podcast (adwen.fr/simulateur-podcast/)
   Chargée après style.css sur : la page du simulateur, la page « déjà simulé »,
   et les pages servies par n8n (écran d’attente, erreur, page expirée ou introuvable).
   ========================================================================== */

/* ---------- Page d’opt-in (maquette C, validée le 19/11/2026) ---------- */
.optin { position: relative; padding-block: clamp(40px, 6vw, 88px); background: transparent; overflow: clip; min-height: calc(100vh - 160px); }
.optin__corps { position: relative; z-index: 1; }
.optin h1 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.04; letter-spacing: -0.04em; }
.optin h1 .accent, .simu-message h1 .accent { font-style: italic; color: var(--indigo); } /* comme le titre de l’accueil clair */
.optin__sous { max-width: 600px; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; color: var(--texte-doux); }
.optin__preuve { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-family: var(--police-mono); font-size: 12px; letter-spacing: 0.05em; color: var(--texte-attenue); }
.optin__preuve i { width: 8px; height: 8px; border-radius: 999px; background: var(--signal); }
.optin__preuve b { color: var(--filet-fort); font-weight: 400; }
.surtitre--vert { color: var(--signal); }
.etiquette-etape { font-family: var(--police-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--indigo-clair); }
.mini { font-size: 12px; line-height: 1.5; color: var(--texte-attenue); }
.mini a { color: var(--indigo-clair); }

.simu-c { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.simu-c__texte { display: flex; flex-direction: column; gap: 24px; }
.simu-c__texte > .alerte { max-width: 640px; }

.simu-etape1 { display: flex; flex-direction: column; gap: 12px; }
.simu-etape1__ligne { display: flex; gap: 10px; max-width: 560px; }
.simu-etape1__ligne input { flex: 1; min-width: 0; padding: 15px 16px; border: 1px solid var(--filet-fort); border-radius: var(--rayon-bouton); background: var(--surface); color: var(--papier); font: inherit; font-size: 16px; }
.simu-etape1__ligne input:focus { border-color: var(--indigo-clair); outline: none; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); }
.simu-etape1__ligne .bouton { flex-shrink: 0; border: 0; font-family: inherit; cursor: pointer; }

.carte-form { display: flex; flex-direction: column; gap: 18px; max-width: 640px; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--filet); border-radius: var(--rayon-carte); background: var(--surface); box-shadow: var(--ombre); outline: none; }
.carte-form__titre { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.carte-form__intro { margin-top: -8px; font-size: 14px; line-height: 1.5; color: var(--texte-attenue); }
.carte-form .simu-form__grille { gap: 14px 16px; }
.carte-form .champ { gap: 6px; }
.carte-form .champ__libelle { font-size: 14px; }
.carte-form .champ input { padding: 11px 14px; font-size: 15px; background: var(--encre); }
.carte-form .accord { font-size: 13.5px; line-height: 1.45; }
.carte-form .simu-form__envoi { align-self: stretch; justify-content: center; }

/* Avec le script : l’étape 2 n’apparaît qu’une fois le site indiqué */
.simu-c--etapes .simu-etape2 { display: none; }
.simu-c--etape2 .simu-etape2 { display: flex; }
.simu-c--etape2 .simu-etape1,
.simu-c--etape2 .simu-c__etape1-seule { display: none; }

.pochette-vraie { width: min(100%, 440px); justify-self: center; margin: 0; }
.pochette-vraie img { display: block; width: 100%; height: auto; border-radius: var(--rayon-carte); box-shadow: var(--ombre); }

@media (max-width: 899px) {
  .simu-c { grid-template-columns: minmax(0, 1fr); }
  .pochette-vraie { width: min(100%, 300px); order: -1; }
}
@media (max-width: 599px) {
  .simu-etape1__ligne { flex-direction: column; }
  .pochette-vraie { display: none; }
}

/* ---------- Formulaire ---------- */
.simu-form { display: flex; flex-direction: column; gap: 24px; }
.simu-form__grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; }
.champ { display: flex; flex-direction: column; gap: 8px; }
.champ--large { grid-column: 1 / -1; }
.champ__libelle { font-size: 16px; font-weight: 500; color: var(--papier); }
.champ__aide { font-size: 14px; line-height: 1.45; color: var(--texte-attenue); }
.champ input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--filet-fort);
  border-radius: var(--rayon-bouton);
  background: var(--surface);
  color: var(--papier);
  font: inherit;
  font-size: 16px;
}
.champ input:focus { border-color: var(--indigo-clair); outline: none; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); }

.accord { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; line-height: 1.5; color: var(--texte-doux); cursor: pointer; }
.case { flex-shrink: 0; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--indigo); cursor: pointer; }
.simu-form__rgpd { margin-top: -12px; line-height: 1.6; }
.simu-form__rgpd a { color: var(--indigo-clair); }
.simu-form__envoi { align-self: flex-start; border: 0; font-family: inherit; cursor: pointer; }
.simu-form__envoi[disabled] { opacity: 0.7; cursor: wait; }

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

.alerte {
  padding: 14px 18px;
  border: 1px solid var(--indigo-clair);
  border-radius: var(--rayon-bouton);
  background: var(--indigo-doux);
  color: var(--papier);
}

@media (max-width: 599px) {
  .simu-form__grille { grid-template-columns: minmax(0, 1fr); }
  .simu-form__envoi { align-self: stretch; }
}

/* ---------- Pages de message (déjà simulé, erreur, expirée, introuvable) ---------- */
.simu-message,
.attente {
  position: relative;
  min-height: 62vh;
  padding-block: clamp(56px, 8vw, 112px);
  background: transparent;
  overflow: clip;
}
.simu-message__corps,
.attente__corps { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.simu-message__corps > *,
.attente__corps > * { max-width: 760px; }
.simu-message h1,
.attente h1 { font-size: clamp(32px, 4vw, 52px); line-height: 1.08; letter-spacing: -0.035em; }

/* ---------- Écran d’attente ---------- */
.attente__onde { display: flex; align-items: center; gap: 8px; height: 72px; }
.attente__onde span:not(.attente__point) {
  width: 8px;
  height: var(--h);
  border-radius: 999px;
  background: var(--indigo-trait);
  animation: pulsation 1.6s ease-in-out infinite;
}
.attente__onde span:nth-child(2n) { animation-delay: -0.5s; }
.attente__onde span:nth-child(3n) { animation-delay: -1s; }
.attente__onde span:nth-child(4),
.attente__onde span:nth-child(6) { background: var(--indigo-clair); }
.attente__point { width: 14px; height: 14px; margin-left: 6px; border-radius: 999px; background: var(--signal); }

.attente__barre { width: 100%; max-width: 560px; height: 6px; border-radius: 999px; background: var(--surface-haute); overflow: hidden; }
.attente__barre span { display: block; width: var(--avance, 4%); height: 100%; border-radius: 999px; background: var(--indigo-clair); transition: width 0.8s ease; }

.attente__etapes { display: flex; flex-direction: column; gap: 12px; }
.attente__etapes li { position: relative; padding-left: 32px; font-size: 17px; line-height: 1.45; color: var(--texte-attenue); }
.attente__etapes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--filet-fort);
  border-radius: 999px;
}
/* Avec le script : les étapes apparaissent une à une, cochées une fois passées */
.attente--anime .attente__etapes li { display: none; }
.attente--anime .attente__etapes li.est-visible { display: block; color: var(--papier); }
.attente__etapes li.est-faite { color: var(--texte-doux); }
.attente__etapes li.est-faite::before { border-color: var(--indigo-clair); background: var(--indigo-clair); }
.attente__etapes li.est-faite::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 5px;
  height: 9px;
  border: solid var(--encre);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.attente__long { padding: 14px 18px; border: 1px solid var(--filet-fort); border-radius: var(--rayon-bouton); background: var(--surface); color: var(--texte-doux); }

@media (prefers-reduced-motion: reduce) {
  .attente__onde span { animation: none !important; }
  .attente__barre span { transition: none; }
}

/* ---------- Page de résultat en thème clair (servie par n8n, 19/11/2026) ----------
   La page reprend concept.css ; ces règles l’adaptent au fond clair du site. */
.barre-promo { background: rgba(255, 255, 255, 0.94); border-top-color: var(--filet); box-shadow: 0 -8px 30px rgba(40, 36, 120, 0.08); }
@keyframes promo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.35); transform: scale(1); }
  50%      { box-shadow: 0 0 0 10px rgba(79, 70, 229, 0); transform: scale(1.04); }
}
/* clair.css a une classe .case (cartes de l’accueil) qui déforme les cases à cocher .case :
   on la neutralise pour les cases (formulaire, épisodes, invités). */
input.case { grid-column: auto; display: inline-block; min-height: 0; padding: 0; overflow: visible; border: 0; border-radius: 0; background: none; gap: 0; }

/* Photo LinkedIn détourée sur la pochette (19/11/2026), mise en page inspirée de la pochette
   « Retour sur écoute » : le dirigeant à droite, coupé par les bords droit et bas du carré (aucune
   coupure visible), le nom du podcast en grand à gauche, « Avec … » en bas à gauche. */
.pochette__photo--detouree {
  inset: auto -16% 0 auto;
  width: 84%;
  height: 84%;
  object-fit: contain;
  object-position: right bottom;
  /* seul le côté gauche, à l'intérieur du carré, se fond dans la couleur de la pochette */
  -webkit-mask-image: linear-gradient(to right, transparent 2%, #000 34%);
  mask-image: linear-gradient(to right, transparent 2%, #000 34%);
}
.pochette__carre--photo:has(.pochette__photo--detouree) { justify-content: flex-start; }
.pochette__carre--photo:has(.pochette__photo--detouree) .pochette__nom {
  position: relative; z-index: 1;
  max-width: 50%;
  /* en haut du carré, au-dessus du visage (demande de Vanessa du 19/11/2026) */
  margin-block: 0 auto;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.pochette__carre--photo:has(.pochette__photo--detouree) .pochette__animation {
  position: relative; z-index: 1;
  max-width: 52%;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

/* Bandeau « ébauche » en haut de la page de résultat (19/11/2026) : la page est un premier jet
   automatique, le vrai concept se construit pendant l'appel. */
.simu-ebauche {
  margin: 0;
  padding: 12px var(--marge);
  background: var(--indigo-doux);
  border-bottom: 1px solid var(--indigo-trait);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  color: var(--papier);
}
.simu-ebauche strong { color: var(--indigo-clair); font-weight: 700; }

/* Preuve à deux chiffres (épisodes, écoutes), le 95 % est dans le titre */
.chiffres--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .chiffres--2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 599px) {
  .pochette__carre--photo:has(.pochette__photo--detouree) .pochette__nom { font-size: 26px; }
  .pochette__carre--photo:has(.pochette__photo--detouree) .pochette__animation { font-size: 12px; }
}

/* Mention « Ébauche non contractuelle » sous la pochette (19/11/2026), plus visible qu'une simple légende */
.simu-ebauche-pochette {
  width: min(100%, 420px);
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid var(--indigo-trait);
  border-radius: 12px;
  background: var(--indigo-doux);
  font-size: 14px;
  line-height: 1.45;
  color: var(--papier);
}
.simu-ebauche-pochette strong { color: var(--indigo-clair); font-weight: 700; }

/* Pochette « à la Retour sur écoute » (demande de Vanessa du 20/11/2026) : fond tiré de la bannière
   LinkedIn du dirigeant (déjà flouté par le serveur), titre en blanc avec le dernier mot dans la
   couleur d'accent, « avec Prénom Nom » en bas à gauche. Sans bannière : dégradé de la couleur du podcast. */
.pochette--v2 {
  isolation: isolate;
  background: radial-gradient(120% 90% at 20% 0%, color-mix(in srgb, var(--fond) 70%, #fff 12%) 0%, var(--fond) 55%, color-mix(in srgb, var(--fond) 70%, #000) 100%);
}
.pochette--v2 .pochette__fond {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: brightness(1.05) saturate(1.15);
}
.pochette--v2::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(10, 12, 32, 0.6) 0%, rgba(10, 12, 32, 0.3) 48%, rgba(10, 12, 32, 0) 75%),
    linear-gradient(to top, rgba(10, 12, 32, 0.7) 0%, rgba(10, 12, 32, 0) 35%);
}
.pochette--v2 .pochette__photo--detouree {
  z-index: 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 22%);
  mask-image: linear-gradient(to right, transparent 0%, #000 22%);
}
.pochette--v2 .pochette__nom { color: #fff; }
.pochette--v2 .pochette__accent { font-style: normal; color: var(--accent); }
.pochette--v2 .pochette__animation { color: #fff; opacity: 0.95; }
