/* CFT-2214 et CFT-2221 : la page d'achat Castflow Pro et le pop-up Pro du hub.
 *
 * Un seul fichier pour les deux surfaces : le pop-up est charge par /fr/castings/ et /en/castings/,
 * la page d'achat par /fr/castflow-pro/ et /en/castflow-pro/. Les mots ne sont PAS ici : les
 * phrases de la page viennent de server/pro.js (FR et EN, une seule source) et celles du pop-up de
 * assets/js/pro-popup.js. Ce fichier ne dessine que ce qu'elles disent.
 *
 * Les couleurs sont celles du site : le teal #007692 de refonte.css, l'encre #111114 de
 * styles.css, le fond #f5f6f7. La couronne est un trait, comme le cadenas de la carte
 * (castings.css) : elle prend la couleur du fond sur lequel elle est posee.
 */

/* ── La couronne ─────────────────────────────────────────────────────────────
   Posee dans la rangee du haut de la carte, a droite du tag. Sa place est reservee par
   .cfk__tag (max-width: calc(100% - 70px)), donc elle ne pousse jamais le tag hors de la carte. */
.cfpro-couronne{display:inline-flex; align-items:center; gap:5px; margin-left:auto; flex:none;
  height:calc(28px * var(--k)); padding:0 calc(9px * var(--k));
  border-radius:999px; background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.45);
  color:#fff; font-size:calc(11px * var(--k)); font-weight:700; letter-spacing:.05em; text-transform:uppercase}
.cfpro-couronne svg{width:calc(15px * var(--k)); height:calc(15px * var(--k)); display:block}
.cfpro-couronne__mot{white-space:nowrap}
/* Dans la rangee du haut d'une carte, la place a droite du tag est courte : la couronne reste
   un signe, et son titre (`title`) dit « Castflow Pro ». Le titre de la carte dit deja que le
   casting est reserve a Pro. */
.cfpro-couronne--carte{padding:0 calc(7px * var(--k))}
.cfpro-couronne--carte .cfpro-couronne__mot{display:none}
/* Une carte verrouillee n'a pas d'identite (pas de titre, pas de projet) : la couronne prend la
   place de l'autocollant, sinon les deux se chevauchent. */
