/* Front — charte We Are Watching v2, embarqué en IFRAME (effets DANS le bloc). */
:root {
  --orange: #fc4724;
  --orange-vivid: #ff451c;
  --orange-soft: #ed6c47;
  --night: #000c38;
  --paper: #0c1020;
  --surface: #11183a;
  --light: #91a6ff;
  --greyblue: #c4cade;
  --lemon: #ffdf18;
  --white: #ffffff;

  --ink: var(--white);
  --muted: var(--greyblue);
  --accent: var(--orange);
  --card: var(--surface);
  --field: #0c1430;
  --border: rgba(145, 166, 255, .16);

  /* 4 niveaux : rouge -> orange -> jaune -> vert */
  --c-faible: #fc4724;
  --c-moyen: #ff8c2f;
  --c-bon: #ffdf18;
  --c-excellent: #2ec27e;
  --c-na: #8b93ad;

  --radius: 16px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);   /* LP autonome : le fond vit sur la page */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--orange); color: #fff; }
code { background: rgba(145, 166, 255, .12); padding: 1px 6px; border-radius: 6px;
  font-family: ui-monospace, monospace; font-size: .9em; color: var(--light); }

/* Fond de page : halos + scan-line (déplacés du widget vers la page). */
.page-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(circle at 80% -2%, rgba(252, 71, 36, .16), transparent 42%),
    radial-gradient(circle at 0% 12%, rgba(20, 43, 124, .42), transparent 46%),
    radial-gradient(circle at 50% 108%, rgba(20, 43, 124, .4), transparent 55%),
    var(--paper);
}
/* Faisceau de scan GLOBAL (fond) — attaché au DOCUMENT (JS compense le scroll via --beam).
   Orange pur, cœur plus dense pour le contraste (PAS de cœur clair -> plus de bande grise). */
.scan-beam {
  position: fixed; left: 0; right: 0; top: 0; height: 480px; z-index: -1; pointer-events: none;
  transform: translate3d(0, calc(var(--beam, -120vh) - 240px), 0);
  background: linear-gradient(180deg,
    transparent 0%, rgba(252, 71, 36, .03) 30%, rgba(252, 71, 36, .20) 50%,
    rgba(252, 71, 36, .03) 70%, transparent 100%);
  will-change: transform;
}

main { max-width: 720px; margin: 0 auto; padding: 28px 14px 0; }

/* Bloc widget = surface claire qui FLOTTE sur le fond de page (dégradés retirés). */
.card {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 82% 4%, rgba(252, 71, 36, .10), transparent 46%),
    var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; margin-bottom: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.card-inner { position: relative; z-index: 1; }

/* Scan de SURFACE — synchronisé au faisceau de fond (même horloge), mais COULEUR
   distincte (périwinkle froid vs orange du fond) pour créer la profondeur.
   Position (--scan-pos) et intensité (--scan-lit) écrites par le pilote JS. */
.scan-surface { position: relative; }
.scan-surface::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 200px; z-index: 0; pointer-events: none;
  transform: translate3d(0, calc(var(--scan-pos, -100vh) - 100px), 0);
  opacity: var(--scan-band, 0);
  background: linear-gradient(180deg, transparent, rgba(145, 166, 255, .08), transparent);
  will-change: transform, opacity;
}
.scan-surface > * { position: relative; z-index: 1; }

/* Glow sur les REBORDS des blocs au passage du faisceau (doux, intensité réduite). */
.value-card.scan-surface, .authority.scan-surface {
  box-shadow:
    0 0 0 calc(var(--scan-glow, 0) * 1px) rgba(145, 166, 255, .32),
    0 0 calc(var(--scan-glow, 0) * 18px) rgba(145, 166, 255, calc(var(--scan-glow, 0) * .28));
}
.card.scan-surface {   /* widget : on garde l'ombre portée de base + le glow de rebord (réduit) */
  box-shadow:
    0 24px 60px rgba(0, 0, 0, .45),
    0 0 0 calc(var(--scan-glow, 0) * 1px) rgba(145, 166, 255, .32),
    0 0 calc(var(--scan-glow, 0) * 22px) rgba(145, 166, 255, calc(var(--scan-glow, 0) * .28));
}

