/* ==========================================================================
   VIRTUAL EDITOR — CSS CLEAN PRO
   ========================================================================== */

/* 01. Variables */
:root {
  --bg: #050812;
  --bg-deep: #020510;
  --panel: rgba(11, 20, 38, 0.86);
  --line: #20324f;
  --line-strong: #385987;
  --text: #f7fbff;
  --muted: #a7b6cf;
  --soft: #dbeafe;
  --blue: #1f5cff;
  --blue-light: #2f73ff;
  --green: #32d583;
  --shadow-large: 0 40px 120px rgba(0, 0, 0, 0.52);
  --shadow-soft: 0 24px 70px rgba(0, 0, 0, 0.30);
  --container: 1180px;
  --top-space: 42px;
  --section-space: 88px;
}

/* 02. Base */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-deep), #071126 46%, var(--bg));
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, Arial, sans-serif;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

/* 03. Background */
.background-glow {
  position: fixed;
  inset: -22% -8% auto auto;
  z-index: -2;
  width: 920px;
  height: 920px;
  pointer-events: none;
  opacity: 0.52;
  filter: blur(48px);
  background: radial-gradient(circle, #0f3fb8 0%, rgba(15, 63, 184, 0.33) 22%, transparent 64%);
}

/* 04. Header */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 50;
  width: min(var(--container), calc(100% - 32px));
  margin: 16px auto 0;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 28px;
  border: 1px solid rgba(112, 139, 190, 0.22);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(9, 17, 34, 0.88), rgba(5, 10, 22, 0.66));
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 820;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  gap: 30px;
  margin: auto;
}

.main-nav a,
.login-button {
  color: #eef4ff;
  text-decoration: none;
  font: inherit;
  font-size: 15px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.main-nav a[aria-current="page"] {
  color: #fff;
  font-weight: 760;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-button {
  display: none;
  border: 0;
  background: transparent;
}

.menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px;
  background: #fff;
}

/*
 * Header desktop stable : les zones gauche et droite gardent la même largeur.
 * Le chargement asynchrone du compteur ne peut donc plus déplacer la navigation.
 */
@media (min-width: 981px) {
  .site-header {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    display: grid;
  }

  .brand {
    justify-self: start;
  }

  .main-nav {
    justify-self: center;
    margin: 0;
    white-space: nowrap;
  }

  .main-nav a {
    white-space: nowrap;
  }

  .header-actions {
    justify-self: end;
    white-space: nowrap;
  }
}

/* 05. Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 830;
  border-radius: 18px;
  padding: 15px 24px;
  border: 1px solid transparent;
  transition: 0.22s ease;
  cursor: pointer;
}

.button-primary {
  background: linear-gradient(135deg, #164fd8, #3329d4);
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.30);
}

.button-secondary {
  border-color: #3d5f90;
  background: rgba(7, 16, 33, 0.60);
}

.button-small {
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
}

.button-full {
  width: 100%;
}

.button:hover,
.content-card:hover,
.feature-chip:hover,
.process-card:hover,
.price-card:hover,
.faq-item:hover {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 1px rgba(47, 115, 255, 0.22), 0 0 34px rgba(31, 92, 255, 0.20);
  transform: translateY(-1px);
}

.button-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* 06. Layout */
.section {
  width: min(var(--container), calc(100% - 36px));
  margin-inline: auto;
  padding-block: var(--section-space);
}

.page-hero {
  padding-top: var(--top-space);
  padding-bottom: 54px;
}

.hero {
  min-height: 760px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: 56px;
  padding-top: var(--top-space);
  padding-bottom: 70px;
}

.compact-section {
  padding-top: 0;
}

.centered {
  text-align: center;
}

.centered .section-lead,
.page-hero .section-lead {
  margin-inline: auto;
}

/* 07. Typography */
.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(820px, 100%);
  min-height: 28px;
  padding: 4px 14px;
  color: #a7d8ff;
  border: 1px solid #214681;
  border-radius: 999px;
  background: #10234b;
  font-size: 12px;
  font-weight: 880;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.label-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  color: #c7d8ff;
  border: 1px solid #31548a;
  border-radius: 999px;
  background: rgba(7, 18, 37, 0.80);
  font-size: 14px;
}

.label-pill span {
  color: #a7d8ff;
  background: #10234b;
  border: 1px solid #214681;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 880;
}

.hero h1,
.page-title {
  margin: 24px 0 20px;
  font-size: clamp(52px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.025em;
}

.hero h1 span,
.hero h1 em {
  display: block;
}

.hero h1 em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(135deg, #2b71ff, #1740c8);
  -webkit-background-clip: text;
  background-clip: text;
}

.section-title {
  margin: 18px 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
}

.lead,
.section-lead {
  max-width: 690px;
  color: #d6e1f3;
  font-size: 19px;
  line-height: 1.72;
}

/* 08. Hero */
.hero-checks {
  list-style: none;
  display: grid;
  gap: 12px;
  color: #dce9ff;
  padding: 0;
  margin: 26px 0;
}

.hero-checks li::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 10px;
  vertical-align: -3px;
  border-radius: 5px;
  background: radial-gradient(circle, #6ee7ff, #164fd8);
}

.hero-preview {
  position: relative;
}

.hero-preview::before {
  content: "";
  position: absolute;
  inset: -105px -125px;
  z-index: -1;
  opacity: 0.68;
  border-radius: 50%;
  filter: blur(12px);
  background: radial-gradient(circle, #123ea8 0%, #0b266e 28%, transparent 62%);
}

.editor-card {
  overflow: hidden;
  border: 1px solid rgba(90, 118, 172, 0.47);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(11, 20, 40, 0.91), rgba(7, 11, 21, 0.94));
  box-shadow: var(--shadow-large);
}

.editor-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  color: #dbeafe;
  border-bottom: 1px solid #253653;
}

.editor-card-top img {
  width: 26px;
  height: 26px;
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #475569;
}

.preview-media {
  position: relative;
}

.preview-media img {
  display: block;
  width: 100%;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 86px;
  height: 86px;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 26px;
  border: 1px solid rgba(219, 234, 254, 0.35);
  border-radius: 50%;
  background: rgba(8, 15, 30, 0.72);
  cursor: pointer;
}

/* 09. Metrics */
.metrics {
  width: min(1100px, calc(100% - 36px));
  margin: -35px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid #233657;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(11, 20, 38, 0.87), rgba(8, 16, 33, 0.80));
  box-shadow: var(--shadow-large);
}

.metric {
  padding: 27px 20px;
  text-align: center;
  border-right: 1px solid #20304d;
}

.metric:last-child {
  border-right: 0;
}

.metric img {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: contain;
  margin: 0 auto 13px;
}

.metric strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
}

.metric span {
  color: var(--muted);
  line-height: 1.42;
}

/* 10. Cards */
.cards-grid {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.three-columns {
  grid-template-columns: repeat(3, 1fr);
}

.content-card,
.feature-chip,
.process-card,
.content-panel,
.price-card,
.faq-item,
.app-shell {
  border: 1px solid #243958;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(11, 20, 38, 0.76), rgba(8, 16, 33, 0.68));
  box-shadow: var(--shadow-soft);
}

.content-card {
  padding: 26px;
  text-align: left;
}

.card-index,
.process-number {
  color: #79a7ff;
  font-weight: 900;
}

.content-card p,
.feature-chip p,
.process-card p,
.content-panel p,
.price-card p,
.faq-item p {
  color: var(--muted);
  line-height: 1.65;
}

/* 11. Feature sections */
.split-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 34px;
}

.feature-list {
  display: grid;
  gap: 14px;
}

.feature-chip {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.feature-chip img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.feature-chip-link {
  color: inherit;
  text-decoration: none;
}

.feature-chip-link h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.feature-arrow {
  color: var(--blue-light);
  font-size: 24px;
  transition: transform 0.2s ease;
}

.feature-chip-link:hover .feature-arrow {
  transform: translateX(5px);
}

.extension-product-icon,
.history-product-icon,
.apple-feature-mark {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid #315b9d;
  border-radius: 15px;
  background: linear-gradient(145deg, #102a5f, #071326);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.extension-product-icon img {
  width: 38px;
  height: 38px;
}

.virtual-editor-app-icon {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  margin-left: -5px;
  border-radius: 17px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(0, 22, 74, 0.38);
}

.virtual-editor-feature-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #263248;
  border-radius: 15px;
  background: #020611;
  box-shadow: 0 12px 28px rgba(0, 22, 74, 0.38);
}

.feature-chip .virtual-editor-feature-icon img {
  width: 43px;
  height: auto;
  object-fit: contain;
}

.extension-cta .virtual-editor-app-icon {
  width: 58px;
  height: 58px;
  margin-left: 0;
  border-radius: 15px;
}

.extension-product-icon i {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 2px solid #091225;
  border-radius: 50%;
  background: var(--blue-light);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.history-product-icon {
  color: #82b2ff;
  font-size: 35px;
  font-weight: 500;
}

.apple-feature-mark {
  color: #fff;
  border-color: #3b4658;
  background: linear-gradient(145deg, #242934, #0b0d12);
  font-size: 36px;
}

.app-store-chip {
  border-color: #35445c;
}

/* 11b. Extension Final Cut Pro */
.extension-hero {
  min-height: 760px;
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  align-items: center;
  gap: 48px;
  padding-top: 58px;
}

.extension-hero h1 {
  margin: 24px 0 20px;
  font-size: clamp(48px, 5.6vw, 76px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.extension-hero h1 em {
  color: transparent;
  background: linear-gradient(135deg, #77b4ff, #275fff 62%, #5948ff);
  -webkit-background-clip: text;
  background-clip: text;
  font-style: normal;
}

.extension-hero-centered {
  min-height: 590px;
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
  padding-bottom: 28px;
  text-align: center;
}

.extension-hero-centered .button-row {
  justify-content: center;
}

.extension-availability {
  color: var(--muted);
  font-size: 13px;
}

.extension-showcase {
  display: grid;
  gap: 38px;
  padding-top: 12px;
}

.extension-showcase-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(125, 157, 211, 0.44);
  border-radius: 26px;
  background: #080c14;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.5);
}

.extension-showcase-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1846 / 852;
  object-fit: cover;
}

.extension-showcase-frame figcaption {
  display: grid;
  gap: 5px;
  align-items: center;
  padding: 20px 24px 22px;
}

.extension-showcase-frame figcaption strong {
  color: #fff;
  font-size: 18px;
}

.extension-showcase-frame figcaption small {
  color: var(--muted);
  font-size: 14px;
}

.app-store-button {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  gap: 11px;
  padding: 8px 18px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 14px;
  background: #050505;
  text-decoration: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
  transition: 0.2s ease;
}

.app-store-button:hover {
  border-color: #fff;
  transform: translateY(-1px);
}

.app-store-button small,
.app-store-button span span {
  display: block;
}

.app-store-button small {
  margin-bottom: 1px;
  font-size: 10px;
  font-weight: 560;
}

.app-store-button > span:last-child {
  font-size: 19px;
  font-weight: 720;
  line-height: 1.05;
}

.apple-mark {
  font-size: 34px;
  line-height: 1;
}

.real-fcp-stage {
  position: relative;
  min-height: 660px;
  display: grid;
  align-items: end;
  padding: 36px 0 28px;
}

.real-fcp-stage::before {
  content: "";
  position: absolute;
  inset: 0 -10%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 84, 226, 0.42), transparent 65%);
  filter: blur(18px);
}

.real-fcp-window,
.real-extension-window {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(125, 157, 211, 0.42);
  background: #070a10;
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.56);
}

.real-fcp-window {
  position: absolute;
  right: 0;
  bottom: 36px;
  width: 94%;
  padding: 32px 0 0;
  border-radius: 24px;
}

.real-fcp-window::before {
  content: "Final Cut Pro";
  position: absolute;
  top: 10px;
  left: 50%;
  color: #acb5c3;
  font-size: 11px;
  font-weight: 700;
  transform: translateX(-50%);
}

.real-fcp-window > img {
  display: block;
  width: 100%;
}

.real-extension-window {
  position: relative;
  z-index: 2;
  width: min(420px, 66%);
  max-height: 600px;
  justify-self: start;
  border-radius: 18px;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(47, 115, 255, 0.20);
}

.real-extension-window > img {
  display: block;
  width: 100%;
}

.real-fcp-window figcaption,
.real-extension-window figcaption {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: 9px;
  padding: 5px 8px;
  color: #d5deeb;
  border-radius: 7px;
  background: rgba(2, 5, 10, 0.76);
  font-size: 9px;
  backdrop-filter: blur(8px);
}

.fcp-stage {
  position: relative;
  padding: 28px 0;
}

.fcp-stage::before {
  content: "";
  position: absolute;
  inset: -12% -8%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 84, 226, 0.44), transparent 64%);
  filter: blur(18px);
}