.cfk--verrou .cfk__sticker{display:none}
/* Le pop-up : la couronne est petite et sans mot. */
.cfpro-couronne--tri{margin-left:6px; height:auto; padding:0; background:none; border:0; color:var(--cfh-teal, #007692)}
.cfpro-couronne--tri svg{width:15px; height:15px}
@media (max-width:520px){ .cfpro-couronne__mot{display:none} }

/* CFT-2221 : une carte verrouillee se reconnait au premier coup d'oeil. Le contenu est deja
   different (l'app n'envoie que les faits), le bord et le fond le disent aussi. */
.cfk--verrou .cfk__haut{background:linear-gradient(180deg, #4a5b66, #2b3a43)}
.cfk--verrou{border:1px solid rgba(255,255,255,.35)}
.cfk-item--verrou{position:relative}

/* Un abonne ne voit AUCUNE couronne (criteres du ticket). L'attribut est pose par
   assets/js/pro-level.js des que l'app a repondu. */
html[data-pro-level="pro"] .cfpro-couronne{display:none !important}

/* ── Le pop-up ──────────────────────────────────────────────────────────────── */
html.cfpro-ouvert{overflow:hidden}
.cfpro-pop{position:fixed; inset:0; z-index:120; display:flex; align-items:center; justify-content:center; padding:20px}
.cfpro-pop[hidden]{display:none}
.cfpro-pop__fond{position:absolute; inset:0; background:rgba(9,20,26,.55); backdrop-filter:blur(2px)}
.cfpro-pop__boite{position:relative; width:min(520px, 100%); max-height:min(88vh, 720px); overflow:auto;
  background:#fff; color:#111114; border-radius:22px; padding:30px 28px 26px;
  box-shadow:0 30px 80px rgba(0,0,0,.35);
  font-family:Geist, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif}
.cfpro-pop__x{position:absolute; top:14px; right:14px; width:34px; height:34px; display:grid; place-items:center;
  border:0; border-radius:999px; background:#f0f2f3; color:#111114; cursor:pointer}
.cfpro-pop__x:hover{background:#e3e7e9}
.cfpro-pop__x svg{width:15px; height:15px}
.cfpro-pop__eb{margin:0 0 6px; font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:#007692}
.cfpro-pop__titre{margin:0 0 14px; font-family:Unbounded, Geist, sans-serif; font-weight:800; font-size:26px; line-height:1.08; letter-spacing:-.02em}
.cfpro-pop__st{margin:0 0 8px; font-size:13px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:#6b747c}
.cfpro-pop__liste{margin:0 0 18px; padding:0; list-style:none}
.cfpro-pop__liste li{position:relative; padding-left:24px; margin:7px 0; font-size:16px; line-height:1.4; color:#3f4750}
.cfpro-pop__liste li::before{content:""; position:absolute; left:4px; top:.55em; width:9px; height:9px; border-radius:999px; background:#007692}
.cfpro-pop__prix{margin:0; font-size:18px; font-weight:700}
.cfpro-pop__prix--attente{font-weight:500; font-size:15px; color:#6b747c}
.cfpro-pop__fondateurs{margin:10px 0 0; padding:12px 14px; border-radius:12px; background:#eef6f8; color:#134e5c;
  font-size:15px; font-weight:600; line-height:1.4}
.cfpro-pop__cta{display:inline-flex; align-items:center; gap:10px; margin-top:20px; padding:14px 22px;
  border-radius:999px; background:#007692; color:#fff; font-size:16px; font-weight:700; text-decoration:none}
.cfpro-pop__cta:hover{background:#00667f}
.cfpro-pop__rond{display:grid; place-items:center; width:22px; height:22px; border-radius:999px; background:rgba(255,255,255,.22)}
.cfpro-pop__rond svg{width:13px; height:13px}
.cfpro-pop__note{margin:12px 0 0; font-size:13px; color:#6b747c}

/* ── La page d'achat ─────────────────────────────────────────────────────────
   Une page seule, comme /connexion/ : pas la barre du site, le logo ramene a l'accueil. */
.pro{--pro-teal:#007692; --pro-encre:#111114; --pro-gris:#6b747c; --pro-corps:#3f4750;
  margin:0; min-height:100dvh; background:#fbf9f6; color:var(--pro-encre);
  font-family:Geist, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing:antialiased}
.pro *{box-sizing:border-box}
.pro__lien-retour{display:inline-flex; align-items:center; gap:8px; margin:0 0 24px; font-size:14px; font-weight:600; color:var(--pro-gris); text-decoration:none}
.pro__lien-retour:hover{color:var(--pro-encre)}
.pro__entete{padding:22px 24px 0; max-width:1080px; margin:0 auto}
.pro__logo{display:block; width:150px}
.pro__logo img{display:block; width:100%; height:auto}
.pro__hero{padding:44px 24px 10px; max-width:1080px; margin:0 auto}
.pro__eb{margin:0 0 10px; font-size:13px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--pro-teal)}
.pro__h1{margin:0; max-width:820px; font-family:Unbounded, Geist, sans-serif; font-size:clamp(30px, 5vw, 52px); font-weight:800; line-height:1.04; letter-spacing:-.03em}
.pro__intro{margin:18px 0 0; max-width:720px; font-size:18px; line-height:1.5; color:var(--pro-corps)}
.pro__corps{padding:26px 24px 64px; max-width:1080px; margin:0 auto}
.pro__debloque{display:grid; gap:10px; margin:0; padding:0; list-style:none; max-width:760px}
.pro__debloque li{position:relative; padding-left:26px; font-size:16px; line-height:1.45; color:var(--pro-corps)}
.pro__debloque li::before{content:""; position:absolute; left:4px; top:.55em; width:10px; height:10px; border-radius:999px; background:var(--pro-teal)}
.pro__titre-section{margin:40px 0 14px; font-size:20px; font-weight:700; letter-spacing:-.01em}
.pro__plans{display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:16px; max-width:820px}
.pro__plan{border:1px solid #dfe3e6; border-radius:20px; background:#fff; padding:22px; display:flex; flex-direction:column; gap:8px}
.pro__plan--annuel{border:2px solid var(--pro-teal); box-shadow:0 14px 34px -20px rgba(0,113,146,.55)}
.pro__plan-tete{display:flex; align-items:center; justify-content:space-between; gap:10px}
.pro__plan-nom{font-size:13px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--pro-gris)}
.pro__plan-prix{margin:0; font-size:30px; font-weight:800; letter-spacing:-.02em}
.pro__plan-note{margin:0; font-size:14px; line-height:1.4; color:var(--pro-gris)}
.pro__fondateurs{margin:22px 0 0; max-width:820px; padding:20px 22px; border-radius:20px;
  background:linear-gradient(135deg, #007692, #134e5c); color:#fff}
.pro__fondateurs-titre{margin:0 0 6px; font-size:13px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:rgba(255,255,255,.8)}
.pro__fondateurs-ligne{margin:0; font-size:22px; font-weight:800; letter-spacing:-.01em}
.pro__compteur{margin:14px 0 0; display:flex; align-items:baseline; gap:10px}
.pro__compteur-n{font-family:Unbounded, Geist, sans-serif; font-size:34px; font-weight:800; line-height:1}
.pro__compteur-t{font-size:15px; color:rgba(255,255,255,.85)}
.pro__fondateurs-regles{margin:10px 0 0; font-size:14px; line-height:1.45; color:rgba(255,255,255,.85)}
.pro__actions{display:flex; flex-wrap:wrap; gap:12px; margin:26px 0 0}
.pro__achat{display:inline-flex; align-items:center; gap:10px; padding:15px 24px; border:0; border-radius:999px;
  background:var(--pro-encre); color:#fff; font:inherit; font-size:16px; font-weight:700; cursor:pointer; text-decoration:none}
.pro__achat--annuel{background:var(--pro-teal)}
.pro__achat:hover{filter:brightness(1.08)}
.pro__achat:focus-visible{outline:3px solid var(--pro-teal); outline-offset:3px}
.pro__message{margin:16px 0 0; padding:14px 16px; border-radius:12px; background:#fff4e5; border:1px solid #f0c894; color:#6b4a12; font-size:15px; font-weight:600}
.pro__message[hidden]{display:none}
.pro__deja{margin:0 0 14px; font-size:14px; font-weight:600; color:var(--pro-teal)}
.pro__deja[hidden]{display:none}
.pro__petites{margin:22px 0 0; display:grid; gap:6px; font-size:14px; line-height:1.45; color:var(--pro-gris)}
.pro__petites p{margin:0}
.pro__lien-retour--bas{display:inline-block; margin-top:22px}
.pro__indispo{margin:22px 0 0; max-width:760px; padding:16px 18px; border-radius:14px; background:#fff4e5; border:1px solid #f0c894; color:#6b4a12; font-size:15px; line-height:1.45}
.pro__indispo[hidden]{display:none}
.pro__attente{opacity:.55}
/* Sans JavaScript, la page reste lisible : la phrase d'attente est dans le HTML, et elle
   explique d'ou vient le prix. Avec JavaScript, /api/pro/offer a rempli les deux prix : la
   phrase n'a plus rien a dire. */
html.pro-js .pro__attente-js{display:none}
