:root {
  --noa-violet:      #5957e3;
  --noa-violet-hover:#4846c9;
  --noa-green:       #2d6859;
  --noa-orange:      #e4713c;
  --noa-black:       #000000;
  --noa-cream:       #fbf9f7;
  --noa-white:       #ffffff;
  --noa-lavender:    #e2d3f5;
  --noa-green-soft:  #cceddb;
  --noa-orange-soft: #fbece6;
  --noa-border:      #e5e5e5;
  --noa-muted:       #666666;
  --font-display: 'Archivo Black', 'Hobeaux Black', serif;
  --font-body:    'Poppins', system-ui, -apple-system, sans-serif;
  --r-button: 8px;
  --r-input:  8px;
  --r-card:   12px;
  --r-pill:   999px;
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px; --s7:48px; --s8:64px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-pop:  0 8px 24px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--noa-cream);
  color: var(--noa-black);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.page { min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--noa-cream);
  border-bottom: 1px solid var(--noa-border);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
}
.brand img { height: 28px; width: auto; display: block; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

.main {
  max-width: 780px; margin: 0 auto;
  padding: 48px 24px 120px;
}

/* Portrait : pleine largeur hors du .main */
.portrait-fullwidth {
  width: 100%;
  padding: 40px 24px 60px;
  box-sizing: border-box;
}
.portrait-fullwidth .poster {
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 24px 70px rgba(0,0,0,.18);
}
.portrait-inner-header {
  max-width: 780px;
  margin: 0 auto 24px;
  padding: 0 24px;
}

.step { display: none; animation: fadeIn .25s ease; }
.step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: translateY(0);} }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes progressBar { from { width: 0% } to { width: 95% } }

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--noa-lavender); color: var(--noa-black);
  padding: 6px 14px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500; line-height: 1; margin-bottom: 18px;
}
.kicker .dot { width: 6px; height: 6px; background: var(--noa-violet); border-radius: 999px; }

.page-h1 {
  font-family: var(--font-display); font-weight: 400; color: var(--noa-black);
  font-size: 38px; line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 14px;
}
.lede { font-size: 17px; color: var(--noa-black); max-width: 620px; margin: 0 0 8px; }
.sec {
  font-family: var(--font-body); font-weight: 800; font-size: 26px;
  color: var(--noa-black); margin: 0 0 6px; letter-spacing: -0.01em;
}
.sec-sub { color: var(--noa-muted); font-size: 14px; margin: 0 0 28px; max-width: 640px; }
.sub {
  font-family: var(--font-body); font-weight: 700; font-size: 16px;
  color: var(--noa-black); margin: 0 0 14px;
}

.demo {
  background: var(--noa-white); border: 1px solid var(--noa-border);
  border-radius: var(--r-card); padding: 28px;
  margin-top: 16px;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; border-radius: var(--r-button);
  border: none; cursor: pointer; padding: 12px 20px; font-size: 14px;
  transition: background 120ms ease, transform 120ms ease;
}
.btn:active { transform: scale(0.98); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-primary { background: var(--noa-violet); color: #fff; }
.btn-primary:hover { background: var(--noa-violet-hover); }
.btn-secondary { background: transparent; color: var(--noa-violet); border: 1.5px solid var(--noa-violet); }
.btn-secondary:hover { background: var(--noa-lavender); }
.btn-ghost { background: transparent; color: var(--noa-black); }
.btn-ghost:hover { background: #f0eee9; }
.btn-dark { background: var(--noa-black); color: #fff; }
.btn[disabled], .btn-disabled { background: #ddd; color: #888; cursor: not-allowed; }

.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 28px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--noa-lavender); color: var(--noa-black);
  padding: 6px 14px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500; line-height: 1;
}
.pill .dot { width: 6px; height: 6px; background: var(--noa-violet); border-radius: 999px; }

.spill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; line-height: 1; }
.spill-match { background: var(--noa-green-soft); color: var(--noa-green); }
.spill-warn  { background: var(--noa-orange-soft); color: var(--noa-orange); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--noa-black); }
.field label .opt { color: var(--noa-muted); font-weight: 400; margin-left: 6px; }
.inp {
  width: 100%; padding: 12px 14px; background: #fff;
  border: 1px solid var(--noa-border); border-radius: var(--r-input);
  font-size: 14px; font-family: var(--font-body); color: var(--noa-black); outline: none;
  transition: border-color 120ms, box-shadow 120ms;
  resize: vertical;
}
.inp:focus { border-color: var(--noa-violet); box-shadow: 0 0 0 3px rgba(89,87,227,0.15); }
.inp.invalid { border-color: var(--noa-orange); }

.note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--noa-cream); border: 1px solid var(--noa-border);
  border-radius: var(--r-card); padding: 14px 16px; font-size: 13.5px;
  color: var(--noa-black); margin-top: 16px;
}
.note svg { flex: none; margin-top: 2px; color: var(--noa-violet); }
.note.warn svg { color: var(--noa-orange); }