/* CTA — glow piloté par --scan-glow : DÉCLENCHÉ au passage du faisceau, oscille ~2 s puis s'arrête (JS). */
.scan-cta {
  box-shadow:
    inset 0 0 calc(var(--scan-glow, 0) * 24px) rgba(255, 255, 255, .36),
    0 0 0 calc(var(--scan-glow, 0) * 3px) rgba(255, 255, 255, .5),
    0 0 calc(var(--scan-glow, 0) * 46px) rgba(252, 71, 36, .95),
    0 0 calc(var(--scan-glow, 0) * 92px) rgba(252, 71, 36, .5);
}
/* Au survol : glow figé à son MAX, constant (+ décalage vers le haut géré par button:hover). */
.scan-cta:hover {
  box-shadow:
    inset 0 0 24px rgba(255, 255, 255, .36),
    0 0 0 3px rgba(255, 255, 255, .5),
    0 0 46px rgba(252, 71, 36, .95),
    0 0 92px rgba(252, 71, 36, .5);
}
.card-inner.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
[hidden] { display: none !important; }

/* Logo dans le bloc (lockup We Are Watching × YouTube dans le MÊME encadré noir). */
.logo-box { background: #000; border: 1px solid rgba(252, 71, 36, .3); border-radius: 12px;
  padding: 10px 18px; box-shadow: 0 0 30px -10px rgba(252, 71, 36, .55);
  display: inline-flex; align-items: center; gap: 17px; }
.logo-box .brand-logo { height: 38px; width: auto; display: block; }
.lockup-x { color: var(--greyblue); font-weight: 800; font-size: 1.5rem; opacity: .5; line-height: 1; }
.logo-box .yt-mark { height: 25px; width: auto; display: block; }
.logo-box-sm { padding: 6px 11px; margin-bottom: 14px; }
.logo-box-sm .brand-logo { height: 22px; }

/* HERO (niveau page) */
.hero { text-align: center; display: flex; flex-direction: column; align-items: center;
  padding: 18px 4px 22px; }
.hero .logo-box { margin-bottom: 40px; }   /* large respiration entre le lockup et le kicker */
.hero h1 { font-size: 2.35rem; line-height: 1.1; max-width: 24ch; margin: 0 0 14px; }
.hero .lead { font-size: 1.04rem; max-width: 60ch; }
.widget-label { font-weight: 800; font-size: 1.5rem; color: var(--white);
  margin: 0 0 4px; letter-spacing: -.015em; line-height: 1.2; }
.widget-label .o { color: var(--orange); }

/* Kicker */
.kicker { display: inline-flex; align-items: center; gap: 9px; font-size: .72rem; font-weight: 800;
  letter-spacing: .24em; text-transform: uppercase; color: var(--orange); margin-bottom: 16px; }
.kicker::before { content: ""; width: 26px; height: 2px; background: var(--orange); }
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange);
  box-shadow: 0 0 0 0 rgba(252, 71, 36, .6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(252, 71, 36, .6); }
  70% { box-shadow: 0 0 0 12px rgba(252, 71, 36, 0); } 100% { box-shadow: 0 0 0 0 rgba(252, 71, 36, 0); } }

.yt-logo { color: var(--white); margin-bottom: 12px; }
h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 10px; color: var(--white); }
h1 .o { color: var(--orange); }
h2 { margin: 0; font-size: 1.25rem; font-weight: 800; color: var(--white); }
.lead { color: var(--muted); max-width: 48ch; margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; width: 100%; max-width: 420px; text-align: left; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .04em; color: var(--muted); min-width: 0; }
input[type=text], input[type=email] { width: 100%; padding: 13px 15px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--field); color: var(--ink); font-size: 1rem; font-family: inherit; font-weight: 500; }
input::placeholder { color: rgba(196, 202, 222, .45); }
input:focus { outline: 2px solid var(--orange); border-color: transparent; }
.consent { flex-direction: row; align-items: center; gap: 10px; font-weight: 500;
  text-transform: none; letter-spacing: 0; font-size: .88rem; }
.consent input { width: 18px; height: 18px; accent-color: var(--orange); }

button { cursor: pointer; border: none; border-radius: 11px; font-size: 1rem; font-weight: 800;
  font-family: inherit; padding: 15px 22px; background: var(--orange); color: #fff;
  transition: filter .15s, transform .15s; letter-spacing: .01em; }
button:hover { filter: brightness(1.08); transform: translateY(-1px); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); font-weight: 700;
  padding: 10px 16px; font-size: .9rem; }
.error { color: var(--orange); font-weight: 700; }

