/* ——— Base Notion-inspired ——— */
*{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,'Apple Color Emoji',Arial,sans-serif,'Segoe UI Emoji','Segoe UI Symbol';
  color:#37352f;
  background:#ffffff;
  line-height:1.6;
  font-size:16px;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
h1,h2,h3{margin:0 0 .5rem;line-height:1.3;font-weight:600;color:#37352f}
h1{font-size:2.2rem}
h2{font-size:1.5rem}
h3{font-size:1.2rem}
p{margin:.25rem 0 .8rem;color:#37352f}
.muted{color:#787774}
.sep{border:0;border-top:1px solid #e9e9e7;margin:1.5rem 0}
.sticky{position:sticky;top:20px}

/* ——— Header minimaliste ——— */
.app-header{
  background:#ffffff;
  border-bottom:1px solid #e9e9e7;
  padding:48px 24px 40px;
  text-align:center;
}
.app-header h1{
  font-weight:700;
  letter-spacing:-0.02em;
  margin-bottom:8px;
  color:#37352f;
  font-size:2.5rem;
}
.app-header p{
  color:#787774;
  margin:0;
  font-size:1.05rem;
  font-weight:400;
}

/* ——— Cards style Notion ——— */
.card{
  background:#ffffff;
  border-radius:3px;
  border:1px solid #e9e9e7;
  padding:32px;
  margin:20px auto;
  max-width:900px;
  transition:box-shadow 0.2s ease;
}
.card:hover{
  box-shadow:0 1px 3px rgba(15,15,15,0.06);
}

/* ——— Grids ——— */
.grid-2{
  display:grid;
  grid-template-columns:420px 1fr;
  gap:32px;
  align-items:start;
  max-width:1400px;
  margin:40px auto;
  padding:0 40px;
}
.col-left{
  max-height:calc(100vh - 140px);
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:#e9e9e7 transparent;
}
.col-left::-webkit-scrollbar{width:8px}
.col-left::-webkit-scrollbar-track{background:transparent}
.col-left::-webkit-scrollbar-thumb{background:#e9e9e7;border-radius:4px}
.col-left::-webkit-scrollbar-thumb:hover{background:#d3d3d1}
.col-right{display:grid;gap:20px}

/* ——— Questions layout avec sidebar ——— */
.questions-container{
  display:grid;
  grid-template-columns:1fr 320px;
  gap:20px;
  max-width:1100px;
  margin:20px auto;
  padding:0 20px;
  align-items:start;
}
.question-main{
  min-height:400px;
}

/* ——— Breadcrumb sidebar ——— */
.breadcrumb-sidebar{
  position:sticky;
  top:20px;
  display:none;
}
.breadcrumb-sidebar.visible{
  display:block;
}
.sidebar-title{
  font-size:0.875rem;
  font-weight:600;
  color:#37352f;
  margin:0 0 16px 0;
  text-transform:uppercase;
  letter-spacing:0.05em;
}
.breadcrumb-list{
  display:grid;
  gap:10px;
}
.breadcrumb-item{
  padding:12px;
  background:#ffffff;
  border:1px solid #e9e9e7;
  border-radius:3px;
  cursor:pointer;
  transition:all 0.15s ease;
}
.breadcrumb-item:hover{
  background:#f7f6f3;
  border-color:#37352f;
}
.breadcrumb-question{
  font-size:0.7rem;
  color:#787774;
  text-transform:uppercase;
  letter-spacing:0.04em;
  margin-bottom:6px;
  font-weight:500;
}
.breadcrumb-answer{
  font-size:0.875rem;
  color:#37352f;
  font-weight:400;
  line-height:1.4;
}

/* ——— Wizard Notion style ——— */
.progressbar{
  height:4px;
  background:#e9e9e7;
  border-radius:2px;
  margin-bottom:32px;
  overflow:hidden;
}
.progressbar>span{
  display:block;
  height:100%;
  width:0;
  background:#37352f;
  transition:width .3s cubic-bezier(0.4, 0, 0.2, 1);
}
.qhead{margin-bottom:28px}
.qnum{
  font-weight:500;
  color:#787774;
  font-size:0.875rem;
  margin-bottom:12px;
  text-transform:uppercase;
  letter-spacing:0.05em;
}
.qtxt{
  margin:0;
  font-size:1.75rem;
  color:#37352f;
  font-weight:600;
  letter-spacing:-0.01em;
}
.choices{display:grid;gap:10px;margin:24px 0}
.choice{
  padding:14px 16px;
  border:1px solid #e9e9e7;
  border-radius:3px;
  cursor:pointer;
  transition:all 0.15s ease;
  background:#ffffff;
  font-size:1rem;
  color:#37352f;
  position:relative;
}
.choice:hover{
  background:#f7f6f3;
  border-color:#d3d3d1;
}
.choice.selected{
  background:#f7f6f3;
  border-color:#37352f;
  box-shadow:0 0 0 1px #37352f;
}
.qnav{margin-top:32px;display:flex;gap:12px}

/* ——— Transitions ——— */
.fading{
  opacity:0;
  transition:opacity 0.2s ease;
}

/* ——— Buttons Notion style ——— */
.btn{
  appearance:none;
  border:1px solid transparent;
  border-radius:3px;
  padding:10px 16px;
  font-weight:500;
  cursor:pointer;
  transition:all 0.15s ease;
  font-size:0.875rem;
  font-family:inherit;
}
.btn-primary{
  background:#37352f;
  color:#ffffff;
  border:1px solid #37352f;
}
.btn-primary:hover:not(:disabled){
  background:#2f2e2b;
  border-color:#2f2e2b;
}
.btn-primary:disabled{
  background:#e9e9e7;
  color:#9b9a97;
  border-color:#e9e9e7;
  cursor:not-allowed;
  opacity:0.6;
}
.btn-ghost{
  background:rgba(55,53,47,0.03);
  color:#37352f;
  border:1px solid transparent;
}
.btn-ghost:hover{
  background:rgba(55,53,47,0.06);
}

/* ——— Loading ——— */
.loading{
  display:none;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:60px 20px;
  margin:20px;
}
.loading.active{display:flex}
.spinner{
  width:20px;
  height:20px;
  border-radius:50%;
  border:2px solid #e9e9e7;
  border-top-color:#37352f;
  animation:spin .8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ——— Results Notion style ——— */
.results{padding:20px 0}
.col-right > .card{
  width:100%;
}
.content-list{display:grid;gap:12px}
.content-item{
  border:1px solid #e9e9e7;
  border-radius:3px;
  padding:16px 20px;
  transition:all 0.15s ease;
  background:#ffffff;
}
.content-item:hover{
  background:#f7f6f3;
  border-color:#d3d3d1;
}
.content-score{
  font-size:0.75rem;
  color:#787774;
  margin-bottom:6px;
  font-weight:400;
  text-transform:uppercase;
  letter-spacing:0.04em;
}
.score-value{
  color:#37352f;
  font-weight:600;
  font-size:0.875rem;
}
.content-title{
  font-weight:600;
  margin-bottom:10px;
  font-size:1.05rem;
  color:#37352f;
  line-height:1.4;
}
.tags-list{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:10px;
}
.tag-item{
  font-size:0.75rem;
  background:rgba(55,53,47,0.06);
  border:none;
  padding:3px 8px;
  border-radius:3px;
  color:#37352f;
  font-weight:400;
}
.results-actions{
  text-align:center;
  margin:32px 0 8px;
}

/* ——— Persona editor Notion style ——— */
.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 16px 0;
  min-height:40px;
  padding:12px;
  background:rgba(37,99,235,0.04);
  border:1px solid rgba(37,99,235,0.15);
  border-radius:3px;
}
.empty-chips{
  color:#9b9a97;
  font-size:0.875rem;
  font-style:italic;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  background:#ffffff;
  color:#37352f;
  border:1px solid #e9e9e7;
  border-radius:3px;
  font-size:0.875rem;
  font-weight:400;
  transition:all 0.15s ease;
}
.chip:hover{
  background:rgba(55,53,47,0.04);
  border-color:#d3d3d1;
}
.chip .rm{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:16px;
  height:16px;
  border-radius:2px;
  cursor:pointer;
  background:transparent;
  border:none;
  transition:all 0.15s ease;
  padding:0;
  color:#dc2626;
  opacity:0.7;
}
.chip .rm:hover{
  background:rgba(220,38,38,0.1);
  color:#dc2626;
  opacity:1;
}
.chip .rm svg{
  width:12px;
  height:12px;
}
.chips-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:12px 0 20px 0;
  color:#787774;
  font-size:0.8125rem;
  font-weight:400;
}
.chips-meta strong{
  color:#37352f;
  font-weight:500;
}
.tag-warning{
  color:#eb5757;
  font-weight:500;
  font-size:0.75rem;
  padding:4px 8px;
  background:rgba(235,87,87,0.1);
  border-radius:3px;
}
.tag-add{
  position:relative;
  margin:0 0 12px 0;
}
#tag-search{
  width:100%;
  padding:10px 12px;
  border:1px solid #e9e9e7;
  border-radius:3px;
  font-size:0.9375rem;
  transition:all 0.15s ease;
  background:#ffffff;
  color:#37352f;
  font-family:inherit;
}
#tag-search:focus{
  outline:none;
  border-color:#37352f;
  box-shadow:0 0 0 1px #37352f;
}
#tag-search::placeholder{
  color:#9b9a97;
}
.suggestions{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% - 1px);
  z-index:40;
  background:#ffffff;
  border:1px solid #37352f;
  border-top:none;
  border-radius:0 0 3px 3px;
  box-shadow:0 4px 12px rgba(15,15,15,0.1);
  display:none;
  max-height:320px;
  overflow:auto;
  scrollbar-width:thin;
  scrollbar-color:#e9e9e7 transparent;
}
.suggestions::-webkit-scrollbar{width:8px}
.suggestions::-webkit-scrollbar-track{background:transparent}
.suggestions::-webkit-scrollbar-thumb{background:#e9e9e7;border-radius:4px}
.suggestion{
  padding:10px 12px;
  cursor:pointer;
  transition:background 0.1s ease;
  font-size:0.875rem;
  color:#37352f;
}
.suggestion:hover{
  background:#f7f6f3;
}
.person-editor-actions{
  margin-top:0;
}
.person-editor-actions .btn{
  width:100%;
}

/* ——— Accordéon pour les réponses ——— */
.accordion-toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:rgba(55,53,47,0.03);
  border:1px solid #e9e9e7;
  border-radius:3px;
  padding:14px 16px;
  cursor:pointer;
  transition:all 0.15s ease;
  font-family:inherit;
  margin-bottom:0;
}
.accordion-toggle:hover{
  background:rgba(55,53,47,0.06);
}
.accordion-title{
  font-size:0.875rem;
  font-weight:600;
  color:#37352f;
  text-transform:uppercase;
  letter-spacing:0.05em;
}
.accordion-chevron{
  transition:transform 0.2s ease;
  color:#787774;
}
.accordion-toggle.open .accordion-chevron{
  transform:rotate(180deg);
}
.accordion-content{
  max-height:0;
  overflow:hidden;
  transition:max-height 0.3s ease;
}
.accordion-content.open{
  max-height:800px;
  margin-top:16px;
}

/* ——— Persona header supprimé ——— */
.persona-header{
  display:none;
}

/* ——— Section édition persona ——— */
.persona-edit-section{
  margin-top:0;
}
.edit-title{
  font-size:1.1rem;
  font-weight:600;
  color:#37352f;
  margin:0 0 8px 0;
}
.edit-subtitle{
  font-size:0.875rem;
  color:#787774;
  margin:0 0 20px 0;
  line-height:1.5;
}

/* ——— Persona answers Notion style (réduites) ——— */
.category-title{
  font-weight:600;
  margin:28px 0 16px;
  color:#37352f;
  font-size:0.8125rem;
  text-transform:uppercase;
  letter-spacing:0.06em;
}
.category-title:first-child{
  margin-top:0;
}
.bullets{
  list-style:none;
  padding:0;
  margin:0 0 20px 0;
}
.bullets li{
  padding:8px 0;
  border-bottom:1px solid #e9e9e7;
  line-height:1.5;
  font-size:0.875rem;
}
.bullets li:last-child{
  border-bottom:none;
}
.persona-label{
  color:#787774;
  font-size:0.8125rem;
  font-weight:400;
}
.tag-name{
  color:#37352f;
  font-weight:500;
}

/* ——— Responsive ——— */
@media (max-width: 1024px) {
  .questions-container{
    grid-template-columns:1fr;
    gap:16px;
  }
  .breadcrumb-sidebar{
    position:static;
  }
  .grid-2{
    grid-template-columns:1fr;
    gap:24px;
    padding:0 24px;
  }
  .sticky{
    position:static;
  }
  .col-left{
    max-height:none;
    overflow-y:visible;
  }
  .card{
    margin:16px;
    padding:24px;
  }
  .app-header{
    padding:32px 20px 28px;
  }
  .app-header h1{
    font-size:2rem;
  }
}

@media (max-width: 640px) {
  .questions-container{
    padding:0 12px;
  }
  .grid-2{
    padding:0 16px;
  }
  .card{
    padding:20px;
    margin:12px;
  }
  .app-header h1{
    font-size:1.75rem;
  }
  .qtxt{
    font-size:1.4rem;
  }
}