.fcp-window {
  overflow: hidden;
  border: 1px solid rgba(125, 157, 211, 0.42);
  border-radius: 25px;
  background: #090d14;
  box-shadow: 0 42px 110px rgba(0, 0, 0, 0.58);
}

.fcp-toolbar {
  min-height: 42px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 14px;
  color: #c9d2df;
  border-bottom: 1px solid #242b35;
  background: #191d24;
  font-size: 12px;
  font-weight: 700;
}

.fcp-toolbar-status {
  justify-self: end;
  color: #6f8099;
  font-weight: 600;
}

.fcp-workspace {
  min-height: 430px;
  display: grid;
  grid-template-columns: 0.44fr 1fr;
}

.fcp-browser {
  padding: 16px;
  border-right: 1px solid #242b35;
  background: #10141b;
}

.fcp-browser > strong {
  color: #d6dde8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fcp-media-tile {
  margin-top: 14px;
}

.fcp-media-tile span {
  display: block;
  aspect-ratio: 16 / 9;
  border: 1px solid #365a9b;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(47, 115, 255, 0.28), transparent 55%),
    linear-gradient(180deg, #283953, #111b2c);
}

.fcp-media-tile small {
  display: block;
  margin-top: 5px;
  color: #b5c0d0;
  font-size: 9px;
}

.fcp-media-tile.muted {
  opacity: 0.48;
}

.extension-panel {
  padding: 22px;
  background: linear-gradient(180deg, #070a10, #05070c);
}

.extension-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
}

.extension-brand img {
  width: 28px;
}

.extension-ready {
  display: inline-flex;
  padding: 5px 9px;
  color: #7dffb4;
  border-radius: 999px;
  background: rgba(50, 213, 131, 0.11);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.extension-panel h2 {
  margin: 11px 0 14px;
  font-size: 21px;
}

.extension-source {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #222c3c;
  border-radius: 10px;
  background: #0f141d;
}

.extension-source img {
  width: 34px;
}

.extension-source span,
.extension-source small {
  display: block;
}

.extension-source small,
.extension-panel > small {
  color: #8d9aab;
}

.extension-panel label {
  margin: 15px 0 6px;
  color: #dce5f2;
  font-size: 10px;
}

.extension-prompt {
  min-height: 66px;
  padding: 10px;
  color: #bfc9d7;
  border: 1px solid #27354a;
  border-radius: 9px;
  background: #111721;
  font-size: 10px;
  line-height: 1.45;
}

.extension-submit {
  margin-top: 12px;
  padding: 11px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4289ff, #284ce5);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.extension-progress {
  height: 5px;
  margin: 14px 0 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #1d2632;
}

.extension-progress span {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2863f0, #66a7ff);
}

.fcp-timeline {
  position: relative;
  height: 94px;
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 21px 22px;
  border-top: 1px solid #242b35;
  background: #12161d;
}

.fcp-timeline .clip {
  position: static;
  height: 43px;
  border-radius: 5px;
}

.clip-a { width: 22%; background: #315fc4; }
.clip-b { width: 27%; background: #246d9f; }
.clip-c { width: 18%; background: #315fc4; }
.clip-d { width: 29%; background: #1c7d74; }

.timeline-cursor {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 52%;
  width: 2px;
  background: #fff;
}

.extension-proof {
  width: min(1100px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid #243958;
  border-radius: 24px;
  background: rgba(8, 16, 33, 0.78);
  box-shadow: var(--shadow-soft);
}

.extension-proof div {
  padding: 25px;
}

.extension-proof div + div {
  border-left: 1px solid #243958;
}

.extension-proof strong,
.extension-proof span {
  display: block;
}

.extension-proof strong {
  margin-bottom: 7px;
  color: #7da9ff;
  font-size: 17px;
}

.extension-proof span {
  color: var(--muted);
  line-height: 1.5;
}

.extension-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.extension-cta {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 26px;
  margin-bottom: 82px;
  padding: 34px;
  border: 1px solid #315b9d;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(18, 52, 119, 0.78), rgba(9, 20, 45, 0.86));
  box-shadow: 0 30px 90px rgba(7, 33, 91, 0.42);
}

.extension-cta > img {
  width: 82px;
}

.extension-cta .eyebrow {
  min-width: 0;
}

.extension-cta h2 {
  margin: 12px 0 6px;
  font-size: clamp(30px, 4vw, 46px);
}

.extension-cta p {
  margin: 0;
  color: var(--muted);
}

.extension-cta-compact {
  grid-template-columns: 62px 1fr auto;
  max-width: 980px;
  padding: 24px 28px;
}

.extension-cta-compact > img {
  width: 58px;
}

.extension-cta-compact h2 {
  margin-top: 0;
  font-size: clamp(25px, 3vw, 36px);
}

@media (max-width: 980px) {
  .extension-hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .extension-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .extension-cta {
    grid-template-columns: 70px 1fr;
  }

  .extension-cta .app-store-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .real-fcp-stage {
    min-height: 610px;
  }
}

@media (max-width: 640px) {
  .extension-hero h1 {
    font-size: 44px;
  }

  .fcp-workspace {
    grid-template-columns: 0.36fr 1fr;
  }

  .fcp-browser {
    padding: 10px;
  }

  .extension-panel {
    padding: 14px;
  }

  .real-fcp-stage {
    min-height: 520px;
  }

  .real-fcp-window {
    width: 100%;
  }

  .real-extension-window {
    width: 72%;
  }

  .extension-proof,
  .extension-steps {
    grid-template-columns: 1fr;
  }

  .extension-proof div + div {
    border-top: 1px solid #243958;
    border-left: 0;
  }

  .extension-cta {
    grid-template-columns: 1fr;
  }
}

/* 12. Process */
.process {
  display: grid;
  gap: 18px;
}

.process-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 22px;
  padding: 26px;
}

.process-number {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #214ccf, #2635c9);
  color: #fff;
  font-size: 28px;
}

.content-panel {
  padding: 34px;
}

/* 13. Pricing */
.pricing-page-hero {
  padding-bottom: 38px;
}

.pricing-hero-title {
  max-width: 1120px;
  margin-inline: auto;
  font-size: clamp(42px, 5.4vw, 70px);
  line-height: 1.04;
}

.pricing-hero-title span,
.pricing-hero-note {
  color: var(--blue-light);
}

.pricing-hero-title span {
  display: block;
}

.pricing-hero-lead {
  max-width: 760px;
  margin-bottom: 12px;
}

.pricing-hero-note {
  margin: 0;
  font-weight: 800;
  line-height: 1.5;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding-bottom: 48px;
}

.price-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 34px 28px;
  text-align: center;
}

.price-featured {
  border-color: var(--blue-light);
  box-shadow: 0 0 44px rgba(31, 92, 255, 0.20);
}

.price-card strong {
  display: block;
  margin: 22px 0 18px;
  font-size: 67px;
}

.price-card .price-duration-label {
  display: block;
  margin: 4px 0 22px;
  color: var(--soft);
  font-size: 17px;
}

.price-duration {
  padding-top: 18px;
  color: var(--blue-light);
  border-top: 1px solid var(--line);
  font-size: clamp(38px, 4vw, 50px);
  font-weight: 900;
  line-height: 1;
}

.price-popular-badge {
  position: absolute;
  top: 0;
  left: 50%;
  display: inline-flex;
  width: max-content;
  max-width: calc(100% - 34px);
  margin: 0;
  padding: 8px 18px;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), #3435e8);
  font-size: 12px;
  font-weight: 880;
  letter-spacing: 0.03em;
  transform: translate(-50%, -50%);
}

.price-card small {
  display: block;
  min-height: 18px;
  margin: -10px 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.price-card .button {
  width: 100%;
  margin-top: auto;
}

.pricing-feedback {
  width: min(780px, calc(100% - 36px));
  min-height: 24px;
  margin: -54px auto 80px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.pricing-feedback.is-error {
  color: #ffb4c4;
}

.pricing-included {
  padding-bottom: 80px;
}

.pricing-included-title {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 0 auto -15px;
  padding: 7px 18px;
  color: #a7d8ff;
  border: 1px solid #214681;
  border-radius: 999px;
  background: #10234b;
  font-size: 12px;
  font-weight: 880;
  letter-spacing: 0.09em;
  text-align: center;
}

.pricing-included-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  overflow: hidden;
  padding: 34px 12px 20px;
  border: 1px solid #243958;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(11, 20, 38, 0.76), rgba(8, 16, 33, 0.68));
  box-shadow: var(--shadow-soft);
}

.pricing-included-item {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 18px;
  text-align: center;
}

.pricing-included-item + .pricing-included-item {
  border-left: 1px solid var(--line);
}

.pricing-included-item svg {
  width: 52px;
  height: 52px;
  color: var(--blue-light);
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pricing-included-item span {
  color: var(--soft);
  line-height: 1.45;
}

/* 14. FAQ */
.faq-list {
  display: grid;
  gap: 14px;
  max-width: 840px;
  padding-bottom: 80px;
}

.faq-item {
  padding: 22px 26px;
}

.faq-item summary {
  cursor: pointer;
  font-size: 20px;
  font-weight: 850;
}

/* 15. App */
.app-shell {
  width: min(860px, calc(100% - 36px));
  margin: 0 auto 80px;
  padding: 30px;
}

.drop-zone {
  min-height: 190px;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  border: 2px dashed rgba(91, 142, 255, 0.52);
  border-radius: 22px;
  background: rgba(3, 8, 18, 0.30);
}

.drop-zone input {
  display: none;
}

.drop-zone strong {
  font-size: 28px;
}

.drop-zone span {
  margin-top: 8px;
  color: var(--muted);
}

.app-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 26px 0;
}

.wide-field {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-weight: 740;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 15px;
  color: #fff;
  border: 1px solid #28466f;
  border-radius: 14px;
  background: #071021;
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.progress-panel,
.result-panel {
  display: none;
  margin-top: 28px;
  padding: 28px;
  border: 1px solid #243958;
  border-radius: 24px;
  background: rgba(5, 12, 24, 0.72);
}

.progress-panel.show,
.result-panel.show {
  display: block;
}

.runner-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.runner-header h2 {
  margin: 0;
  font-size: 30px;
}

.runner-header p {
  color: var(--muted);
}

.runner-header strong {
  font-size: 40px;
}

.runner-bar,
.upload-animation {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.runner-bar {
  margin: 22px 0 30px;
}

.runner-bar span,
.upload-animation span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #123a96, #2b67ff);
}

.runner-bar span {
  width: 0%;
  transition: width 0.5s ease;
}

.upload-animation span {
  width: 78%;
  animation: uploadPulse 2.6s ease-in-out infinite;
}

@keyframes uploadPulse {
  0% { width: 8%; }
  55% { width: 82%; }
  100% { width: 100%; }
}

.runner-steps {
  display: grid;
  gap: 22px;
}

.runner-step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 18px;
}

.step-dot {
  width: 28px;
  height: 28px;
  margin-top: 6px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(91, 142, 255, 0.16);
}

.step-dot::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #4d7cff;
}

.runner-step.done .step-dot {
  background: rgba(50, 213, 131, 0.18);
}

.runner-step.done .step-dot::after {
  background: var(--green);
}

.runner-step h3 {
  margin: 0 0 4px;
  font-size: 26px;
}

.runner-step p {
  margin: 0 0 18px;
  color: var(--muted);
}

/* 16. Mini timelines */
.timeline-mini {
  position: relative;
  width: 100%;
  min-height: 165px;
  overflow: hidden;
  border: 1px solid rgba(75, 125, 220, 0.28);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(9, 20, 39, 0.94), rgba(3, 9, 20, 0.98));
}

.mini-track {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  height: 76px;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(3, 8, 18, 0.28);
}

.mini-clips,
.mini-wave {
  position: absolute;
  left: 0;
  display: flex;
}

.mini-clips {
  top: 8px;
  width: 2544px;
  height: 28px;
  gap: 10px;
}

.derush-mini .mini-clips {
  animation: miniClipScroll 7.2s linear infinite;
}

.derush-mini .mini-wave {
  animation: miniWaveScroll 7.2s linear infinite;
}

@keyframes miniClipScroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-848px, 0, 0); }
}

