.flashcards-trigger { position: relative; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--theme-line); border-radius: 999px; background: var(--theme-surface); color: var(--theme-muted); font-size: 10px; cursor: pointer; transition: .25s; }
.flashcards-trigger:hover, .flashcards-trigger.active { color: var(--theme-text); border-color: color-mix(in srgb, var(--theme-a) 55%, transparent); background: color-mix(in srgb, var(--theme-surface-solid) 84%, var(--theme-a)); }
.flashcards-trigger svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.flashcards-trigger b { display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--theme-a); color: var(--action-ink); font-size: 8px; }
.flashcards-section { flex: 1; min-height: calc(100vh - 82px); padding: 28px clamp(18px, 3vw, 45px) 38px; }
.flashcards-section[hidden] { display: none; }
.timer-section.page-hidden { display: none; }
.flashcards-layout { width: min(1280px, 100%); min-height: calc(100vh - 148px); margin: 0 auto; display: grid; grid-template-columns: 230px 1fr; overflow: hidden; border: 1px solid var(--theme-line); border-radius: 17px; background: color-mix(in srgb, var(--theme-surface-solid) 78%, transparent); box-shadow: 0 25px 80px rgba(0,0,0,.24); backdrop-filter: blur(18px); }
.flashcard-sidebar { padding: 22px 15px; border-right: 1px solid var(--theme-line); background: rgba(5,6,12,.12); }
.flashcard-sidebar-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 6px 18px; }
.flashcard-sidebar h2 { margin: 4px 0 0; font-size: 17px; }
.flashcard-sidebar-head button { width: 29px; height: 29px; border: 1px solid var(--theme-line); border-radius: 8px; background: var(--theme-surface); color: var(--theme-text); cursor: pointer; }
.all-cards-link, .folder-head, .list-link { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: var(--theme-muted); text-align: left; font-size: 9px; cursor: pointer; }
.all-cards-link:hover, .all-cards-link.active, .list-link:hover, .list-link.active { background: color-mix(in srgb, var(--theme-a) 9%, transparent); color: var(--theme-text); }
.all-cards-link b { margin-left: auto; font-weight: 400; }
.folder { margin-top: 8px; }
.folder-head { color: var(--theme-text); cursor: default; font-weight: 500; }
.folder-head > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-head .folder-icon { color: var(--theme-a); }
.folder-tools { display: flex; margin-left: auto; }
.folder-tools button { width: 22px; height: 22px; border: 0; background: transparent; color: var(--theme-muted); cursor: pointer; border-radius: 5px; }
.folder-tools button:hover { color: var(--theme-text); background: rgba(255,255,255,.06); }
.folder-lists { padding-left: 14px; }
.list-row { display: flex; align-items: center; }
.list-row .list-link { flex: 1; min-width: 0; }
.delete-list { width: 24px; height: 24px; flex: 0 0 auto; border: 0; border-radius: 5px; background: transparent; color: var(--theme-muted); cursor: pointer; opacity: 0; }
.list-row:hover .delete-list { opacity: 1; }
.delete-list:hover { color: #ff8179; background: rgba(255,80,70,.08); }
.list-link::before { content: ""; width: 5px; height: 5px; border: 1px solid var(--theme-muted); border-radius: 50%; }
.list-link b { margin-left: auto; font-weight: 400; }
.sidebar-help { margin: 18px 7px 0; color: color-mix(in srgb, var(--theme-muted) 70%, transparent); font-size: 8px; line-height: 1.6; }
.flashcard-workspace { min-width: 0; padding: 28px clamp(20px, 3vw, 38px); }
.flashcard-workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--theme-line); }
.flashcard-workspace-head h1 { margin: 5px 0 0; font-size: clamp(22px, 3vw, 31px); letter-spacing: -1.2px; }
.flashcard-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ghost-action, .review-action, .browse-action { min-height: 37px; padding: 0 13px; border-radius: 8px; font-size: 9px; cursor: pointer; }
.ghost-action { border: 1px solid var(--theme-line); background: var(--theme-surface); color: var(--theme-text); }
.review-action { border: 0; background: linear-gradient(135deg, var(--action-a), var(--action-b)); color: var(--action-ink); font-weight: 600; }
.browse-action { border: 1px solid color-mix(in srgb, var(--theme-b) 45%, var(--theme-line)); background: color-mix(in srgb, var(--theme-surface-solid) 78%, var(--theme-b)); color: var(--theme-text); }
.browse-action:hover { border-color: var(--theme-b); background: color-mix(in srgb, var(--theme-surface-solid) 64%, var(--theme-b)); }
.review-action b, .browse-action b { margin-left: 7px; }
.review-action:disabled, .ghost-action:disabled, .browse-action:disabled { opacity: .38; cursor: default; }
.flashcard-dashboard { display: grid; grid-template-columns: 120px 120px minmax(220px, 1fr); gap: 9px; margin: 20px 0; }
.flashcard-dashboard > div, .answer-mode-control { min-height: 68px; padding: 13px; border: 1px solid var(--theme-line); border-radius: 10px; background: rgba(0,0,0,.1); }
.flashcard-dashboard strong { display: block; font: 400 20px "DM Mono", monospace; }
.flashcard-dashboard span, .answer-mode-control > span { display: block; margin-top: 5px; color: var(--theme-muted); font-size: 8px; }
.answer-mode-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.answer-mode-control > span { margin: 0; text-transform: uppercase; letter-spacing: 1px; }
.answer-mode-control select { max-width: 190px; border: 1px solid var(--theme-line); border-radius: 7px; padding: 8px; background: var(--theme-surface-solid); color: var(--theme-text); font-size: 9px; outline: none; }
.flashcard-empty { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--theme-muted); text-align: center; }
.flashcard-empty[hidden], .flashcard-dashboard[hidden], .flashcard-workspace-head[hidden], .review-card[hidden] { display: none; }
.flashcard-empty > span { font-size: 36px; color: var(--theme-a); }
.flashcard-empty h3 { margin: 13px 0 6px; color: var(--theme-text); font-size: 15px; }
.flashcard-empty p { max-width: 350px; margin: 0; font-size: 9px; line-height: 1.65; }
.flashcard-table-wrap { overflow-x: auto; padding-bottom: 12px; }
.flashcard-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.flashcard-table th { padding: 10px 8px; border-bottom: 1px solid var(--theme-line); color: var(--theme-muted); text-align: left; font-size: 8px; font-weight: 500; text-transform: uppercase; letter-spacing: .7px; }
.flashcard-table td { padding: 7px 5px; border-bottom: 1px solid color-mix(in srgb, var(--theme-line) 60%, transparent); }
.flashcard-table input { width: 100%; height: 37px; border: 1px solid transparent; border-radius: 7px; padding: 0 9px; background: rgba(0,0,0,.13); color: var(--theme-text); font-size: 9px; outline: none; }
.language-input-wrap { display: flex; align-items: center; gap: 5px; }
.language-input-wrap input, #typedAnswerInput, .review-back p { font-family: "Segoe UI", Arial, sans-serif; font-variant-ligatures: none; line-height: 1.55; }
.stress-mark-button, .typed-stress-button { flex: 0 0 auto; width: 35px; height: 35px; padding: 0; border: 1px solid var(--theme-line); border-radius: 7px; background: color-mix(in srgb, var(--theme-surface-solid) 85%, var(--theme-a)); color: var(--theme-text); font: 600 17px/1 "Segoe UI", Arial, sans-serif; cursor: pointer; }
.stress-mark-button:hover, .typed-stress-button:hover { border-color: var(--theme-a); color: var(--theme-a); }
.stress-vowel-control { position: relative; display: inline-flex; flex: 0 0 auto; }
.stress-vowel-menu { position: absolute; z-index: 6; right: 0; bottom: calc(100% + 7px); width: 214px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 7px; border: 1px solid var(--theme-line); border-radius: 9px; background: var(--theme-surface-solid); box-shadow: 0 15px 45px rgba(0,0,0,.35); }
.stress-vowel-menu[hidden] { display: none; }
.stress-vowel-menu button { height: 32px; border: 1px solid transparent; border-radius: 6px; background: rgba(255,255,255,.05); color: var(--theme-text); font: 500 15px/1 "Segoe UI", Arial, sans-serif; cursor: pointer; }
.stress-vowel-menu button:hover { border-color: var(--theme-a); background: color-mix(in srgb, var(--theme-a) 13%, transparent); color: var(--theme-a); }
.flashcard-table input:focus { border-color: color-mix(in srgb, var(--theme-a) 55%, transparent); background: var(--theme-surface); }
.due-label { display: block; min-width: 95px; color: var(--theme-muted); font-size: 8px; }
.due-label.due { color: var(--theme-a); }
.delete-card { width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--theme-muted); cursor: pointer; }
.delete-card:hover { color: #ff8179; background: rgba(255,80,70,.08); }
.add-row-button { margin-top: 11px; border: 1px dashed var(--theme-line); border-radius: 8px; padding: 10px 14px; background: transparent; color: var(--theme-muted); font-size: 9px; cursor: pointer; }
.add-row-button:hover { color: var(--theme-text); border-color: var(--theme-a); }
.review-view { max-width: 760px; margin: 0 auto; padding-top: 20px; }
.review-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--theme-muted); font: 400 9px "DM Mono", monospace; }
.review-topline-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.browse-wrong-action { min-height: 37px; padding: 0 12px; border: 1px solid color-mix(in srgb, #e16a62 55%, var(--theme-line)); border-radius: 8px; background: color-mix(in srgb, var(--theme-surface-solid) 78%, #a94954); color: #ffe8e2; font-size: 9px; cursor: pointer; }
.browse-wrong-action:hover:not(:disabled) { border-color: #e8796f; background: color-mix(in srgb, var(--theme-surface-solid) 60%, #c55254); }
.browse-wrong-action:disabled { opacity: .38; cursor: default; }
.browse-wrong-action b { margin-left: 6px; }
.review-card { min-height: 370px; margin: 22px 0 14px; padding: 36px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--theme-line); border-radius: 18px; background: color-mix(in srgb, var(--theme-surface-solid) 74%, transparent); box-shadow: 0 20px 60px rgba(0,0,0,.16); text-align: center; }
.review-side-label { color: var(--theme-a); font-size: 8px; letter-spacing: 1.7px; }
.review-front, .review-back p { margin: 19px 0; color: var(--theme-text); font-size: clamp(24px, 4vw, 38px); line-height: 1.25; }
.reveal-button, .typed-answer button { border: 0; border-radius: 999px; padding: 12px 20px; background: linear-gradient(135deg, var(--action-a), var(--action-b)); color: var(--action-ink); font-size: 9px; font-weight: 600; cursor: pointer; }
.typed-answer { width: min(420px, 100%); display: flex; gap: 8px; }
.typed-answer[hidden], .review-back[hidden], .review-verdicts[hidden], .browse-navigation[hidden], .review-complete[hidden] { display: none; }
.typed-answer input { flex: 1; min-width: 0; border: 1px solid var(--theme-line); border-radius: 9px; padding: 0 13px; background: rgba(0,0,0,.16); color: var(--theme-text); outline: none; }
.typed-stress-button { width: 42px; height: 42px; }
.typed-answer .stress-vowel-menu { bottom: calc(100% + 9px); }
.review-back { width: 100%; margin-top: 25px; padding-top: 24px; border-top: 1px solid var(--theme-line); }
.audio-button { border: 1px solid var(--theme-line); border-radius: 999px; padding: 7px 12px; background: transparent; color: var(--theme-muted); font-size: 8px; cursor: pointer; }
.review-verdicts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.review-verdicts button { min-height: 58px; border: 0; border-radius: 10px; color: #fff; cursor: pointer; font-weight: 600; }
.review-verdicts small { display: block; margin-top: 4px; opacity: .7; font-size: 8px; font-weight: 400; }
.false-button { background: linear-gradient(135deg, #a94954, #e16a62); }.true-button { background: linear-gradient(135deg, #3d9c7c, #68c79d); }
.browse-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.browse-navigation button { min-height: 50px; }
.review-complete { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.review-complete > span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: color-mix(in srgb, var(--theme-a) 15%, transparent); color: var(--theme-a); font-size: 22px; }
.review-complete h3 { margin: 16px 0 7px; }
.review-complete p { margin: 0 0 20px; color: var(--theme-muted); font-size: 9px; }
.review-complete-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.flashcard-modal-backdrop { position: fixed; z-index: 8; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(4,5,10,.6); backdrop-filter: blur(7px); }
.flashcard-modal-backdrop[hidden] { display: none; }
.flashcard-modal { width: min(390px, 100%); padding: 25px; border: 1px solid var(--theme-line); border-radius: 15px; background: var(--theme-surface-solid); box-shadow: 0 30px 90px rgba(0,0,0,.45); }
.flashcard-modal h3 { margin: 6px 0 8px; font-size: 19px; }
.flashcard-modal p { margin: 0 0 17px; color: var(--theme-muted); font-size: 9px; line-height: 1.6; }
.flashcard-modal input { width: 100%; height: 42px; margin-bottom: 17px; border: 1px solid var(--theme-line); border-radius: 8px; padding: 0 12px; background: rgba(0,0,0,.16); color: var(--theme-text); outline: none; }
.flashcard-modal input:focus { border-color: var(--theme-a); }
.flashcard-modal > div { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 850px) {
  .flashcards-trigger { width: 38px; padding: 0; justify-content: center; }
  .flashcards-trigger > span { display: none; }
  .flashcards-trigger b { position: absolute; top: -4px; right: -4px; }
  .flashcards-layout { grid-template-columns: 1fr; }
  .flashcard-sidebar { border-right: 0; border-bottom: 1px solid var(--theme-line); }
  .folder-tree { max-height: 150px; overflow-y: auto; }
  .flashcard-workspace-head { flex-direction: column; }
  .flashcard-dashboard { grid-template-columns: 1fr 1fr; }
  .answer-mode-control { grid-column: 1 / -1; }
}
@media (max-width: 550px) {
  .flashcards-section { min-height: calc(100vh - 68px); padding: 12px; }
  .flashcards-layout { border-radius: 12px; }
  .flashcard-workspace { padding: 20px 14px; }
  .flashcard-actions { width: 100%; }
  .flashcard-actions button { flex: 1; }
  .review-card { min-height: 320px; padding: 24px 18px; }
}

/* Échelle typographique plus confortable */
.flashcards-trigger { font-size: 11.5px; }
.flashcard-sidebar h2 { font-size: 19px; }
.all-cards-link, .folder-head, .list-link { font-size: 11px; }
.sidebar-help { font-size: 9.5px; }
.flashcard-workspace-head h1 { font-size: clamp(25px, 3vw, 34px); }
.ghost-action, .review-action, .browse-action, .browse-wrong-action { font-size: 10.5px; }
.flashcard-dashboard span, .answer-mode-control > span { font-size: 10px; }
.answer-mode-control select { font-size: 11px; }
.flashcard-empty h3 { font-size: 17px; }
.flashcard-empty p { font-size: 11px; }
.flashcard-table th { font-size: 9.5px; }
.flashcard-table input { height: 41px; font-size: 12.5px; }
.due-label { font-size: 10px; }
.add-row-button { font-size: 10.5px; }
.review-topline { font-size: 10.5px; }
.review-side-label { font-size: 9.5px; }
.reveal-button, .typed-answer button { font-size: 10.5px; }
.audio-button { font-size: 10px; }
.review-verdicts small { font-size: 9.5px; }
.review-complete p, .flashcard-modal p { font-size: 11px; }