.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 16px; margin-top: 16px; }
.c-white { background: #fff; border: 1px solid var(--noa-border); border-radius: var(--r-card); padding: 20px; box-shadow: var(--shadow-card); }
.c-success { background: var(--noa-green-soft); color: var(--noa-green); border-radius: var(--r-card); padding: 16px; }
.c-warn { background: var(--noa-orange-soft); color: var(--noa-orange); border-radius: var(--r-card); padding: 16px; }
.c-title { font-family: var(--font-body); font-weight: 700; font-size: 15px; margin: 0 0 4px; color: var(--noa-black); }
.c-sub { font-size: 13px; color: var(--noa-muted); margin: 0; line-height: 1.45; }

.choices { display: flex; gap: 12px; flex-wrap: wrap; }
.choice {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; border: 2px solid var(--noa-border);
  border-radius: var(--r-card); padding: 14px 18px;
  font-size: 14px; font-weight: 500; color: var(--noa-black);
  cursor: pointer; font-family: var(--font-body);
}
.choice .tick { width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--noa-border); display: inline-flex; align-items: center; justify-content: center; color: transparent; }
.choice.sel { border-color: var(--noa-violet); background: #f3eefb; box-shadow: 0 0 0 3px rgba(89,87,227,0.12); }
.choice.sel .tick { border-color: var(--noa-violet); background: var(--noa-violet); color: #fff; }

.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill); font-weight: 600; line-height: 1; white-space: nowrap; font-size: 12px; }
.badge-noa { background: var(--noa-violet); color: #fff; padding: 5px 10px; }
.badge-ft { background: #fff; color: var(--noa-muted); border: 1px solid var(--noa-border); padding: 4px 10px; }

.dropzone {
  border: 2px dashed var(--noa-border); border-radius: var(--r-card);
  padding: 36px 24px; text-align: center; cursor: pointer;
  transition: border-color 120ms, background 120ms, opacity 120ms;
  background: var(--noa-cream);
  position: relative;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--noa-violet); background: #f3eefb; }
.dropzone.processing {
  cursor: wait;
  background: #f3eefb;
  border-color: var(--noa-violet);
  pointer-events: none;
}
.dropzone.processing .dropzone-idle { display: none !important; }
.dropzone-busy {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  gap: 4px;
}
/* Spinner animé */
.dropzone .spinner {
  width: 40px; height: 40px;
  margin: 0 auto 16px;
  border: 4px solid rgba(89,87,227,0.2);
  border-top-color: var(--noa-violet);
  border-radius: 999px;
  animation: spin .8s linear infinite;
}
/* Barre de progression */
.upload-progress-bar {
  width: 100%; max-width: 260px; height: 4px;
  background: rgba(89,87,227,0.15); border-radius: 99px;
  margin: 12px auto 0; overflow: hidden;
}
.upload-progress-bar-fill {
  height: 100%; width: 0%;
  background: var(--noa-violet); border-radius: 99px;
  transition: width 0.4s ease;
}
.upload-progress-bar-fill.running {
  animation: progressBar 30s cubic-bezier(0.1, 0.6, 0.5, 1) forwards;
}
/* Étapes textuelles */
.upload-step {
  font-size: 12.5px; color: var(--noa-muted);
  margin: 6px 0 0; min-height: 18px;
  transition: opacity 0.3s;
}


.q-card { padding: 20px; }
.q-card.ai { border-left: 4px solid var(--noa-violet); }
.q-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.q-text { margin: 0; font-size: 15px; line-height: 1.55; }

.prompt-box {
  background: var(--noa-cream); border: 1px solid var(--noa-border);
  border-radius: var(--r-card); padding: 16px; position: relative;
}
.prompt-box pre {
  margin: 0 0 12px; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.5; color: var(--noa-black);
  max-height: 260px; overflow: auto;
}

.stack { display: flex; flex-direction: column; gap: 16px; }

.answer-card { background: #fff; border: 1px solid var(--noa-border); border-radius: var(--r-card); padding: 20px; }
.answer-card h4 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.answer-card .q-label { font-size: 13px; color: var(--noa-muted); margin-bottom: 12px; line-height: 1.4; }
.answer-actions { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.recorder {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--noa-white); border: 1.5px solid var(--noa-violet);
  color: var(--noa-violet); border-radius: var(--r-button);
  padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.recorder.recording { background: var(--noa-orange-soft); border-color: var(--noa-orange); color: var(--noa-orange); }
.recording-dot { width: 8px; height: 8px; background: currentColor; border-radius: 999px; animation: pulse 1s infinite; }
/* ── Star rating feedback ── */
.q-feedback { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--noa-border); }
.q-feedback-label { font-size: 12.5px; font-weight: 600; color: var(--noa-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .4px; }
.star-rating { display: flex; align-items: center; gap: 4px; }
.star-rating .star {
  font-size: 24px;
  cursor: pointer;
  color: #d9d9e3;          /* gris neutre par défaut */
  transition: color 0.15s, transform 0.1s;
  line-height: 1;
  user-select: none;
}
.star-rating .star:hover,
.star-rating .star.hover { color: #f6c050; transform: scale(1.15); }
.star-rating .star.sel   { color: #f6c050; }   /* jaune quand sélectionné */
.star-rating .star:hover ~ .star { color: #d9d9e3 !important; transform: none !important; }
#rating-label-q3,
#rating-label-q4,
#rating-label-q5 { font-size: 12px; color: var(--noa-violet); font-weight: 600; margin-left: 6px; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.status { padding: 12px 14px; border-radius: var(--r-card); font-size: 13.5px; }
.status.error { background: var(--noa-orange-soft); color: var(--noa-orange); }
.status.success { background: var(--noa-green-soft); color: var(--noa-green); }

/* ═══════════════════════════════════════════
   PORTRAIT — Template fidèle maquette Fanny (Claude)
   ═══════════════════════════════════════════ */

  :root{
    --violet:#5957e3; --green:#2d6859; --orange:#e4713c; --yellow:#f6c050;
    --navy:#15123f; --cream:#fbf9f7; --ink:#1a1747; --muted:#5b5b66; --border:#e7e3df;
  }

  .poster{
    max-width:100%;
    margin:0 auto;
    background:var(--cream);
    overflow:hidden;
    border-radius:8px;
  }

  /* HERO photo */
  .hero{position:relative;line-height:0;width:100%;height:46vh;min-height:320px;max-height:520px;overflow:hidden;background:var(--cream);}
  .hero img{width:100%;height:100%;object-fit:cover;object-position:top center;display:block;image-rendering:high-quality;background:var(--cream);}

  /* CONTENT */
  .content{position:relative;margin-top:-32px;background:var(--cream);
            border-top-left-radius:42px;border-top-right-radius:42px;padding:8px 56px 0;}

  /* NAME */
  .name{font-family:"Archivo Black",sans-serif;font-weight:800;font-size:clamp(64px, 9vw, 118px);
        line-height:.92;letter-spacing:-3px;color:var(--ink);padding-top:14px;}
  .role{font-weight:700;font-size:42px;color:var(--violet);letter-spacing:-1px;margin-top:2px;}
  .quote{display:flex;gap:14px;margin:26px 0 30px;max-width:640px;}
  .quote .qm{width:34px;height:34px;color:var(--violet);flex-shrink:0;margin-top:2px;}
  .quote p{font-size:19px;font-weight:500;color:#2a2840;line-height:1.45;}

  /* 3 CARDS */
  .cards{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;}
  .card{background:#fff;border:1.5px solid var(--ac);border-radius:18px;
        padding:24px 22px 0;position:relative;overflow:hidden;display:flex;flex-direction:column;}
  .card-head{display:flex;align-items:center;gap:12px;margin-bottom:14px;}
  .card-ico{width:30px;height:30px;color:var(--ac);}
  .card-ico svg{width:30px;height:30px;}
  .card h3{font-size:23px;font-weight:700;color:var(--ac);}
  .card p{font-size:15.5px;line-height:1.5;color:#3a3a46;flex:1;padding-bottom:22px;}
  .card-bar{height:6px;background:var(--ac);border-radius:6px;margin:0 -22px;}

  /* TES FORCES */
  .forces-title{display:flex;align-items:center;justify-content:center;gap:18px;
                margin:42px 0 26px;color:var(--violet);}
  .forces-title h2{font-size:30px;font-weight:800;}
  .forces-title .chev{font-size:24px;font-weight:700;opacity:.8;}
  .forces{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;}
  .force{background:#fff;border:1.5px solid var(--border);border-radius:16px;padding:18px 14px 22px;text-align:center;}
  .force-ico{
    width:68px;height:68px;border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    margin:0 auto 16px;
    transition:transform .2s;
  }
  .force:hover .force-ico{transform:scale(1.08);}
  .force-ico svg{width:28px;height:28px;stroke:currentColor;}
  .force-ico span{display:flex;align-items:center;justify-content:center;}
  .force h4{font-size:13.5px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;
             line-height:1.3;margin-bottom:8px;}
  .force p{font-size:13px;line-height:1.5;color:#4a4a55;}

  /* DARK BANNER */
  .banner{background:var(--navy);border-radius:22px;margin:40px 0 0;padding:28px 34px;
          display:flex;flex-direction:column;gap:22px;color:#fff;}
  .banner-top{display:flex;align-items:flex-start;gap:18px;}
  .banner-star{width:42px;height:42px;border-radius:50%;background:var(--violet);
               display:flex;align-items:center;justify-content:center;flex-shrink:0;}
  .banner-star svg{width:22px;height:22px;color:#fff;}
  .banner-text{flex:1;display:flex;flex-direction:column;gap:8px;}
  .banner-text h3{font-size:22px;font-weight:700;margin:0;}
  .banner-text p{font-size:14px;line-height:1.6;color:#bdbad6;margin:0;}

  .stats{display:grid;grid-template-columns:repeat(5,1fr);align-items:start;gap:12px;}
  .stat{background:rgba(255,255,255,.06);border-radius:14px;padding:14px 10px;text-align:center;}
  .stat--sep{border-left:none;}
  /* Icône */
  .stat-ico{height:28px;margin-bottom:10px;display:flex;align-items:center;justify-content:center;}
  .stat-ico svg{width:26px;height:26px;stroke-width:2;}
  /* Chiffre principal */
  .stat-num{font-size:26px;font-weight:800;line-height:1;letter-spacing:-1px;}
  /* Label */
  .stat-lab{font-size:11px;line-height:1.3;color:#b0adce;margin-top:6px;font-weight:500;text-transform:uppercase;letter-spacing:.3px;}
  /* Barre de progression */
  .stat-bar-wrap{
    height:4px;
    background:rgba(255,255,255,.12);
    border-radius:99px;
    margin-top:10px;
    overflow:hidden;
  }
  .stat-bar-fill{
    height:100%;
    border-radius:99px;
    opacity:.85;
  }

  /* NEXT STEP */
  .next{display:grid;grid-template-columns:1.5fr 1fr;gap:20px;align-items:center;
        padding:34px 0 30px;}
  .next-inner{width:100%;}
  .next-title{display:flex;align-items:center;gap:14px;margin-bottom:22px;}
  .next-title .vbar{width:6px;height:30px;background:var(--violet);border-radius:6px;}
  .next-title h2{font-size:27px;font-weight:700;color:var(--ink);}

  .steps-grid{display:grid;grid-template-columns:repeat(2, 1fr);gap:16px;}
  .step-item{display:flex;align-items:flex-start;gap:14px;background:rgba(255,255,255,.65);
             border:1.5px solid var(--border);border-radius:16px;padding:16px;}
  .step-num{width:32px;height:32px;border-radius:50%;background:var(--violet);
            color:#fff;font-weight:800;font-size:15px;display:flex;align-items:center;
            justify-content:center;flex-shrink:0;}
  .step-body{display:flex;flex-direction:column;gap:4px;}
  .step-label{font-size:15px;font-weight:700;color:var(--ink);line-height:1.3;}
  .step-text{font-size:13.5px;line-height:1.45;color:#4a4a55;}

  .next-decor{display:flex;justify-content:flex-end;}
  .next-decor svg{width:100%;max-width:280px;height:auto;}

  @media(max-width:780px){
    .content{padding:8px 22px 0;border-top-left-radius:48px;}
    .name{font-size:64px;} .role{font-size:26px;}
    .cards,.forces,.stats{grid-template-columns:1fr;}
    .banner{grid-template-columns:1fr;} .stats{gap:14px;}
    .stat--sep{border-left:none;border-top:1px solid #34315f;padding-top:14px;}
    .next{grid-template-columns:1fr;} .next-decor{justify-content:center;}
    .steps-grid{grid-template-columns:1fr;}
    .footer{flex-direction:column;gap:14px;text-align:center;padding:22px;}
  }

  /* FOOTER */
  .footer{background:var(--violet);display:flex;align-items:center;justify-content:space-between;
          padding:20px 40px;}
  .footer-logo{display:flex;flex-direction:column;}
  .footer-logo svg{height:34px;width:auto;}
  .footer-logo span{color:#fff;font-size:13px;letter-spacing:4px;font-weight:400;margin-top:-4px;margin-left:2px;}
  .footer-tag{color:#fff;font-size:18px;font-weight:500;}
  .footer-btn{border:1.5px solid rgba(255,255,255,.9);color:#fff;border-radius:30px;
              padding:11px 26px;font-size:15px;font-weight:500;}

  @media(max-width:780px){
    .content{padding:8px 22px 0;border-top-left-radius:48px;}
    .name{font-size:64px;} .role{font-size:26px;}
    .cards,.forces,.stats{grid-template-columns:1fr;}
    .banner{grid-template-columns:1fr;} .stats{gap:14px;}
    .stat--sep{border-left:none;border-top:1px solid #34315f;padding-top:14px;}
    .next{grid-template-columns:1fr;} .next-decor{justify-content:center;}
    .steps-grid{grid-template-columns:1fr;}
    .footer{flex-direction:column;gap:14px;text-align:center;padding:22px;}
  }

.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.modal-card { position: relative; background: var(--noa-white); border-radius: var(--r-card); padding: 28px; width: 100%; max-width: 480px; box-shadow: var(--shadow-pop); }

@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; }
  .main { padding: 32px 20px 80px; }
  .page-h1 { font-size: 30px; }
  .cardgrid { grid-template-columns: 1fr; }
}