/* --- Résultats (compact) --- */
.result-head { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 4px; }
.avatar-wrap { width: 60px; height: 60px; flex: none; }
.channel-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--border); box-shadow: 0 6px 20px rgba(0, 0, 0, .5); display: block; }
.avatar-fallback { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 1.7rem; color: #fff; background: #FF0000;
  border: 3px solid var(--border); box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
#channel-title { text-align: left; font-size: 1.2rem; }
.result-head .muted { font-size: .85rem; }

.hero-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 6px 12px; margin: 8px 0 2px; }
.gauge-block { display: flex; flex-direction: column; align-items: center; flex: 1 1 250px; max-width: 320px; }
#gauge { width: 100%; max-width: 300px; }
.gauge-zone { fill: none; stroke-width: 16; }
.tick { fill: var(--muted); font-size: 12px; font-family: "Montserrat", sans-serif; font-weight: 800; }
.tick-mark { stroke: rgba(196, 202, 222, .35); stroke-width: 2; }
.needle { stroke: var(--white); stroke-width: 4; stroke-linecap: round; }
.needle-hub { fill: var(--white); }
.gauge-score { text-align: center; margin-top: -12px; }
#global-score { font-size: 3.1rem; font-weight: 800; color: var(--white); line-height: 1; }
.over { color: var(--muted); font-size: 1.1rem; font-weight: 700; }
.band-pill { display: inline-block; margin-top: 5px; padding: 4px 15px; border-radius: 22px;
  font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.band-faible { background: rgba(252, 71, 36, .18); color: var(--c-faible); }
.band-moyen { background: rgba(255, 140, 47, .18); color: var(--c-moyen); }
.band-bon { background: rgba(255, 223, 24, .18); color: var(--c-bon); }
.band-excellent { background: rgba(46, 194, 126, .2); color: var(--c-excellent); }
.band-non_mesurable { background: rgba(196, 202, 222, .12); color: var(--muted); }
.gauge-loading { margin-top: 7px; font-size: .82rem; font-weight: 700; color: var(--light);
  letter-spacing: .04em; }

#radar { flex: 1 1 250px; max-width: 320px; width: 100%; height: auto; }
.radar-ring { fill: none; stroke: rgba(196, 202, 222, .14); stroke-width: 1; }
.radar-spoke { stroke: rgba(196, 202, 222, .1); stroke-width: 1; }
#radar-shape { fill: rgba(252, 71, 36, .22); stroke: var(--orange); stroke-width: 2; stroke-linejoin: round; }
.radar-dot { fill: var(--orange); }
.radar-label { fill: var(--greyblue); font-size: 9px; font-weight: 700; font-family: "Montserrat", sans-serif; }

.global-summary { text-align: center; max-width: 52ch; margin: 2px auto 14px; color: var(--ink); font-size: .98rem; }

/* Tuiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
.tile { background: var(--field); border: 1px solid var(--border); border-radius: 14px;
  padding: 13px 11px 12px; text-align: center; }
.ring { width: 58px; height: 58px; display: block; margin: 0 auto 5px; }
.ring-bg { fill: none; stroke: rgba(196, 202, 222, .14); stroke-width: 5; }
.ring-fg { fill: none; stroke-width: 5; stroke-linecap: round; }
.ring-num { font-size: 17px; font-weight: 800; fill: var(--white); text-anchor: middle; font-family: "Montserrat", sans-serif; }
.tile-label { font-weight: 800; font-size: .9rem; color: var(--white); }
.tile-key { font-size: .82rem; font-weight: 800; margin-top: 3px; }
.tile-expl { font-size: .76rem; color: var(--muted); margin-top: 4px; line-height: 1.35; }

.text-faible { color: var(--c-faible); }
.text-moyen { color: var(--c-moyen); }
.text-bon { color: var(--c-bon); }
.text-excellent { color: var(--c-excellent); }
.text-non_mesurable { color: var(--muted); }

.pdf-block { margin-top: 26px; padding-top: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pdf-sep { width: 100%; height: 1px; background: var(--border); margin-bottom: 4px; transform-origin: right center; }
.pdf-block #pdf-btn { font-size: 1.05rem; padding: 16px 28px; }
/* Confirmation d'envoi : bien marquée (jaune, gras, souligné). */
.sent-msg { color: var(--lemon); font-weight: 800; text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 2px; }
.disclaimer { margin-top: 20px; padding: 13px 16px; background: rgba(0, 0, 0, .25);
  border: 1px solid var(--border); border-radius: 11px; font-size: .82rem; color: var(--muted); }

.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #fff;
  border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   LANDING PAGE — briques autour du widget
   ============================================================ */

/* Apparition au scroll (sans dépendance GSAP : IntersectionObserver -> .in) */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scan-beam { display: none; }
  .scan-surface::after { display: none; }
  .scan-cta { box-shadow: none; }
  .value-card.scan-surface, .authority.scan-surface { box-shadow: none; }
  .card.scan-surface { box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
}

.lp-section { margin: 46px 0; }
.section-title { font-size: 1.5rem; font-weight: 800; color: var(--white); text-align: center;
  margin: 0 0 22px; letter-spacing: -.01em; }

/* — Ce que vous obtenez — */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.value-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 18px; text-align: left; overflow: hidden; }
.value-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; color: var(--orange); background: rgba(252, 71, 36, .12);
  border: 1px solid rgba(252, 71, 36, .25); margin-bottom: 14px; }