@keyframes miniWaveScroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-900px, 0, 0); }
}

.clip {
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid rgba(120, 170, 255, 0.30);
  border-radius: 7px;
  overflow: hidden;
}

.clip.s { width: 86px; }
.clip.m { width: 132px; }
.clip.l { width: 170px; }
.clip.dark { background: linear-gradient(180deg, #153b84, #0e2d6d); }
.clip.mid { background: linear-gradient(180deg, #1d55d4, #123a9e); }
.clip.light { background: linear-gradient(180deg, #1e7cb8, #135c91); }
.clip.green { background: linear-gradient(180deg, #15947d, #0e6c65); }

.mini-wave {
  top: 40px;
  width: 2700px;
  height: 36px;
  align-items: center;
  gap: 4px;
}

.editor-mini .mini-wave {
  width: 100%;
  justify-content: space-between;
  gap: 0;
}

.mini-wave span {
  width: 1px;
  flex: 0 0 1px;
  border-radius: 99px;
  opacity: 0.95;
  background: linear-gradient(180deg, #70b6ff, #1844be);
}

.mini-wave span:nth-child(12n) { height: 38px; }
.mini-wave span:nth-child(12n+1) { height: 18px; }
.mini-wave span:nth-child(12n+2) { height: 30px; }
.mini-wave span:nth-child(12n+3) { height: 22px; }
.mini-wave span:nth-child(12n+4) { height: 35px; }
.mini-wave span:nth-child(12n+5) { height: 14px; }
.mini-wave span:nth-child(12n+6) { height: 27px; }
.mini-wave span:nth-child(12n+7) { height: 40px; }
.mini-wave span:nth-child(12n+8) { height: 20px; }
.mini-wave span:nth-child(12n+9) { height: 32px; }
.mini-wave span:nth-child(12n+10) { height: 13px; }
.mini-wave span:nth-child(12n+11) { height: 25px; }

.mini-playhead {
  position: absolute;
  left: 50%;
  top: 42px;
  bottom: 0;
  z-index: 10;
  width: 3px;
  border-radius: 10px;
  background: #fff;
}

.mini-playhead::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #fff;
}

/* 17. Editor animation */
.editor-rail {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 70px;
}

.eclip {
  position: absolute;
  top: 0;
  height: 26px;
  border: 1px solid rgba(120, 170, 255, 0.30);
  border-radius: 7px;
  overflow: hidden;
}

.eclip.one {
  left: 0%;
  width: 22%;
  background: linear-gradient(180deg, #1d55d4, #123a9e);
  animation: eclipOne 6.4s ease-in-out infinite;
}

.eclip.two {
  left: 24%;
  width: 30%;
  background: linear-gradient(180deg, #1e7cb8, #135c91);
  animation: eclipTwo 6.4s ease-in-out infinite;
}

.eclip.three {
  left: 56%;
  width: 20%;
  background: linear-gradient(180deg, #153b84, #0e2d6d);
  animation: eclipThree 6.4s ease-in-out infinite;
}

.eclip.four {
  left: 78%;
  width: 22%;
  background: linear-gradient(180deg, #15947d, #0e6c65);
  animation: eclipFour 6.4s ease-in-out infinite;
}

@keyframes eclipOne {
  0%, 16% { left: 0%; }
  34%, 72% { left: 54%; }
  90%, 100% { left: 0%; }
}

@keyframes eclipTwo {
  0%, 16% { left: 24%; }
  34%, 72% { left: 0%; }
  90%, 100% { left: 24%; }
}

@keyframes eclipThree {
  0%, 16% { left: 56%; }
  34%, 72% { left: 32%; }
  90%, 100% { left: 56%; }
}

@keyframes eclipFour {
  0%, 100% { left: 78%; }
}

.cursor {
  position: absolute;
  top: 18px;
  left: calc(11% - 8px);
  z-index: 20;
  width: 34px;
  height: 38px;
  pointer-events: none;
  animation: cursorMove 6.4s ease-in-out infinite;
}

.cursor svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes cursorMove {
  0%, 16% { left: calc(11% - 8px); }
  34%, 72% { left: calc(65% - 8px); }
  90%, 100% { left: calc(11% - 8px); }
}

/* 18. Footer */
.site-footer {
  width: min(var(--container), calc(100% - 36px));
  margin: 60px auto 34px;
  padding-top: 24px;
  color: var(--muted);
  border-top: 1px solid rgba(112, 139, 190, 0.20);
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer-brand,
.footer-contact,
.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-contact {
  flex-wrap: wrap;
}

.footer-brand img {
  width: 38px;
  height: 38px;
}

.footer-brand strong {
  display: block;
  color: #fff;
}

.footer-brand span,
.footer-bottom {
  color: var(--muted);
  font-size: 13px;
}

.footer-contact a {
  text-decoration: none;
}

.social-links a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  text-decoration: none;
  border: 1px solid #31476b;
  border-radius: 50%;
}

/* 19. Modals */
.modal,
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.68);
}

.modal.show,
.video-modal.show {
  display: grid;
}

.modal-card,
.video-dialog {
  position: relative;
  width: min(520px, 100%);
  border: 1px solid #2e466a;
  border-radius: 28px;
  background: #071021;
  box-shadow: var(--shadow-large);
}

.modal-card {
  padding: 32px;
}

.modal-logo {
  width: 56px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  color: #fff;
  border: 0;
  background: transparent;
  font-size: 32px;
  cursor: pointer;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form .button {
  margin-top: 4px;
}

.auth-feedback {
  min-height: 20px;
  margin: 0;
  color: #ffb4c4;
  font-size: 14px;
  line-height: 1.4;
}

.video-dialog {
  width: min(980px, 94vw);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.video-dialog iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* 20. Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }

/* 21. Responsive */
@media (max-width: 980px) {
  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero-preview::before {
    left: -18px;
    right: -18px;
  }

  .metrics,
  .three-columns,
  .pricing-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pricing-included-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pricing-included-item:nth-child(4) {
    border-left: 0;
  }

  .pricing-included-item:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .main-nav {
    display: none;
  }

  .main-nav.open {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(112, 139, 190, 0.22);
    border-radius: 20px;
    background: #071021;
  }

  .menu-button {
    display: block;
  }
}

#purchasesList {
  display: grid;
  gap: 10px;
}

.payment-result-card {
  margin-top: 80px;
  text-align: center;
}

.payment-result-card h1 {
  margin: 18px 0 12px;
}

.payment-result-card > p {
  max-width: 700px;
  margin: 0 auto 28px;
  color: var(--muted);
  line-height: 1.6;
}

.payment-result-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  max-width: 620px;
  margin: 0 auto 28px;
  padding: 20px;
  text-align: left;
  border: 1px solid rgba(91, 142, 255, 0.22);
  border-radius: 18px;
  background: rgba(3, 8, 18, 0.30);
}

.payment-result-details dt {
  color: var(--muted);
}

.payment-result-details dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.payment-result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  :root {
    --top-space: 30px;
    --section-space: 64px;
  }

  .header-actions {
    display: none;
  }

  .metrics,
  .three-columns,
  .pricing-grid,
  .app-controls {
    grid-template-columns: 1fr;
  }

  .pricing-hero-title {
    font-size: clamp(38px, 11vw, 54px);
  }

  .pricing-grid {
    gap: 28px;
  }

  .pricing-included-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pricing-included-item:nth-child(odd) {
    border-left: 0;
  }

  .pricing-included-item:nth-child(4) {
    border-left: 1px solid var(--line);
  }

  .pricing-included-item:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .process-card {
    grid-template-columns: 1fr;
  }

  .footer-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .payment-result-details {
    grid-template-columns: 1fr;
  }

  .payment-result-details dd {
    margin-bottom: 8px;
    text-align: left;
  }
}

@media (max-width: 460px) {
  .pricing-included-grid {
    grid-template-columns: 1fr;
  }

  .pricing-included-item + .pricing-included-item,
  .pricing-included-item:nth-child(4) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}


/* ==========================================================================
   22. Ajustements V30 — corrections après refactor propre
   ========================================================================== */

/* Présentation pointe vers index.html : plus de saut d’ancre qui mange la pilule. */
#presentation {
  scroll-margin-top: 0;
}

/* Le hero n’a plus la pilule Nouveau, départ propre sous le header. */
.hero {
  padding-top: 52px;
}

/* Interligne corrigé : “plus.” ne colle plus à “Tu diriges.” */
.hero h1 {
  line-height: 1.08;
}

.hero h1 span {
  margin-bottom: 6px;
}

/* Pilule déplacée dans la section Pensé Mac. */
.label-pill-inline {
  margin-bottom: 16px;
}

/* Bloc usages plus large et plus propre. */
.content-panel-centered {
  width: min(1180px, calc(100vw - 72px));
  margin-inline: auto;
  text-align: left;
}

.content-panel-centered .eyebrow {
  width: 100%;
  min-width: 0;
  margin-bottom: 26px;
}

/* Logos VE : ratio conservé, plus d'étirement. */
.brand img,
.footer-brand img,
.modal-logo {
  width: auto;
  object-fit: contain;
}

.brand img {
  height: 34px;
}

.footer-brand img {
  height: 38px;
}

.modal-logo {
  height: 56px;
}

/* Footer : contact prioritaire, liens légaux discrets + vrais pictos SVG. */
.footer-contact > a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 520;
}

.footer-contact > a[href="contact.html"],
.footer-contact > .footer-contact-primary {
  color: #fff;
  font-size: 16px;
  font-weight: 760;
}

.social-links a img {
  width: 18px;
  height: 18px;
}

@media (max-width: 720px) {
  .hero {
    padding-top: 42px;
  }

  .content-panel-centered {
    width: min(1180px, calc(100vw - 36px));
  }
}

/* ==========================================================================
   20. VIRTUAL EDITOR APP — V1.7 scoped fixes
   Toutes ces règles sont limitées à la page app pour ne plus casser l'index.
   ========================================================================== */
.generator-app {
  width: min(1080px, calc(100% - 36px));
  margin-top: 54px;
  padding: clamp(28px, 4vw, 46px);
}

.generator-head {
  margin-bottom: 30px;
}

.generator-title {
  margin: 12px 0 18px;
  max-width: 100%;
  font-size: clamp(42px, 5.2vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  white-space: normal;
}

.generator-intro {
  max-width: 920px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
}

.generator-form {
  display: grid;
  gap: 24px;
}

.ve-toast {
  display: none;
  margin: 0 0 18px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid transparent;
  color: #fff;
  font-weight: 760;
  line-height: 1.45;
}

.ve-toast.show { display: block; }
.ve-toast.error { border-color: rgba(239, 71, 111, 0.66); background: rgba(239, 71, 111, 0.15); }
.ve-toast.warning { border-color: rgba(255, 183, 3, 0.66); background: rgba(255, 183, 3, 0.13); }
.ve-toast.success { border-color: rgba(50, 213, 131, 0.66); background: rgba(50, 213, 131, 0.13); }

/* Notification globale créée uniquement sur les pages publiques qui ne
   possèdent pas déjà la zone de message du monteur. */
body > .ve-toast {
  position: fixed;
  z-index: 1200;
  top: 92px;
  right: 24px;
  width: min(420px, calc(100% - 48px));
  margin: 0;
  background: rgba(10, 18, 34, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.ve-drop-zone {
  width: 100%;
  min-height: 178px;
  padding: 34px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  text-align: center;
  cursor: pointer;
  color: var(--text);
  border: 2px dashed rgba(91, 142, 255, 0.58);
  border-radius: 22px;
  background: rgba(3, 8, 18, 0.30);
  transition: border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.ve-drop-zone:hover,
.ve-drop-zone.drag-over {
  border-color: rgba(136, 174, 255, 0.92);
  background: rgba(31, 92, 255, 0.09);
  transform: translateY(-1px);
}

.ve-drop-zone strong {
  display: block;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.05;
  font-weight: 920;
}

.ve-drop-zone span {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
}

.ve-file-info {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border-radius: 16px;
  border: 1px solid rgba(91, 142, 255, 0.32);
  background: rgba(255, 255, 255, 0.04);
  color: #e8f0ff;
  font-weight: 830;
}

.ve-file-info.show { display: flex; }
.ve-mass-files { border: 1px solid rgba(148,163,184,.22); border-radius: 16px; background: rgba(15,23,42,.55); overflow: hidden; }
.ve-mass-files > button { width: 100%; display:flex; justify-content:space-between; padding:16px 18px; border:0; color:inherit; background:transparent; cursor:pointer; }
.ve-mass-files.is-collapsed #massFileList { display:none; }
.ve-mass-row { display:grid; grid-template-columns:minmax(0,1fr) auto 52px 34px; align-items:center; gap:12px; padding:12px 18px; border-top:1px solid rgba(148,163,184,.14); }
.ve-mass-existing-row { position:relative; margin:8px 12px; padding:11px 13px 14px; border:0; border-radius:11px; background:rgba(8,18,34,.72); overflow:hidden; cursor:pointer; }
.ve-mass-existing-row::after { content:""; position:absolute; left:0; right:0; bottom:0; height:3px; background:linear-gradient(90deg,#2f73ff,#32d583); }
.ve-mass-existing-row input { width:17px; height:17px; accent-color:#2f73ff; cursor:pointer; }
.ve-mass-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ve-mass-row small { color:var(--muted); }
.ve-mass-row small::before, .mass-asset-state::before { display:inline-grid; place-items:center; width:18px; height:18px; margin-right:7px; border-radius:50%; font-size:12px; font-weight:900; vertical-align:-3px; content:""; }
[data-status-kind="ready"] small::before, [data-status-kind="ready"] .mass-asset-state::before { content:"✓"; color:#052419; background:#32d583; }
[data-status-kind="active"] small::before, [data-status-kind="active"] .mass-asset-state::before { border:2px solid rgba(110,163,255,.28); border-top-color:#6ea3ff; animation:ve-mass-spin .8s linear infinite; box-sizing:border-box; }
[data-status-kind="waiting"] small::before, [data-status-kind="waiting"] .mass-asset-state::before { content:"·"; color:#9dc2ff; background:rgba(110,163,255,.18); }
[data-status-kind="failed"] small::before, [data-status-kind="failed"] .mass-asset-state::before { content:"×"; color:#fff; background:#e5484d; }
[data-status-kind="retry"] small::before, [data-status-kind="retry"] .mass-asset-state::before { content:"!"; color:#071021; background:#ffb454; }
.ve-mass-percent { text-align:right; font-variant-numeric:tabular-nums; }
.ve-mass-retry { width:30px; height:30px; padding:0; border:1px solid rgba(110,163,255,.5); border-radius:50%; color:#dbe9ff; background:rgba(34,83,164,.22); font-size:20px; line-height:1; cursor:pointer; }
.ve-mass-retry:hover { border-color:#6ea3ff; background:rgba(47,115,255,.3); }
.ve-mass-retry:disabled { opacity:.45; cursor:wait; }
.ve-mass-remove { width:28px; height:28px; border:1px solid rgba(148,163,184,.26); border-radius:50%; color:#cbd5e1; background:rgba(15,23,42,.55); font-size:20px; line-height:1; cursor:pointer; }
.ve-mass-remove:hover { color:#fff; border-color:rgba(239,71,111,.65); background:rgba(239,71,111,.14); }
.ve-file-info small { color: var(--muted); font-size: 14px; font-weight: 740; }

.reuse-source-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(91, 142, 255, 0.34);
  border-radius: 20px;
  background: rgba(5, 15, 32, 0.72);
}

.reuse-source-card[hidden] { display: none; }

.reuse-only-intro { display: none; }
.reuse-requested .reuse-normal-intro { display: none; }
.reuse-requested .reuse-only-intro { display: block; }
.reuse-requested #dropZone,
.reuse-requested #fileInfo { display: none !important; }
.reuse-requested .runner-step[data-step="upload"],
.reuse-requested .runner-step[data-step="derush"] { display: none !important; }

.reuse-source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.reuse-source-head > div { display: grid; gap: 5px; min-width: 0; }
.reuse-source-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.reuse-source-label { color: #79a8ff; font-size: 13px; font-weight: 850; text-transform: uppercase; letter-spacing: 0.08em; }
.reuse-source-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; }
.reuse-previous-report.editor-report { margin: 0; }
.reuse-previous-report[hidden] { display: none; }

.ve-duration-block {
  display: grid;
  justify-items: center;
  gap: 16px;
  margin: 4px 0 8px;
}
.ve-duration-block[hidden] { display:none; }

.ve-duration-block h2 {
  margin: 0;
  color: #eaf1ff;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
}

.ve-duration-picker {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}

.ve-duration-field {
  width: 190px;
  height: 82px;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 18px;
  color: #fff;
  border: 1px solid rgba(91, 142, 255, 0.46);
  border-radius: 22px;
  background: rgba(3, 8, 18, 0.42);
}

.ve-duration-field input {
  width: 82px;
  min-width: 82px;
  height: 54px;
  padding: 0 6px;
  color: #fff;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: center;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1;
  font-weight: 920;
  appearance: auto;
}

.ve-duration-field span {
  color: var(--muted);
  font-size: clamp(20px, 2.8vw, 28px);
  font-weight: 860;
}

.ve-prompt-label {
  margin-top: 8px;
  color: #eaf1ff;
  text-align: center;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
  font-weight: 900;
}

.generator-app textarea {
  min-height: 136px;
  border-radius: 18px;
}

.generator-app #fakeRun {
  min-height: 60px;
  font-size: clamp(18px, 2vw, 21px);
  font-weight: 900;
}

/* Le bleu signale les contrôles actifs ; l’orange reste réservé aux alertes. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid #2f73ff;
  outline-offset: 3px;
}

:where(input, select, textarea):focus {
  border-color: #2f73ff;
  outline: none;
  box-shadow: 0 0 0 4px rgba(47, 115, 255, 0.22);
}

.mass-project-name-input:focus {
  border-color: #2f73ff;
  box-shadow: 0 0 0 4px rgba(47, 115, 255, 0.22);
}

.ve-progress-panel {
  overflow: hidden;
  padding: clamp(24px, 3vw, 34px);
}

.ve-runner-header {
  align-items: flex-start;
}

.ve-runner-header h2 {
  margin: 0;
  font-size: clamp(28px, 3.3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.ve-runner-header p {
  margin: 10px 0 0;
  font-size: 18px;
  line-height: 1.35;
}

.ve-runner-header strong {
  font-size: clamp(42px, 5vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.ve-global-bar {
  margin: 26px 0 26px;
}

.ve-upload-guidance {
  display: grid;
  gap: 6px;
  margin: -6px 0 24px;
  padding: 15px 18px;
  color: #dce8ff;
  border: 1px solid rgba(91, 142, 255, 0.42);
  border-radius: 16px;
  background: rgba(35, 103, 255, 0.10);
}

.ve-upload-guidance[hidden] {
  display: none;
}

.ve-upload-guidance strong {
  color: #ffffff;
  font-size: 16px;
}

.ve-upload-guidance span {
  color: #b9cae6;
  font-size: 15px;
  line-height: 1.5;
}

.ve-upload-guidance.is-processing {
  border-color: rgba(50, 213, 131, 0.42);
  background: rgba(50, 213, 131, 0.09);
}

.ve-upload-guidance.is-complete {
  justify-items: center;
  text-align: center;
}

.ve-upload-guidance.is-complete span {
  width: 100%;
}

.ve-complete-actions {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.ve-runner-steps {
  gap: 18px;
}

.ve-runner-step {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 18px 20px;
  overflow: hidden;
  border: 1px solid rgba(91, 142, 255, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
}

.ve-runner-step.hidden {
  display: none;
}

.ve-runner-step h3 {
  margin: 0 0 6px;
  font-size: clamp(23px, 2.7vw, 30px);
  line-height: 1.08;
}

.ve-runner-step p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 760;
}

.ve-step-body {
  min-width: 0;
}

.ve-step-bar {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.ve-step-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2367ff, #5f8cff, #4b2dff);
  transition: width 0.32s ease;
}

.ve-runner-step.done .ve-mini,
.ve-runner-step.done .ve-step-bar {
  display: none;
}

.ve-mini {
  width: 100%;
  min-height: 132px;
  border-radius: 20px;
  overflow: hidden;
}

.ve-mini .mini-track {
  left: 24px;
  right: 24px;
  bottom: 24px;
  height: 72px;
}

.ve-mini .mini-playhead {
  top: 36px;
}

.ve-mini .mini-wave {
  max-width: none;
}

.ve-result-panel {
  padding: clamp(24px, 3.5vw, 42px);
  border-color: rgba(50, 213, 131, 0.55);
  background: linear-gradient(180deg, rgba(6, 50, 43, 0.70), rgba(4, 25, 29, 0.72));
}

.ve-result-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 44px);
}

.ve-result-panel > p {
  margin: 0 0 22px;
  color: #c6d4ec;
  font-size: 18px;
}

.ve-result-panel .button {
  width: auto;
  min-width: 280px;
}

.ve-result-panel > .button {
  display: flex;
  width: max-content;
  min-height: 54px;
  margin: 30px auto 0;
  padding-inline: 32px;
  justify-content: center;
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 900;
}

.editor-report {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.editor-report h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.editor-report p {
  margin: 0;
  color: #c6d4ec;
  line-height: 1.55;
}

.editor-report-title {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.2;
}

.editor-report-angle {
  margin-bottom: 14px !important;
  color: #edf4ff !important;
  font-weight: 760;
}

.editor-report-summary {
  color: #aebdd5 !important;
}

.editor-report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.editor-report-meta span,
.editor-segment-badge {
  display: inline-flex;
  width: fit-content;
  padding: 7px 11px;
  color: #bfd3ff;
  font-size: 13px;
  font-weight: 820;
  border: 1px solid rgba(91, 142, 255, 0.28);
  border-radius: 999px;
  background: rgba(47, 91, 190, 0.20);
}

.editor-segment-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.editor-segment-card {
  padding: 18px 20px;
  border: 1px solid rgba(112, 139, 190, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.editor-segment-card h5 {
  margin: 12px 0 6px;
  color: #f7faff;
  font-size: 18px;
  line-height: 1.35;
}

.editor-segment-timing {
  display: block;
  margin-bottom: 10px;
  color: #8295b6;
  font-size: 13px;
  font-weight: 720;
}

.editor-segment-card p {
  color: #d5deed;
}

@media (max-width: 760px) {
  .generator-app {
    width: min(100% - 24px, 1080px);
    padding: 24px;
  }

  .generator-title {
    font-size: clamp(38px, 12vw, 52px);
  }

  .ve-duration-picker {
    width: 100%;
    gap: 14px;
  }

  .ve-duration-field {
    width: min(100%, 220px);
  }

  .ve-runner-header {
    display: grid;
    gap: 14px;
  }

  .ve-runner-step {
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 16px;
  }

  .ve-mini {
    min-height: 112px;
  }
}


/* ========================================================================== V2.1 UI safety overrides — app.html only ========================================================================== */
.generator-app .generator-head,
.generator-app .generator-title,
.generator-app .generator-intro { text-align: center; margin-left: auto; margin-right: auto; }
.generator-app .section-eyebrow { display: flex; justify-content: center; align-items: center; width: min(100%, 860px); margin-left: auto; margin-right: auto; text-align: center; }
.generator-app .generator-title { max-width: 1050px; white-space: nowrap; font-size: clamp(42px, 5vw, 74px); }
.generator-app .generator-intro { max-width: 980px; }
.ve-duration-picker { align-items: center; gap: 26px; }
.ve-duration-field { width: 300px; min-width: 300px; height: 92px; position: relative; gap: 14px; padding: 0 22px; overflow: visible; }
.ve-duration-field input[type="number"] { width: 118px; min-width: 118px; max-width: 118px; height: 64px; padding: 0; font-size: clamp(34px, 3.6vw, 54px); line-height: 1; appearance: textfield; -moz-appearance: textfield; }
.ve-duration-field input[type="number"]::-webkit-outer-spin-button,
.ve-duration-field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ve-duration-field span { min-width: 54px; text-align: left; }
.ve-duration-btn { flex: 0 0 38px; width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 12px; background: rgba(255,255,255,.10); color: #f5f8ff; font-size: 28px; line-height: 1; font-weight: 850; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.ve-duration-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.17); border-color: rgba(118,165,255,.70); }
.ve-duration-btn:active { transform: translateY(0) scale(.96); }
.result-panel .result-main { text-align: center; }
.result-panel .result-main .button { margin-left: auto; margin-right: auto; }
.result-panel .editor-report { text-align: left; }
@media (max-width: 920px) { .generator-app .generator-title { white-space: normal; } .ve-duration-field { width: min(100%, 300px); min-width: 0; } }

/* ========================================================================== V2.1 Authentication ========================================================================== */
.auth-account-button {
  color: #fff;
  font-weight: 760;
}

.auth-logout-button {
  color: var(--muted);
  font-size: 14px;
}

.auth-modal-card {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.auth-modal-card > h2 {
  margin: 16px 0 8px;
  font-size: 32px;
}

.auth-view[hidden],
.auth-account-button[hidden],
.auth-logout-button[hidden],
.header-actions [data-login][hidden],
.header-actions [data-auth-guest][hidden] {
  display: none;
}

.auth-view > p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-form input {
  width: 100%;
}

.auth-hint {
  margin-top: -7px;
  color: var(--muted);
  font-size: 13px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.auth-links-centered {
  justify-content: center;
}

.auth-links button {
  padding: 0;
  color: #a7c7ff;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.auth-links button:hover {
  color: #fff;
  text-decoration: underline;
}

.auth-notice {
  padding: 16px;
  color: #dbeafe !important;
  border: 1px solid rgba(91, 142, 255, 0.36);
  border-radius: 16px;
  background: rgba(31, 92, 255, 0.10);
}

@media (max-width: 560px) {
  .auth-modal-card {
    padding: 26px 22px;
  }

  .auth-links {
    flex-direction: column;
    align-items: center;
  }
}

/* ========================================================================== V2.2 Authentication — validation temps réel, transitions, mot de passe oublié ========================================================================== */

/* Vues : navigation instantanée avec transition douce (fondu + léger déplacement),
   jamais de rechargement, jamais de saut brutal. */
.auth-view {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.auth-view.auth-view-transitioning {
  opacity: 0;
  transform: translateY(6px);
}

@media (prefers-reduced-motion: reduce) {
  .auth-view,
  .auth-view.auth-view-transitioning {
    transition: none;
    transform: none;
  }
}

/* Champ avec badge de validation (rond vert/rouge) à droite. */
.auth-field {
  position: relative;
}

.auth-field input {
  padding-right: 46px;
}

.auth-field-icon {
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 2;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  transform: translateY(-50%);
  pointer-events: none;
  transition: background-color 0.24s ease;
}

.auth-field-icon svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 6px;
  opacity: 0;
  transition: opacity 0.24s ease;
}

.auth-icon-valid { color: var(--green); }
.auth-icon-invalid { color: #ff8c9a; }

.auth-field.is-valid .auth-field-icon {
  background: rgba(50, 213, 131, 0.16);
}

.auth-field.is-valid .auth-icon-valid {
  opacity: 1;
}

.auth-field.is-invalid .auth-field-icon {
  background: rgba(255, 140, 154, 0.14);
}

.auth-field.is-invalid .auth-icon-invalid {
  opacity: 1;
}

.auth-field.is-invalid input,
.auth-field.is-valid input {
  transition: border-color 0.24s ease;
}

.auth-field.is-invalid input {
  border-color: rgba(255, 140, 154, 0.55);
}

.auth-field.is-valid input {
  border-color: rgba(50, 213, 131, 0.55);
}

/* Message discret sous le champ : n'apparaît que si le champ est invalide,
   fondu doux, jamais de gros encart d'alerte. */
.auth-field-message {
  min-height: 0;
  margin: -4px 0 0;
  padding: 0;
  color: #f3b8c0;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.2s ease, max-height 0.2s ease, margin 0.2s ease;
}

.auth-field-message:not(:empty) {
  opacity: 1;
  max-height: 120px;
  margin-top: 2px;
}

.auth-field-message-multiline {
  white-space: pre-line;
}

/* Bouton désactivé tant que le formulaire n'est pas valide : sobre, pas de
   couleur alarmante, juste un état visuellement "au repos". */
.auth-form .button[disabled] {
  opacity: 0.45;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.auth-form .button[disabled]:hover {
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

/* Message de retour du formulaire "mot de passe oublié" : neutre/positif par
   défaut, jamais rouge vif pour une simple confirmation. */
.auth-feedback.is-success,
.auth-feedback.is-neutral {
  color: #bfe3ff;
}

.auth-feedback.is-error {
  color: #ffb4c4;
}

@media (max-width: 560px) {
  .auth-field-icon {
    width: 22px;
    height: 22px;
    right: 8px;
  }

  .auth-field input {
    padding-right: 42px;
  }
}
/* ========================================================================== V2.3 Mon compte — menu utilisateur + page mon-compte.html ========================================================================== */

/* Le menu se positionne par rapport au bloc d'actions du header. */
.header-actions {
  position: relative;
}

.account-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  z-index: 80;
  min-width: 300px;
  display: none;
  padding: 18px;
  border: 1px solid #2e466a;
  border-radius: 22px;
  background: #071021;
  box-shadow: var(--shadow-large);
}

.account-menu.open {
  display: block;
}

.account-menu-head {
  display: grid;
  gap: 3px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(112, 139, 190, 0.22);
}

.account-menu-name {
  color: #fff;
  font-size: 17px;
}

.account-menu-email,
.account-menu-org {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-rows {
  display: grid;
  gap: 9px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(112, 139, 190, 0.22);
}

.account-menu-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}

.account-menu-row span {
  color: var(--muted);
  font-size: 13px;
}

.account-menu-row strong {
  color: #eaf1ff;
  font-size: 14px;
  text-align: right;
}

.account-menu-links {
  display: grid;
  gap: 4px;
  padding-top: 12px;
}

.account-menu-links a,
.account-menu-logout {
  display: block;
  width: 100%;
  padding: 9px 10px;
  color: #dce7ff;
  text-align: left;
  text-decoration: none;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 740;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.account-menu-links a:hover,
.account-menu-logout:hover {
  color: #fff;
  background: rgba(31, 92, 255, 0.14);
}

.account-menu-logout {
  color: #ffb4c4;
}

.account-menu-logout:hover {
  color: #ffd3dc;
  background: rgba(239, 71, 111, 0.14);
}

@media (max-width: 720px) {
  /* Sur mobile, .header-actions est masqué : le menu l'est donc aussi,
     la page mon-compte.html reste accessible via le compte. */
  .account-menu {
    right: -8px;
    min-width: 270px;
  }
}

/* ---------- Page Mon compte ---------- */

.account-shell {
  width: min(1080px, calc(100% - 36px));
  margin-top: 54px;
  padding: clamp(28px, 4vw, 46px);
}

body[data-page="account"] .account-shell > .generator-head {
  text-align: center;
}

body[data-page="legal"] .account-shell > .generator-head {
  text-align: center;
}

body[data-page="contact"] .account-shell > .generator-head {
  text-align: center;
}

body[data-page="contact"] .account-shell > .generator-head .generator-intro {
  margin-inline: auto;
}

.account-section {
  margin-top: 34px;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(91, 142, 255, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
}

.account-section > h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.1;
}

.account-static-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-credits-section > h2,
.account-credits-section > .account-section-lead {
  text-align: center;
}

.account-section-collapsible {
  transition: padding 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.account-section-collapsible.is-collapsed {
  padding-top: 18px;
  padding-bottom: 18px;
}

.account-section-heading {
  margin: 0 !important;
}

.account-section-toggle {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0;
  color: #ffffff;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.account-section-toggle:hover,
.account-section-toggle:focus-visible {
  color: #bcd2ff;
}

.account-section-toggle:focus-visible {
  outline: 2px solid rgba(91, 142, 255, 0.75);
  outline-offset: 7px;
  border-radius: 8px;
}

.account-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #79a8ff;
  border: 1px solid rgba(91, 142, 255, 0.30);
  border-radius: 10px;
  background: rgba(31, 92, 255, 0.10);
}

.account-section-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-section-chevron {
  width: 10px;
  height: 10px;
  justify-self: end;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.account-section-toggle[aria-expanded="true"] .account-section-chevron {
  transform: rotate(225deg);
}

.account-section-content {
  padding-top: 12px;
}

.account-section-content[hidden] {
  display: none;
}

.account-section-lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.account-form {
  display: grid;
  gap: 16px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.account-profile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-grid .wide {
  grid-column: 1 / -1;
}

.account-form input[disabled] {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.75;
}

.account-form .button {
  justify-self: start;
}

#profileForm .button {
  justify-self: center;
}

.account-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.account-status-line strong {
  color: var(--green);
}

.account-subsection {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(112, 139, 190, 0.20);
}

.account-subsection-first {
  margin-top: 18px;
  padding-top: 0;
  border-top: 0;
}

.account-subsection > h3 {
  margin: 0 0 16px;
  font-size: 20px;
}

.account-email-switch {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  cursor: pointer;
}

.account-email-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.account-switch-track {
  position: relative;
  width: 62px;
  height: 34px;
  border: 1px solid rgba(50, 213, 131, 0.65);
  border-radius: 999px;
  background: rgba(50, 213, 131, 0.88);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.24);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.account-switch-track > span {
  position: absolute;
  top: 3px;
  left: 31px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  transition: left .2s ease;
}

.account-email-switch input:not(:checked) + .account-switch-track {
  border-color: rgba(239, 71, 111, .72);
  background: rgba(193, 43, 76, .88);
}

.account-email-switch input:not(:checked) + .account-switch-track > span { left: 4px; }
.account-email-switch input:focus-visible + .account-switch-track { box-shadow: 0 0 0 4px rgba(47, 115, 255, .30); }
.account-email-switch input:disabled + .account-switch-track { opacity: .62; cursor: wait; }

.account-switch-copy { display: grid; gap: 3px; }
.account-switch-copy strong { color: #eaf1ff; font-size: 15px; }
.account-switch-copy small { color: var(--green); font-size: 13px; font-weight: 820; }
.account-email-switch.is-disabled .account-switch-copy small { color: #ff8ca5; }

/* Tuiles de temps disponible */
.credit-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.credit-tile {
  display: flex;
  min-height: 150px;
  padding: 22px 12px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(91, 142, 255, 0.24);
  border-radius: 18px;
  background: rgba(3, 8, 18, 0.35);
}

.credit-tile strong {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  white-space: nowrap;
  font-size: clamp(25px, 2.5vw, 36px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.credit-tile span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
}

.credit-tile [hidden] {
  display: none !important;
}

.credit-tile.is-buy {
  padding: 0;
  border-color: rgba(91, 142, 255, 0.55);
  background: rgba(31, 92, 255, 0.09);
}

.credit-free-buy {
  display: flex;
  width: 100%;
  min-height: 150px;
  padding: 22px 18px;
  align-items: center;
  justify-content: center;
  color: #dce8ff;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(31, 92, 255, 0.18), rgba(76, 50, 232, 0.12));
  text-align: center;
  text-decoration: none;
  font-size: 18px;
  font-weight: 850;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.credit-free-buy:hover,
.credit-free-buy:focus-visible {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(31, 92, 255, 0.30), rgba(76, 50, 232, 0.22));
  box-shadow: inset 0 0 0 1px rgba(121, 168, 255, 0.34);
}

.credit-tile.is-remaining {
  border-color: rgba(50, 213, 131, 0.55);
  background: rgba(50, 213, 131, 0.07);
}

.credit-tile.is-remaining strong {
  color: var(--green);
}

.credit-remaining-label {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Historique des missions */
.history-list {
  display: grid;
  gap: 12px;
}

/* Les projets multi-rushs et les anciennes missions sont deux grilles
   distinctes : préserver le même espacement entre leurs cartouches. */
#projectHistoryList:not(:empty) {
  margin-bottom: 12px;
}

.history-item {
  min-width: 0;
}

.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(91, 142, 255, 0.20);
  border-radius: 16px;
  background: rgba(3, 8, 18, 0.30);
}

.history-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.history-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.history-meta {
  color: var(--muted);
  font-size: 13px;
}

.history-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.history-status {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 830;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.history-status.is-finished {
  color: #7ff0bb;
  border-color: rgba(50, 213, 131, 0.5);
  background: rgba(50, 213, 131, 0.12);
}

.history-status.is-running {
  color: #9dc2ff;
  border-color: rgba(47, 115, 255, 0.5);
  background: rgba(31, 92, 255, 0.13);
}

.history-status.is-queued {
  color: #ffd89d;
  border-color: rgba(255, 183, 3, 0.45);
  background: rgba(255, 183, 3, 0.10);
}

.history-status.is-failed {
  color: #ffb4c4;
  border-color: rgba(239, 71, 111, 0.5);
  background: rgba(239, 71, 111, 0.12);
}

.history-progress {
  color: var(--muted);
  font-size: 14px;
  font-weight: 830;
}

.history-row.is-requested-mission {
  border-color: rgba(50, 213, 131, 0.62);
  background: rgba(50, 213, 131, 0.08);
  box-shadow: 0 0 0 3px rgba(50, 213, 131, 0.08);
}

.history-download {
  padding: 9px 16px;
}

.history-reuse { padding: 9px 16px; }
.history-edit { padding: 9px 16px; }

.history-report-toggle {
  padding: 7px 2px;
  color: #bfd3ff;
  font: inherit;
  font-size: 13px;
  font-weight: 790;
  white-space: nowrap;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* Historique multi-rushs : un cartouche stable contenant tout le projet. */
.mass-project-history { border:1px solid rgba(91,142,255,.24); border-radius:18px; background:rgba(3,8,18,.28); overflow:hidden; }
.mass-project-history > .history-row { border:0; border-radius:0; background:transparent; }
.mass-project-title { cursor:text; }
.mass-project-name-input { width:min(420px,100%); padding:7px 10px; border:1px solid rgba(91,142,255,.65); border-radius:9px; color:#fff; background:#091426; font:inherit; font-weight:800; }
.mass-project-panel { display:grid; gap:12px; padding:0 16px 16px; }
.mass-project-panel[hidden], .mass-panel-content[hidden], .mass-version-content[hidden] { display:none; }
.mass-project-live { display:flex; align-items:center; gap:8px; color:#9dc2ff; font-weight:830; font-variant-numeric:tabular-nums; }
.mass-project-live i { width:16px; height:16px; border:2px solid rgba(157,194,255,.25); border-top-color:#6ea3ff; border-radius:50%; animation:ve-mass-spin .8s linear infinite; }
@keyframes ve-mass-spin { to { transform:rotate(360deg); } }
.mass-panel-toggle { width:100%; padding:12px 14px; border:1px solid rgba(91,142,255,.20); border-radius:12px; color:#e8f0ff; background:rgba(15,28,49,.58); font:inherit; font-weight:780; text-align:left; cursor:pointer; }
.mass-panel-toggle::after { content:"+"; float:right; color:#8fb7ff; font-size:18px; }
.mass-panel-toggle[aria-expanded="true"]::after { content:"−"; }
.mass-panel-toggle:hover { border-color:rgba(91,142,255,.46); background:rgba(25,45,76,.72); }
.mass-panel-content, .mass-version-content { padding:4px 8px 10px; }
.mass-assets-grid { display:grid; gap:9px; }
.mass-asset-line { position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto auto auto; align-items:center; gap:12px; padding:10px 12px 14px; border-radius:10px; background:rgba(8,18,34,.72); overflow:hidden; }
.mass-asset-state { color:var(--muted); font-size:13px; }
.mass-asset-line span { color:var(--muted); font-size:13px; }
.mass-asset-line i { position:absolute; left:0; bottom:0; width:var(--progress); height:3px; background:linear-gradient(90deg,#2f73ff,#32d583); transition:width .35s ease; }
.mass-version-card { display:grid; gap:10px; padding:14px; border:1px solid rgba(91,142,255,.20); border-radius:15px; background:rgba(7,16,31,.66); }
.mass-version-header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.mass-version-controls { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.mass-version-content { border-top:1px solid rgba(148,163,184,.14); padding-top:14px; }
.mass-version-content h3 { margin:0 0 12px; }
.mass-selected-assets { display:grid; gap:8px; }
.mass-selected-assets > div { padding:10px 12px; border-radius:10px; background:rgba(15,28,49,.58); }
@media (max-width:760px) { .mass-version-header { align-items:flex-start; flex-direction:column; } .mass-version-controls { grid-template-columns:1fr; } .ve-mass-row { grid-template-columns:minmax(0,1fr) auto 32px; } .ve-mass-row small { grid-column:1; } }

/* Laboratoire des modes de montage : visible uniquement dans app-test.html. */
.ve-edit-mode-lab { display:grid; gap:12px; margin-top:8px; padding:20px; border:1px solid rgba(54,142,255,.34); border-radius:18px; background:linear-gradient(145deg,rgba(8,22,43,.92),rgba(4,12,25,.82)); }
.ve-edit-mode-lab h2 { margin:0; text-align:center; font-size:clamp(24px,3vw,34px); }
.ve-edit-mode-lab > p { margin:0 auto 4px; max-width:700px; color:var(--muted); text-align:center; }
.ve-lab-badge { justify-self:center; padding:5px 10px; border:1px solid rgba(49,146,255,.45); border-radius:999px; color:#4cacff; font-size:11px; font-weight:850; letter-spacing:.12em; }
.ve-edit-mode-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.ve-edit-mode-card { position:relative; display:grid; gap:5px; min-height:94px; padding:15px 16px 15px 45px; border:1px solid rgba(112,143,191,.22); border-radius:14px; background:rgba(12,22,39,.78); cursor:pointer; transition:border-color .18s ease,background .18s ease,transform .18s ease; }
.ve-edit-mode-card:hover:not(.is-coming-soon),.ve-edit-mode-card.is-selected { border-color:#278cff; background:rgba(23,65,116,.52); transform:translateY(-1px); }
.ve-edit-mode-card input { position:absolute; top:18px; left:16px; width:18px; height:18px; accent-color:#278cff; }
.ve-edit-mode-card strong { color:#f5f8ff; font-size:15px; }
.ve-edit-mode-card span { color:var(--muted); font-size:13px; line-height:1.38; }
.ve-edit-mode-card.is-coming-soon { opacity:.48; cursor:not-allowed; }
#customEditorialField[hidden] { display:none; }
.ve-edit-mode-help { min-height:18px; margin:7px 2px 0; color:#8fa8ca; font-size:12px; line-height:1.45; }

/* Historique compact inspiré de l’extension Final Cut Pro. */
.mass-project-history { background:linear-gradient(145deg,rgba(3,8,17,.96),rgba(5,12,24,.88)); }
.mass-project-history > .history-row { min-height:84px; padding:14px 16px; }
.mass-project-history .history-main { display:flex; align-items:center; gap:12px; }
.mass-project-icon { display:grid; flex:0 0 40px; width:40px; height:40px; place-items:center; border-radius:11px; color:#0aa5ff; background:rgba(0,137,224,.18); font-size:22px; }
.mass-project-copy { display:grid; min-width:0; gap:3px; }
.mass-project-panel { gap:7px; padding:0 16px 14px; }
.mass-panel-toggle { padding:8px 2px; border:0; border-radius:0; color:#13a5ff; background:transparent; font-size:13px; letter-spacing:.08em; text-transform:uppercase; }
.mass-panel-toggle::before { content:"›"; display:inline-block; margin-right:9px; font-size:20px; line-height:10px; transform-origin:center; transition:transform .16s ease; }
.mass-panel-toggle[aria-expanded="true"]::before { transform:rotate(90deg); }
.mass-panel-toggle::after,.mass-panel-toggle[aria-expanded="true"]::after { content:""; }
.mass-panel-toggle:hover { border-color:transparent; color:#71c8ff; background:transparent; }
.mass-assets-grid { gap:8px; padding:2px 0 8px; }
.mass-asset-line { min-height:42px; padding:9px 12px 11px 42px; background:rgba(255,255,255,.045); }
.mass-asset-line::before { content:"✓"; position:absolute; left:14px; top:50%; display:grid; width:17px; height:17px; place-items:center; border-radius:50%; color:#03130b; background:#2ee681; font-size:11px; font-weight:950; transform:translateY(-50%); }
.mass-asset-line[data-status-kind="active"]::before { content:""; border:2px solid rgba(51,143,255,.25); border-top-color:#338fff; background:transparent; animation:ve-mass-spin .8s linear infinite; }
.mass-asset-line[data-status-kind="retry"]::before { content:"!"; color:#2a1700; background:#ffb74d; }
.mass-versions-panel { display:grid; gap:9px; padding:2px 0 0; }
.mass-version-card { gap:8px; padding:12px; border:0; border-radius:11px; background:rgba(255,255,255,.05); }
.mass-version-controls { gap:6px; }
.mass-version-controls .mass-panel-toggle { padding:5px 0; text-transform:none; letter-spacing:0; font-size:14px; }
.mass-version-content { margin-top:2px; padding:12px 0 0; }
@media (max-width:760px) { .ve-edit-mode-grid { grid-template-columns:1fr; } .mass-project-history > .history-row { align-items:flex-start; } .mass-project-icon { flex-basis:36px; width:36px; height:36px; } }

/* Éditeur local de décisions — extension isolée des composants VE existants. */
.editor-shell {
  padding-bottom: max(42px, calc(24px + env(safe-area-inset-bottom)));
}

.editor-page-head {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 126px;
  text-align: center;
}

.editor-page-heading { max-width: 760px; }
.editor-page-heading .generator-title { margin: 8px 0 6px; font-size: clamp(22px, 3vw, 32px); }
.editor-page-heading .generator-intro { margin: 0; font-size: 14px; }
.editor-history-back { position: absolute; top: 0; right: 0; }

.editor-feedback {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(91, 142, 255, 0.25);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(3, 8, 18, 0.38);
}

.editor-feedback.is-error {
  color: #ffb4c4;
  border-color: rgba(239, 71, 111, 0.5);
}

.editor-feedback.is-success {
  color: #7ff0bb;
  border-color: rgba(50, 213, 131, 0.5);
}

.editor-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.editor-workspace[hidden] { display: none; }

.editor-player-card,
.editor-timeline-card { margin: 0; }

.editor-video-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(91, 142, 255, 0.20);
  border-radius: 16px;
  background: #02050a;
}

.editor-video-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.editor-video-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: linear-gradient(145deg, rgba(10, 20, 42, 0.98), rgba(3, 8, 18, 0.98));
}

.editor-video-empty[hidden] { display: none; }
.editor-video-empty strong { display: block; font-size: 18px; }
.editor-video-empty span { display: block; max-width: 48ch; margin-top: 8px; color: var(--muted); line-height: 1.5; }

.editor-controls,
.editor-save-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.editor-controls { margin-top: 14px; }
.editor-controls .button { min-height: 44px; }

.editor-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.editor-local-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.editor-timeline-card h2 { margin-top: 0; }
.editor-timeline-card { min-width: 0; overflow: hidden; }

.editor-timeline-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.editor-timeline-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.editor-timeline-tools { display: flex; align-items: center; gap: 9px; }
.editor-timeline-tools strong { margin-right: 8px; color: #9dc2ff; white-space: nowrap; }
.editor-timeline-tools label { color: var(--muted); font-size: 12px; }
.editor-timeline-tools input { width: 112px; accent-color: #5b8eff; }

.editor-timeline-viewport {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 184px;
  border: 1px solid rgba(91, 142, 255, 0.24);
  border-radius: 13px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 30px / 100% 34px,
    #060b14;
  overscroll-behavior-inline: contain;
  touch-action: pan-x;
}

.editor-ruler {
  position: relative;
  height: 32px;
  min-width: 100%;
  border-bottom: 1px solid rgba(91, 142, 255, 0.16);
  background: rgba(2, 5, 10, 0.76);
}

.editor-ruler span {
  position: absolute;
  top: 8px;
  padding-left: 5px;
  color: #73829c;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  border-left: 1px solid rgba(180, 200, 230, 0.35);
}

.editor-timeline {
  display: flex;
  align-items: stretch;
  gap: 3px;
  min-width: 100%;
  height: 126px;
  padding: 18px 0 16px;
}

.editor-segment {
  position: relative;
  flex: 0 0 auto;
  min-width: 72px;
  height: 92px;
  border: 1px solid #316ed1;
  border-radius: 6px;
  background: linear-gradient(180deg, #1e4f9e, #102c5d);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.28);
  cursor: grab;
}

.editor-segment.is-selected {
  border-color: #f5ce54;
  box-shadow: 0 0 0 2px rgba(245, 206, 84, 0.35), 0 5px 16px rgba(0, 0, 0, 0.28);
}

.editor-segment.is-dragging { opacity: 0.45; }
.editor-segment.is-drag-target { border-color: rgba(50, 213, 131, 0.8); }

.editor-segment-body {
  position: absolute;
  inset: 0;
  overflow: hidden;
  padding: 8px 11px;
}

.editor-segment-number { color: #fff; font-size: 15px; font-weight: 900; }
.editor-segment-title { display: block; overflow: hidden; margin-top: 2px; color: #dce9ff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.editor-segment-time { position: absolute; right: 8px; bottom: 6px; color: rgba(255, 255, 255, 0.76); font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.editor-segment-waveform {
  position: absolute;
  right: 10px;
  bottom: 23px;
  left: 10px;
  height: 25px;
  opacity: 0.58;
  background: repeating-linear-gradient(90deg, rgba(218, 234, 255, 0.9) 0 1px, transparent 1px 4px);
  clip-path: polygon(0 44%, 4% 32%, 8% 52%, 12% 18%, 16% 70%, 20% 39%, 24% 57%, 28% 25%, 32% 76%, 36% 43%, 40% 58%, 44% 12%, 48% 69%, 52% 34%, 56% 82%, 60% 41%, 64% 61%, 68% 21%, 72% 72%, 76% 37%, 80% 56%, 84% 28%, 88% 68%, 92% 42%, 96% 60%, 100% 38%, 100% 62%, 96% 40%, 92% 58%, 88% 32%, 84% 72%, 80% 44%, 76% 63%, 72% 28%, 68% 79%, 64% 39%, 60% 59%, 56% 18%, 52% 66%, 48% 31%, 44% 88%, 40% 42%, 36% 57%, 32% 24%, 28% 75%, 24% 43%, 20% 61%, 16% 30%, 12% 82%, 8% 48%, 4% 68%, 0 56%);
}

.editor-segment-actions {
  position: absolute;
  top: 5px;
  right: 5px;
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.editor-segment:hover .editor-segment-actions,
.editor-segment.is-selected .editor-segment-actions,
.editor-segment:focus-within .editor-segment-actions { opacity: 1; }

.editor-icon-button {
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid rgba(180, 210, 255, 0.34);
  border-radius: 6px;
  color: var(--text);
  background: rgba(3, 10, 23, 0.86);
  cursor: pointer;
}

.editor-icon-button.is-delete { color: #ffb4c4; }
.editor-icon-button:disabled { opacity: 0.4; cursor: not-allowed; }

.editor-trim-handle {
  position: absolute;
  z-index: 4;
  top: -1px;
  bottom: -1px;
  width: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
}

.editor-trim-handle::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 3px;
  background: #f5ce54;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
}

.editor-trim-handle.is-in { left: -7px; }
.editor-trim-handle.is-in::after { left: 7px; }
.editor-trim-handle.is-out { right: -7px; }
.editor-trim-handle.is-out::after { right: 7px; }
.editor-is-trimming, .editor-is-trimming * { cursor: ew-resize !important; user-select: none !important; }

.editor-playhead {
  position: absolute;
  z-index: 8;
  top: 25px;
  bottom: 0;
  left: 0;
  width: 1px;
  pointer-events: none;
  background: #ff506f;
}

.editor-playhead span {
  position: absolute;
  top: 0;
  left: -5px;
  width: 11px;
  height: 8px;
  border-radius: 2px 2px 6px 6px;
  background: #ff506f;
}

.editor-selection-readout { min-height: 20px; margin: 10px 2px 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.editor-save-actions {
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(91, 142, 255, 0.18);
}

.editor-save-actions span { color: var(--muted); font-size: 13px; }
.editor-save-actions .button { min-height: 44px; }
.editor-export-actions { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.editor-export-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; text-align: right; }

@media (max-width: 760px) {
  .editor-page-head { padding-top: 54px; }
  .editor-history-back { right: 50%; transform: translateX(50%); }
  .editor-controls > * { flex: 1 1 150px; }
  .editor-timeline-head { align-items: stretch; flex-direction: column; }
  .editor-timeline-tools { justify-content: space-between; }
  .editor-timeline-tools input { width: min(45vw, 180px); }
  .editor-save-actions { align-items: stretch; flex-direction: column; }
  .editor-export-actions { display: grid; grid-template-columns: 1fr; }
  .editor-save-actions .button { width: 100%; }
  .editor-export-note { text-align: left; }
  .editor-icon-button { width: 34px; height: 34px; }
}

.history-report-toggle:hover,
.history-report-toggle:focus-visible {
  color: #ffffff;
}

.history-report-toggle:disabled {
  cursor: wait;
  opacity: 0.65;
}

.history-report-panel.editor-report {
  margin-top: 10px;
  padding: 20px;
  border: 1px solid rgba(91, 142, 255, 0.20);
  border-radius: 16px;
  background: rgba(3, 8, 18, 0.40);
}

.history-report-panel[hidden] {
  display: none;
}

.history-report-panel h3 {
  font-size: 20px;
}

.history-report-content {
  min-width: 0;
}

.history-empty {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 860px) {
  .credit-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .account-grid {
    grid-template-columns: 1fr;
  }

  .history-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .history-side {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .reuse-source-head { align-items: stretch; flex-direction: column; }
  .reuse-source-actions { align-items: stretch; flex-direction: column; }
  .reuse-source-actions .button { width: 100%; }

  .account-section-toggle {
    grid-template-columns: 30px minmax(0, 1fr) 16px;
    gap: 10px;
    font-size: clamp(20px, 6vw, 26px);
  }

  .account-section-icon {
    width: 29px;
    height: 29px;
    border-radius: 9px;
  }
}

/* ========================================================================== V3 Portefeuille — badge temps restant, popup temps insuffisant, historique des opérations ========================================================================== */

/* Badge discret de temps restant, en haut à droite dans le header. */
.wallet-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 128px;
  padding: 7px 13px;
  color: #bfd3f5;
  text-decoration: none;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  border: 1px solid rgba(91, 142, 255, 0.30);
  border-radius: 999px;
  background: rgba(7, 16, 33, 0.55);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.wallet-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(50, 213, 131, 0.65);
}

.wallet-badge:hover {
  color: #fff;
  border-color: rgba(136, 174, 255, 0.75);
  background: rgba(31, 92, 255, 0.12);
}

.wallet-badge.is-low {
  color: #ffc9d4;
  border-color: rgba(239, 71, 111, 0.45);
}

.wallet-badge.is-low::before {
  background: #ef476f;
  box-shadow: 0 0 8px rgba(239, 71, 111, 0.6);
}

.wallet-badge[hidden] {
  display: none;
}

.mobile-auth-nav {
  display: none;
}

/* Popup "Temps insuffisant" — mêmes fondations que la popup d'auth. */
.insufficient-time-card {
  text-align: center;
}

.insufficient-time-card > h2 {
  margin: 16px 0 10px;
  font-size: 30px;
}

.insufficient-time-text {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.insufficient-time-actions {
  display: grid;
  gap: 12px;
}

.insufficient-time-actions .button {
  width: 100%;
}

/* Historique des opérations du portefeuille (mon-compte.html) */
.ops-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(91, 142, 255, 0.18);
  border-radius: 16px;
  background: rgba(3, 8, 18, 0.28);
}

.ops-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ops-main strong {
  font-size: 15px;
}

.ops-meta {
  color: var(--muted);
  font-size: 13px;
}

.ops-side {
  display: grid;
  gap: 3px;
  justify-items: end;
  flex: 0 0 auto;
}

.ops-amount {
  font-size: 15px;
  font-weight: 870;
  white-space: nowrap;
}

.ops-amount.is-positive {
  color: #7ff0bb;
}

.ops-amount.is-negative {
  color: #ffb4c4;
}

.ops-balance {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

#opsList {
  display: grid;
  gap: 10px;
}

@media (max-width: 720px) {
  .ops-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .ops-side {
    width: 100%;
    justify-items: start;
  }

  .main-nav.open .mobile-auth-nav:not([hidden]) {
    display: flex;
    align-items: center;
    min-height: 38px;
  }

  .main-nav.open .mobile-account-nav {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(112, 139, 190, 0.22);
  }

  .main-nav.open .mobile-login-nav {
    width: 100%;
    margin-top: 4px;
    padding: 16px 0 0;
    text-align: left;
    border-top: 1px solid rgba(112, 139, 190, 0.22);
    border-radius: 0;
  }

  .main-nav.open .mobile-guest-action {
    width: 100%;
    justify-content: center;
  }

  .main-nav.open .mobile-wallet-nav {
    color: #bfe8d4;
    font-size: 14px;
  }

  .main-nav.open .mobile-wallet-nav.is-low {
    color: #ffc9d4;
  }

  .footer-contact > a {
    display: inline-flex;
    font-size: 13px;
  }

  .footer-contact > a[href="contact.html"],
  .footer-contact > .footer-contact-primary {
    color: #fff;
    font-size: 16px;
  }
}