.value-card h3 { font-size: 1.02rem; font-weight: 800; color: var(--white); margin: 0 0 7px; line-height: 1.25; }
.value-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }

/* Hiérarchie d'emphase HARMONISÉE :
   jaune (em) = le plus fort · bleu (.value-card em) = secondaire · gras blanc (strong) = termes clés. */
em { font-style: normal; color: var(--lemon); font-weight: 800; }
.value-card em { color: var(--light); }
strong { color: var(--white); font-weight: 800; }

/* — Propulsé par We Are Watching — */
.authority { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px 30px; position: relative; overflow: hidden; }
.authority::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--orange); }
.authority-text { margin: 0; text-align: center; color: var(--greyblue); font-size: 1.02rem; line-height: 1.6; }
.authority-text strong { color: var(--white); }

/* — Rétention / pont offre — */
.retention { text-align: center; padding: 18px 6px; }
.retention-body { max-width: 60ch; margin: 0 auto 22px; color: var(--muted); font-size: 1.02rem; line-height: 1.6; }
.retention-body strong { color: var(--white); }
.retention-punch { font-size: 2rem; font-weight: 800; line-height: 1.12; color: var(--white);
  letter-spacing: -.02em; margin: 0 0 22px; }
.retention-punch .o { color: var(--orange); }

/* — CTA « Parler à un expert » — */
.btn-expert { background: var(--orange); color: #fff; }
.btn-expert-lg { font-size: 1.05rem; padding: 16px 30px; }
.expert-cta-inline { display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 100%; padding: 10px 0 2px; }
.expert-cta-hint { margin: 0; color: var(--light); font-size: .88rem; font-weight: 700; }

/* — Footer — */
.lp-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px; margin: 40px 0 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-logo { height: 22px; width: auto; }
.footer-brand .muted { font-size: .82rem; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .82rem; font-weight: 700; }
.footer-links a:hover { color: var(--white); }

/* ============================================================
   MODALE — Parler à un expert
   ============================================================ */
.modal-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center;
  justify-content: center; padding: 20px; background: rgba(4, 6, 16, .72); backdrop-filter: blur(4px); }
.modal-card { position: relative; width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto;
  background:
    radial-gradient(circle at 88% -4%, rgba(252, 71, 36, .14), transparent 50%),
    var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.modal-close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; padding: 0;
  background: transparent; color: var(--muted); font-size: 1.6rem; line-height: 1; border-radius: 9px; }
.modal-close:hover { background: rgba(255, 255, 255, .06); color: var(--white); transform: none; }
#expert-modal-title { font-size: 1.3rem; margin: 0 4px 4px 0; }
.recaptcha-note { font-size: .72rem; text-align: center; margin: 8px 0 0; opacity: .7; }
.recaptcha-note a { color: inherit; text-decoration: underline; }
.modal-sub { margin: 0 0 4px; font-size: .9rem; }
#expert-form { max-width: none; }
.field-row { display: flex; gap: 12px; }
.field-row label { flex: 1 1 0; min-width: 0; }
#expert-form textarea { width: 100%; padding: 12px 15px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--field); color: var(--ink); font-size: 1rem; font-family: inherit; font-weight: 500;
  resize: vertical; min-height: 64px; }
#expert-form textarea::placeholder { color: rgba(196, 202, 222, .45); }
#expert-form textarea:focus, input[type=tel]:focus { outline: 2px solid var(--orange); border-color: transparent; }
input[type=tel] { width: 100%; padding: 13px 15px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--field); color: var(--ink); font-size: 1rem; font-family: inherit; font-weight: 500; }
.opt { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
#expert-status:not([hidden]) { display: block; }
.modal-ok { color: var(--c-excellent); font-weight: 700; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 620px) {
  .hero h1 { font-size: 1.85rem; }
  .value-grid { grid-template-columns: 1fr; }
  .retention-punch { font-size: 1.6rem; }
  .lp-footer { flex-direction: column; align-items: flex-start; }
  /* Modale en feuille plein écran (bottom-sheet) sur mobile */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-card { max-width: 100%; max-height: 94vh; border-radius: 20px 20px 0 0; }
  .field-row { flex-direction: column; gap: 14px; }
}
