/* ================================================================
   FTS — Assistant répétition
   Module isolé, aligné sur le design system partagé fts.css
   ================================================================ */

:root{
  --rep-radius: var(--r-md, 4px);
  --rep-shadow: 0 18px 46px rgba(0,0,0,.28);
}

body.has-glow{
  background:
    radial-gradient(circle at top, rgba(212,32,26,.10), transparent 32rem),
    linear-gradient(180deg, var(--black,#0a0a0a), #111 62%, #090909);
}

button, select, textarea, input{font:inherit}

.rep-shell{
  padding-top: 1.4rem;
  padding-bottom: 5rem;
}

.rep-hero{
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding-top: 2rem;
  text-align: center;
}

.rep-hero > div:first-child{flex:1;min-width:0}
.rep-hero .title-line{margin-left:auto;margin-right:auto}
.rep-lead{max-width: 620px;}

.rep-status-pill,
.rep-mini-status{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  border: 1px solid rgba(201,168,76,.35);
  color: var(--gold,#c9a84c);
  background: rgba(201,168,76,.08);
  border-radius: 999px;
  padding: .45rem .7rem;
  font-size: .72rem;
  line-height: 1.2;
  white-space: nowrap;
}

.rep-status-pill{position:absolute;right:0;top:1.8rem}

.rep-card.card{
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(28,28,28,.96), rgba(20,20,20,.96));
  box-shadow: var(--rep-shadow);
}

.rep-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:1rem;
}

.rep-section-head h2,
.rep-panel h2,
.rep-player h2{
  color: var(--white,#f5f2ee);
  margin-bottom:.35rem;
}

.rep-help{
  color: var(--muted,#888);
  font-size:.84rem;
  line-height:1.55;
  margin:0 0 1rem;
}

.rep-note{
  margin-top:.8rem;
  padding:.75rem .9rem;
  border:1px solid rgba(201,168,76,.22);
  background:rgba(201,168,76,.06);
  color:var(--gold,#c9a84c);
  border-radius:var(--rep-radius);
}
.rep-note.is-error{
  border-color:rgba(212,32,26,.35);
  background:rgba(212,32,26,.10);
  color:#ff8a84;
}

.rep-grid-2{
  display:grid;
  grid-template-columns:minmax(0,1.18fr) minmax(270px,.82fr);
  gap:1rem;
}

.rep-doc-loader,
.rep-options,
.rep-actions{
  display:flex;
  gap:.7rem;
  align-items:flex-end;
  flex-wrap:wrap;
}

.rep-doc-loader label,
.rep-options label{
  flex:1 1 220px;
  min-width:0;
}

.rep-doc-loader-local{
  margin-top:.8rem;
  padding-top:.8rem;
  border-top:1px solid var(--border,#2a2a2a);
}

.rep-file{
  width:100%;
  padding:.6rem .75rem;
  background:#141414;
  border:1px solid var(--border,#2a2a2a);
  border-radius:var(--r-sm,3px);
  color:var(--white,#f5f2ee);
}

.rep-textarea{
  min-height: 280px;
}

.rep-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  min-height:42px;
  padding:.75rem 1rem;
  border-radius: var(--r-sm,3px);
  border:1px solid rgba(255,255,255,.10);
  background:transparent;
  color:var(--muted,#888);
  cursor:pointer;
  transition: var(--t, all .2s ease);
  text-decoration:none;
  font-size:.84rem;
  white-space:nowrap;
}
.rep-btn:hover:not(:disabled){border-color:rgba(255,255,255,.32);color:var(--white,#f5f2ee)}
.rep-btn:disabled{opacity:.45;cursor:not-allowed;background:#242424;color:#777}
.rep-btn-primary{
  background: var(--red,#d4201a);
  border-color: var(--red,#d4201a);
  color: var(--white,#f5f2ee);
  font-family: var(--font-display,'Arial Narrow',sans-serif);
  letter-spacing:.1em;
  text-transform:uppercase;
  font-size:1rem;
}
.rep-btn-primary:hover:not(:disabled){background:var(--red-dark,#a81713);border-color:var(--red-dark,#a81713)}
.rep-btn-memory{border-color:rgba(201,168,76,.55);color:var(--gold,#c9a84c);background:rgba(201,168,76,.08)}
.rep-btn-danger{border-color:rgba(212,32,26,.45);color:#ff8a84;background:rgba(212,32,26,.06)}

.rep-panel{
  background:#141414;
  border:1px solid var(--border,#2a2a2a);
  border-radius:var(--rep-radius);
  padding:1rem;
}

.rep-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:.55rem;
  margin-bottom:1rem;
}
.rep-stats div{
  background:#0f0f0f;
  border:1px solid var(--border,#2a2a2a);
  border-radius:var(--r-sm,3px);
  padding:.7rem .5rem;
  text-align:center;
}
.rep-stats strong{
  display:block;
  font-family:var(--font-display,'Arial Narrow',sans-serif);
  font-size:1.9rem;
  line-height:1;
  color:var(--gold,#c9a84c);
}
.rep-stats span{
  display:block;
  margin-top:.2rem;
  color:var(--muted,#888);
  font-size:.68rem;
}

.rep-tags{
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
  margin:.8rem 0 1rem;
}
.rep-tag{
  display:inline-flex;
  align-items:center;
  border:1px solid rgba(201,168,76,.26);
  background:rgba(201,168,76,.08);
  color:var(--gold,#c9a84c);
  border-radius:999px;
  padding:.28rem .58rem;
  font-size:.68rem;
  font-weight:600;
}
.rep-label{margin-top:.4rem}

.rep-options-card{
  padding:0!important;
  overflow:hidden;
}
.rep-options-details summary{
  list-style:none;
  cursor:pointer;
  padding:1rem 1.2rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  border-bottom:1px solid transparent;
}
.rep-options-details summary::-webkit-details-marker{display:none}
.rep-options-details summary span{
  color:var(--gold,#c9a84c);
  font-size:.72rem;
  letter-spacing:.2em;
  text-transform:uppercase;
}
.rep-options-details summary small{color:var(--muted,#888);font-size:.72rem}
.rep-options-details[open] summary{border-bottom-color:var(--border,#2a2a2a)}
.rep-options{padding:1rem 1.2rem 1.2rem}

.rep-player-head{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  align-items:flex-start;
}
.rep-counter{
  flex:0 0 auto;
  min-width:70px;
  text-align:center;
  color:var(--gold,#c9a84c);
  border:1px solid rgba(201,168,76,.25);
  background:rgba(201,168,76,.07);
  border-radius:999px;
  padding:.42rem .65rem;
  font-size:.75rem;
  font-weight:700;
}

.rep-current{
  border:1px solid var(--border,#2a2a2a);
  border-radius:var(--r-md,4px);
  background:#111;
  min-height:150px;
  padding:1.2rem;
  margin:1rem 0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  transition:var(--t, all .2s ease);
}
.rep-current.is-own{
  border-color:rgba(201,168,76,.65);
  background:linear-gradient(180deg,rgba(201,168,76,.13),rgba(20,20,20,.96));
}
.rep-current.is-other{
  border-color:rgba(212,32,26,.45);
  background:linear-gradient(180deg,rgba(212,32,26,.11),rgba(20,20,20,.96));
}
.rep-current.is-stage{
  border-style:dashed;
  opacity:.88;
}
.rep-current-role{
  margin:0 0 .45rem;
  color:var(--gold,#c9a84c);
  font-size:.7rem;
  letter-spacing:.2em;
  text-transform:uppercase;
  font-weight:700;
}
.rep-current-text{
  margin:0;
  color:var(--white,#f5f2ee);
  font-size:clamp(1.35rem,4.2vw,2.45rem);
  line-height:1.2;
  letter-spacing:-.025em;
}

.rep-meter{
  height:6px;
  background:#101010;
  border:1px solid var(--border,#2a2a2a);
  border-radius:999px;
  overflow:hidden;
  margin-bottom:1rem;
}
.rep-meter span{
  display:block;
  width:0%;
  height:100%;
  background:linear-gradient(90deg,var(--red,#d4201a),var(--gold,#c9a84c));
  transition:width .25s ease;
}
.rep-actions-player{align-items:stretch}
.rep-actions-player .rep-btn{flex:1 1 150px}

.rep-script-preview{
  display:flex;
  flex-direction:column;
  gap:.55rem;
  max-height:72vh;
  overflow:auto;
  padding-right:.25rem;
  scroll-behavior:smooth;
}
.rep-line{
  position:relative;
  display:grid;
  grid-template-columns:minmax(84px,160px) minmax(0,1fr);
  gap:.7rem;
  align-items:start;
  padding:.7rem .8rem;
  border:1px solid var(--border,#2a2a2a);
  background:#111;
  border-radius:var(--r-sm,3px);
  cursor:pointer;
  transition:background .18s,border-color .18s,transform .18s;
}
.rep-line:hover{border-color:rgba(255,255,255,.22)}
.rep-line.active{
  border-color:var(--gold,#c9a84c);
  background:rgba(201,168,76,.12);
  transform:translateY(-1px);
}
.rep-line.own{
  border-color:rgba(201,168,76,.25);
}
.rep-line.own .rep-line-role{color:var(--gold,#c9a84c)}
.rep-line.other .rep-line-role{color:#ff8a84}
.rep-line.stage{
  grid-template-columns:1fr;
  border-style:dashed;
  background:#0f0f0f;
  opacity:.82;
}
.rep-line-role{
  color:var(--muted,#888);
  font-size:.68rem;
  letter-spacing:.11em;
  text-transform:uppercase;
  font-weight:800;
  line-height:1.35;
  word-break:break-word;
}
.rep-line-text{
  color:var(--white,#f5f2ee);
  font-size:.94rem;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.rep-line.own.is-masked .rep-line-text{
  color:rgba(245,242,238,.65);
  font-style:italic;
}

.rep-empty{
  color:var(--muted,#888);
  border:1px dashed var(--border,#2a2a2a);
  border-radius:var(--r-sm,3px);
  padding:1rem;
  text-align:center;
}

.rep-debug{
  margin:.8rem 0;
  border:1px solid rgba(212,32,26,.35);
  background:rgba(212,32,26,.08);
  border-radius:var(--r-sm,3px);
  overflow:hidden;
}
.rep-debug summary{
  cursor:pointer;
  color:#ff8a84;
  padding:.7rem .85rem;
  font-size:.78rem;
  font-weight:700;
}
.rep-debug pre{
  white-space:pre-wrap;
  color:#ffd7d4;
  background:rgba(0,0,0,.20);
  border-top:1px solid rgba(212,32,26,.24);
  padding:.8rem;
  font-size:.75rem;
  line-height:1.45;
  overflow:auto;
}

@media (max-width:760px){
  .rep-shell{padding-left:1rem;padding-right:1rem}
  .rep-hero{display:block;padding-top:1.2rem}
  .rep-status-pill{position:static;margin:.9rem auto 0;display:flex;width:max-content;max-width:100%}
  .rep-section-head,
  .rep-player-head{display:block}
  .rep-mini-status{margin-top:.3rem;white-space:normal;text-align:left}
  .rep-grid-2{grid-template-columns:1fr}
  .rep-doc-loader,.rep-options,.rep-actions{display:grid;grid-template-columns:1fr;align-items:stretch}
  .rep-actions .rep-btn{width:100%}
  .rep-stats{grid-template-columns:repeat(3,1fr)}
  .rep-line{grid-template-columns:1fr;gap:.35rem}
  .rep-script-preview{max-height:62vh}
  .rep-current{min-height:130px;padding:1rem}
  .rep-current-text{font-size:1.45rem}
}

/* V95 — rôles lus/ignorés */
.rep-role-read-controls{
  margin: 14px 0 16px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.04);
}
.rep-role-read-head{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-bottom:10px;
}
.rep-role-read-head strong{ color: var(--fts-text, #fff); }
.rep-role-read-head small{ color: rgba(255,255,255,.68); line-height:1.35; }
.rep-role-read-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.rep-role-read-item{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:999px;
  background: rgba(255,255,255,.07);
  cursor:pointer;
  user-select:none;
  font-size:.92rem;
}
.rep-role-read-item input{ accent-color: var(--fts-red, #e30613); }
.rep-role-read-item.is-muted{
  opacity:.62;
  text-decoration: line-through;
}
.rep-line.ignored{
  opacity:.52;
  border-style:dashed;
}
.rep-line-note{
  display:block;
  margin-top:4px;
  color: rgba(255,255,255,.58);
  font-size:.78rem;
}
.rep-current.is-ignored{
  opacity:.78;
  border-style:dashed;
}


/* V96 — voix par rôle */
.rep-role-voice-details{
  margin-top:12px;
  border-top:1px solid rgba(255,255,255,.10);
  padding-top:10px;
}
.rep-role-voice-details summary{
  cursor:pointer;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  color:var(--fts-text,#fff);
  list-style:none;
}
.rep-role-voice-details summary::-webkit-details-marker{display:none}
.rep-role-voice-details summary small{
  color:rgba(255,255,255,.62);
  font-size:.76rem;
  text-align:right;
}
.rep-role-voice-list{
  margin-top:10px;
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}
.rep-role-voice-item{
  display:grid;
  grid-template-columns:minmax(90px,.55fr) minmax(150px,1fr);
  gap:8px;
  align-items:center;
  padding:8px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  background:rgba(0,0,0,.16);
}
.rep-role-voice-item > span{
  color:var(--fts-text,#fff);
  font-weight:700;
  font-size:.86rem;
  overflow:hidden;
  text-overflow:ellipsis;
}
.rep-role-voice-note{
  margin:10px 0 0;
  color:rgba(255,255,255,.58);
  font-size:.78rem;
  line-height:1.35;
}
@media (max-width:640px){
  .rep-role-voice-item{grid-template-columns:1fr;}
  .rep-role-voice-details summary{flex-direction:column;}
  .rep-role-voice-details summary small{text-align:left;}
}

/* V98 — parcours type Imparato, plus simple côté élève */
.rep-app-docs{
  border-color:rgba(201,168,76,.22)!important;
}
.rep-app-docs .rep-section-head h2::before,
.rep-role-panel h2::before,
.rep-player h2::before{
  content:'';
  display:inline-block;
  width:.55rem;
  height:.55rem;
  margin-right:.45rem;
  border-radius:999px;
  background:var(--gold,#c9a84c);
  vertical-align:middle;
}
.rep-doc-loader .rep-btn-primary{
  min-height:48px;
  padding-left:1.15rem;
  padding-right:1.15rem;
}
.rep-advanced-text{
  background:#141414;
  border:1px solid var(--border,#2a2a2a);
  border-radius:var(--rep-radius);
  overflow:hidden;
}
.rep-advanced-text summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:1rem;
  color:var(--gold,#c9a84c);
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:.72rem;
  font-weight:800;
}
.rep-advanced-text summary::-webkit-details-marker{display:none}
.rep-advanced-text summary small{
  color:var(--muted,#888);
  text-transform:none;
  letter-spacing:0;
  font-weight:600;
}
.rep-advanced-text-body{
  padding:0 1rem 1rem;
  border-top:1px solid var(--border,#2a2a2a);
}
.rep-role-panel{
  border-color:rgba(201,168,76,.22);
}
.rep-tags{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:.6rem;
}
.rep-role-card{
  appearance:none;
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:.25rem;
  border:1px solid rgba(255,255,255,.12);
  background:#101010;
  color:var(--white,#f5f2ee);
  border-radius:14px;
  padding:.85rem .9rem;
  cursor:pointer;
  text-align:left;
  transition:transform .16s ease,border-color .16s ease,background .16s ease;
}
.rep-role-card:hover{
  transform:translateY(-1px);
  border-color:rgba(201,168,76,.5);
}
.rep-role-card.is-active{
  border-color:var(--gold,#c9a84c);
  background:linear-gradient(180deg,rgba(201,168,76,.17),rgba(20,20,20,.96));
  box-shadow:0 0 0 2px rgba(201,168,76,.08) inset;
}
.rep-role-card strong{
  font-family:var(--font-display,'Arial Narrow',sans-serif);
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:1.08rem;
}
.rep-role-card span{
  color:var(--muted,#888);
  font-size:.78rem;
}
.rep-role-card.is-active span{color:var(--gold,#c9a84c)}
.rep-current.is-own .rep-current-role::after{
  content:' 🎭';
  letter-spacing:0;
}
.rep-actions-player .rep-btn-primary{
  font-size:1.15rem;
}
.rep-line.active{
  box-shadow:0 0 0 2px rgba(201,168,76,.08) inset, 0 10px 28px rgba(0,0,0,.20);
}
.rep-line.own.active{
  background:linear-gradient(180deg,rgba(201,168,76,.18),rgba(20,20,20,.98));
}
@media (max-width:760px){
  .rep-grid-2{display:flex;flex-direction:column-reverse;}
  .rep-tags{grid-template-columns:1fr 1fr;}
  .rep-role-card{min-height:74px;}
}
@media (max-width:430px){
  .rep-tags{grid-template-columns:1fr;}
}

/* V99 — actes/scènes + reprise locale */
.rep-resume-card{
  margin-top:1rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.9rem;
  border:1px solid rgba(201,168,76,.28);
  border-radius:var(--r-sm,3px);
  background:linear-gradient(180deg,rgba(201,168,76,.09),rgba(255,255,255,.03));
}
.rep-resume-card[hidden]{display:none!important}
.rep-resume-card strong,
.rep-resume-card span,
.rep-resume-card small{display:block}
.rep-resume-card strong{
  color:var(--gold,#c9a84c);
  text-transform:uppercase;
  letter-spacing:.1em;
  font-size:.72rem;
  margin-bottom:.2rem;
}
.rep-resume-card span{color:var(--white,#f5f2ee);font-weight:800;line-height:1.25}
.rep-resume-card small{color:var(--muted,#888);margin-top:.2rem;line-height:1.35}
.rep-resume-actions{display:flex;gap:.55rem;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.rep-section-nav{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:.65rem;
  align-items:center;
  margin:.75rem 0 1rem;
  padding:.75rem;
  border:1px solid rgba(201,168,76,.20);
  border-radius:var(--r-sm,3px);
  background:rgba(201,168,76,.055);
}
.rep-section-nav[hidden]{display:none!important}
.rep-section-nav label{
  color:var(--gold,#c9a84c);
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:.68rem;
  font-weight:800;
  white-space:nowrap;
}
.rep-line.section{
  border-color:rgba(201,168,76,.32);
  background:rgba(201,168,76,.07);
}
.rep-line.section .rep-line-role{color:var(--gold,#c9a84c)}
@media (max-width:760px){
  .rep-resume-card{display:grid;grid-template-columns:1fr;align-items:stretch}
  .rep-resume-actions{justify-content:stretch;display:grid;grid-template-columns:1fr 1fr}
  .rep-section-nav{grid-template-columns:1fr}
}

/* V104 — bibliothèque locale multi-textes */
.rep-offline-library{
  margin-top:1rem;
  padding:1rem;
  border:1px solid rgba(201,168,76,.22);
  border-radius:var(--r-sm,3px);
  background:rgba(255,255,255,.035);
}
.rep-offline-library[hidden]{display:none!important}
.rep-offline-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
  margin-bottom:.85rem;
}
.rep-offline-head strong,
.rep-offline-head span,
.rep-offline-head small{display:block}
.rep-offline-head strong{
  color:var(--gold,#c9a84c);
  text-transform:uppercase;
  letter-spacing:.1em;
  font-size:.72rem;
  margin-bottom:.2rem;
}
.rep-offline-head span{color:var(--white,#f5f2ee);font-weight:800}
.rep-offline-head small{color:var(--muted,#888);line-height:1.35;text-align:right;max-width:24rem}
.rep-offline-list{
  display:grid;
  gap:.65rem;
}
.rep-offline-item{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:.8rem;
  padding:.8rem;
  border:1px solid rgba(255,255,255,.08);
  border-radius:var(--r-sm,3px);
  background:rgba(0,0,0,.18);
}
.rep-offline-item strong,
.rep-offline-item small{display:block}
.rep-offline-item strong{color:var(--white,#f5f2ee);line-height:1.25}
.rep-offline-item small{color:var(--muted,#888);margin-top:.22rem;line-height:1.35}
.rep-offline-actions{display:flex;gap:.45rem;align-items:center;justify-content:flex-end;flex-wrap:wrap}
@media (max-width:760px){
  .rep-offline-head{display:block}
  .rep-offline-head small{text-align:left;margin-top:.35rem;max-width:none}
  .rep-offline-item{grid-template-columns:1fr}
  .rep-offline-actions{display:grid;grid-template-columns:1fr 1fr;justify-content:stretch}
}

/* V106 — contraste renforcé Assistant répétition
   Objectif : éviter les fonds dorés trop clairs avec texte blanc, notamment sur mobile. */
:root{
  --rep-bg-soft:#141414;
  --rep-bg-deep:#0f0f0f;
  --rep-gold-soft:rgba(201,168,76,.10);
  --rep-gold-border:rgba(201,168,76,.48);
  --rep-gold-text:#f1d37a;
  --rep-text:#f7f3ec;
  --rep-muted:#c7c0b5;
}

/* Champs / sélecteurs : contraste haut, y compris sur mobile */
.rep-select,
.rep-file,
.rep-textarea,
.rep-doc-loader select,
.rep-options select,
.rep-section-nav select,
.rep-role-voice-item select,
.rep-role-panel select,
.rep-advanced-text textarea{
  background:#101010 !important;
  color:var(--rep-text) !important;
  border:1px solid rgba(255,255,255,.22) !important;
  box-shadow:none !important;
}
.rep-select option,
.rep-options select option,
.rep-section-nav select option,
.rep-role-panel select option{
  background:#101010 !important;
  color:var(--rep-text) !important;
}
.rep-select:focus,
.rep-file:focus,
.rep-textarea:focus{
  outline:2px solid rgba(241,211,122,.75) !important;
  outline-offset:2px;
  border-color:rgba(241,211,122,.75) !important;
}

/* Badges dorés : fond sombre, pas jaune plein */
.rep-status-pill,
.rep-mini-status,
.rep-tag,
.rep-counter,
.rep-note,
.rep-section-nav,
.rep-resume-card,
.rep-offline-library{
  background:linear-gradient(180deg,rgba(22,22,22,.98),rgba(12,12,12,.98)) !important;
  border-color:var(--rep-gold-border) !important;
  color:var(--rep-gold-text) !important;
}
.rep-note,
.rep-section-nav label,
.rep-resume-card strong,
.rep-offline-head strong,
.rep-options-details summary span,
.rep-advanced-text summary,
.rep-advanced-text summary span{
  color:var(--rep-gold-text) !important;
}
.rep-help,
.rep-options-details summary small,
.rep-advanced-text summary small,
.rep-offline-head small,
.rep-offline-item small,
.rep-resume-card small,
.rep-role-read-head small,
.rep-role-voice-details summary small,
.rep-role-voice-note,
.rep-line-note{
  color:var(--rep-muted) !important;
}

/* Petits carrés/points dorés plus discrets */
.rep-app-docs .rep-section-head h2::before,
.rep-role-panel h2::before,
.rep-player h2::before{
  background:var(--rep-gold-text) !important;
  box-shadow:0 0 0 3px rgba(201,168,76,.12);
}

/* Boutons : contraste renforcé */
.rep-btn{
  background:#161616 !important;
  color:var(--rep-text) !important;
  border-color:rgba(255,255,255,.24) !important;
}
.rep-btn:hover:not(:disabled){
  background:#202020 !important;
  border-color:rgba(255,255,255,.42) !important;
  color:#fff !important;
}
.rep-btn-primary{
  background:linear-gradient(180deg,#e22a22,#b91814) !important;
  border-color:#ff5a50 !important;
  color:#fff !important;
  text-shadow:0 1px 1px rgba(0,0,0,.35);
}
.rep-btn-primary:hover:not(:disabled){
  background:linear-gradient(180deg,#f13a32,#c8201a) !important;
}
.rep-btn-memory{
  background:#17130a !important;
  color:var(--rep-gold-text) !important;
  border-color:rgba(241,211,122,.58) !important;
}
.rep-btn-danger{
  background:#24100f !important;
  color:#ffb4af !important;
  border-color:rgba(255,120,112,.58) !important;
}
.rep-btn:disabled{
  background:#202020 !important;
  color:#8d8d8d !important;
  border-color:rgba(255,255,255,.10) !important;
}

/* Cartes rôles / lignes : jamais de jaune clair derrière du blanc */
.rep-role-card,
.rep-line,
.rep-current,
.rep-role-read-item,
.rep-role-voice-item,
.rep-offline-item{
  background:var(--rep-bg-deep) !important;
  color:var(--rep-text) !important;
}
.rep-role-card.is-active,
.rep-line.active,
.rep-line.own.active,
.rep-current.is-own,
.rep-line.section{
  background:linear-gradient(180deg,#211a0d,#111) !important;
  border-color:rgba(241,211,122,.72) !important;
  color:var(--rep-text) !important;
}
.rep-current.is-other{
  background:linear-gradient(180deg,#26100f,#111) !important;
  border-color:rgba(255,122,115,.58) !important;
}
.rep-role-card strong,
.rep-role-card span,
.rep-line-text,
.rep-current-text,
.rep-offline-item strong,
.rep-resume-card span,
.rep-offline-head span,
.rep-role-read-head strong,
.rep-role-voice-details summary,
.rep-role-voice-item > span{
  color:var(--rep-text) !important;
}
.rep-role-card.is-active span,
.rep-line.own .rep-line-role,
.rep-current-role,
.rep-line.section .rep-line-role{
  color:var(--rep-gold-text) !important;
}
.rep-line.other .rep-line-role{
  color:#ffb4af !important;
}
.rep-line-role{
  color:#d7d0c3 !important;
}
.rep-role-read-item.is-muted,
.rep-line.ignored{
  opacity:.72;
}
.rep-line.own.is-masked .rep-line-text{
  color:#d7d0c3 !important;
}

/* Barre de progression lisible sur fond sombre */
.rep-meter{
  background:#080808 !important;
  border-color:rgba(255,255,255,.16) !important;
}
.rep-meter span{
  background:linear-gradient(90deg,#e22a22,#f1d37a) !important;
}

/* Mobile : boutons pleine largeur plus lisibles */
@media (max-width:760px){
  .rep-btn{min-height:46px;}
  .rep-actions-player .rep-btn{font-size:.95rem;}
  .rep-current-text{font-size:1.35rem;}
}


/* ================================================================
   V108 — commandes flottantes au-dessus de la bottom nav
   Objectif : garder Play / Stop / Précédent / Suivant accessibles
   sans chevauchement avec la navigation basse FTS.
   ================================================================ */
:root{
  --rep-bottom-nav-offset: calc(78px + env(safe-area-inset-bottom, 0px));
  --rep-floating-gap: 12px;
}
.rep-shell{
  padding-bottom:260px !important;
}
.rep-actions-player{
  position:fixed !important;
  left:50% !important;
  bottom:calc(var(--rep-bottom-nav-offset) + var(--rep-floating-gap)) !important;
  transform:translateX(-50%) !important;
  z-index:1190 !important;
  width:min(1120px, calc(100vw - 22px)) !important;
  display:grid !important;
  grid-template-columns:repeat(6, minmax(0, 1fr)) !important;
  gap:.5rem !important;
  align-items:stretch !important;
  padding:.65rem !important;
  border:1px solid rgba(241,211,122,.45) !important;
  border-radius:18px !important;
  background:rgba(8,8,8,.94) !important;
  box-shadow:0 18px 46px rgba(0,0,0,.58), 0 0 0 1px rgba(255,255,255,.05) inset !important;
  backdrop-filter:blur(16px) saturate(1.15) !important;
  -webkit-backdrop-filter:blur(16px) saturate(1.15) !important;
}
.rep-actions-player .rep-btn{
  flex:unset !important;
  width:100% !important;
  min-width:0 !important;
  min-height:46px !important;
  white-space:normal !important;
  line-height:1.08 !important;
  padding:.65rem .55rem !important;
}

/* Tous les boutons du module répétition passent sur le jaune FTS + texte noir. */
.rep-btn,
.rep-btn-primary,
.rep-btn-memory,
.rep-btn-danger,
a.rep-btn{
  background:linear-gradient(180deg, #f6dc82 0%, #d6af42 100%) !important;
  border-color:#f6dc82 !important;
  color:#101010 !important;
  text-shadow:none !important;
  font-weight:900 !important;
  box-shadow:0 8px 18px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.35) !important;
}
.rep-btn:hover:not(:disabled),
.rep-btn-primary:hover:not(:disabled),
.rep-btn-memory:hover:not(:disabled),
.rep-btn-danger:hover:not(:disabled),
a.rep-btn:hover:not(:disabled){
  background:linear-gradient(180deg, #ffe89a 0%, #e5bf50 100%) !important;
  border-color:#ffe89a !important;
  color:#050505 !important;
  transform:translateY(-1px);
}
.rep-btn:active:not(:disabled),
.rep-btn-primary:active:not(:disabled),
.rep-btn-memory:active:not(:disabled),
.rep-btn-danger:active:not(:disabled){
  transform:translateY(0) scale(.99);
}
.rep-btn:disabled,
.rep-btn-primary:disabled,
.rep-btn-memory:disabled,
.rep-btn-danger:disabled{
  background:#242424 !important;
  border-color:rgba(255,255,255,.14) !important;
  color:#8f8f8f !important;
  box-shadow:none !important;
  text-shadow:none !important;
  cursor:not-allowed !important;
}

@media (max-width:760px){
  :root{
    --rep-bottom-nav-offset: calc(70px + env(safe-area-inset-bottom, 0px));
    --rep-floating-gap: 10px;
  }
  .rep-shell{
    padding-bottom:330px !important;
  }
  .rep-actions-player{
    width:calc(100vw - 16px) !important;
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:.45rem !important;
    padding:.55rem !important;
    border-radius:16px !important;
  }
  .rep-actions-player .rep-btn{
    min-height:44px !important;
    font-size:.86rem !important;
    padding:.55rem .45rem !important;
  }
}
@media (min-width:761px) and (max-width:1040px){
  :root{
    --rep-bottom-nav-offset: 92px;
    --rep-floating-gap: 12px;
  }
  .rep-shell{
    padding-bottom:300px !important;
  }
  .rep-actions-player{
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (min-width:860px){
  :root{
    --rep-bottom-nav-offset: 92px;
    --rep-floating-gap: 12px;
  }
}


/* ================================================================
   V109 — contrôles collés à la bottom nav, au-dessus du script
   - Corrige l'empilement : la barre reste cliquable au-dessus des cartes.
   - Réduit fortement la marge de sécurité excessive.
   - Colle visuellement les contrôles à la nav basse sans la masquer.
   ================================================================ */
:root{
  --rep-bottom-nav-height: calc(62px + env(safe-area-inset-bottom, 0px));
  --rep-control-gap: 2px;
  --rep-control-height: 74px;
}
.rep-player{
  z-index: 5000 !important;
  position: relative !important;
}
.rep-actions-player{
  position: fixed !important;
  left: 50% !important;
  bottom: calc(var(--rep-bottom-nav-height) + var(--rep-control-gap)) !important;
  transform: translateX(-50%) !important;
  z-index: 9999 !important;
  pointer-events: auto !important;
  isolation: isolate !important;
  width: min(1120px, calc(100vw - 16px)) !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  border-radius: 16px 16px 10px 10px !important;
}
.rep-shell{
  padding-bottom: calc(var(--rep-bottom-nav-height) + var(--rep-control-height) + 26px) !important;
}
.rep-card.card:not(.rep-player){
  z-index: 1 !important;
}

@media (max-width:760px){
  :root{
    --rep-bottom-nav-height: calc(56px + env(safe-area-inset-bottom, 0px));
    --rep-control-gap: 0px;
    --rep-control-height: 150px;
  }
  .rep-actions-player{
    width: calc(100vw - 12px) !important;
    bottom: calc(var(--rep-bottom-nav-height) + var(--rep-control-gap)) !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .38rem !important;
    padding: .48rem !important;
    border-radius: 14px 14px 8px 8px !important;
    max-height: 150px !important;
    overflow: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .rep-actions-player .rep-btn{
    min-height: 40px !important;
    font-size: .82rem !important;
    padding: .48rem .38rem !important;
  }
}

@media (min-width:761px) and (max-width:1040px){
  :root{
    --rep-bottom-nav-height: 72px;
    --rep-control-gap: 6px;
    --rep-control-height: 128px;
  }
  .rep-actions-player{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width:860px){
  :root{
    --rep-bottom-nav-height: 74px;
    --rep-control-gap: 6px;
  }
}

/* ================================================================
   V110 — parcours simple, profils de répétition, répliques difficiles
   ================================================================ */
.rep-presets-card{
  border-color:rgba(241,211,122,.26) !important;
}
.rep-preset-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.75rem;
  margin-top:.85rem;
}
.rep-preset-card{
  border:1px solid rgba(241,211,122,.28);
  border-radius:18px;
  padding:1rem;
  text-align:left;
  background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.025));
  color:var(--white,#f5f2ee);
  cursor:pointer;
  min-height:112px;
  transition:transform .16s ease,border-color .16s ease,background .16s ease;
}
.rep-preset-card strong,
.rep-preset-card span{display:block;line-height:1.3}
.rep-preset-card strong{font-size:1rem;color:#fff;margin-bottom:.35rem}
.rep-preset-card span{font-size:.88rem;color:#d7d0c3}
.rep-preset-card:hover,
.rep-preset-card.is-active{
  transform:translateY(-1px);
  border-color:#f6dc82;
  background:linear-gradient(180deg,rgba(246,220,130,.18),rgba(246,220,130,.06));
}
.rep-preset-card.is-active strong::before{content:'✓ ';color:#f6dc82}
.rep-btn-star.is-active{
  background:linear-gradient(180deg,#ffe89a 0%,#f2c94c 100%) !important;
  border-color:#ffe89a !important;
  color:#050505 !important;
}
.rep-line.difficult{
  border-color:rgba(246,220,130,.55) !important;
  background:linear-gradient(180deg,rgba(246,220,130,.10),rgba(255,255,255,.03)) !important;
}
.rep-line-star{
  color:#f6dc82 !important;
  font-weight:900;
}
.rep-current.is-difficult{
  border-color:rgba(246,220,130,.72) !important;
  box-shadow:0 0 0 1px rgba(246,220,130,.18) inset,0 18px 44px rgba(0,0,0,.28) !important;
}
.rep-current.is-focus-difficult{
  background:radial-gradient(circle at top left,rgba(246,220,130,.20),transparent 42%),rgba(20,20,20,.94) !important;
}

@media (min-width:1041px){
  .rep-actions-player{
    grid-template-columns:repeat(9,minmax(0,1fr)) !important;
  }
}
@media (max-width:760px){
  .rep-preset-grid{grid-template-columns:1fr;gap:.55rem}
  .rep-preset-card{min-height:auto;padding:.85rem}
  :root{--rep-control-height:205px;}
  .rep-actions-player{max-height:205px !important;}
}
@media (min-width:761px) and (max-width:1040px){
  :root{--rep-control-height:160px;}
  .rep-actions-player{grid-template-columns:repeat(3,minmax(0,1fr)) !important;max-height:160px !important;overflow:auto !important;}
  .rep-preset-grid{grid-template-columns:1fr 1fr 1fr;}
}

/* ================================================================
   V111 — Refonte UX en écrans + contrôles compacts
   Ne modifie pas le moteur : seulement l'affichage.
   ================================================================ */
body[data-rep-view]{
  --rep-bottom-nav-height: calc(58px + env(safe-area-inset-bottom, 0px));
  --rep-control-height: 54px;
  --rep-control-gap: 0px;
}
.rep-stepbar{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.45rem;
  margin:-.35rem 0 1rem;
}
.rep-step{
  min-height:38px;
  border:1px solid rgba(201,168,76,.22);
  background:rgba(255,255,255,.035);
  color:var(--muted,#888);
  border-radius:999px;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.04em;
  cursor:pointer;
}
.rep-step.is-active{
  background:var(--gold,#c9a84c);
  color:#070707;
  border-color:var(--gold,#c9a84c);
}
.rep-view{display:none!important;}
body[data-rep-view="library"] .rep-view-library,
body[data-rep-view="role"] .rep-view-role,
body[data-rep-view="mode"] .rep-view-mode,
body[data-rep-view="settings"] .rep-view-settings,
body[data-rep-view="rehearse"] .rep-view-rehearse{display:block!important;}
body[data-rep-view="role"] .rep-grid-2.rep-view-role,
body[data-rep-view="settings"] .rep-grid-2.rep-view-settings{display:grid!important;}
body[data-rep-view="mode"] .rep-options-card{display:none!important;}
body[data-rep-view="settings"] .rep-options-card{display:block!important;}
body[data-rep-view="rehearse"] .rep-script-card{display:none!important;}
body[data-rep-view="rehearse"].rep-show-script .rep-script-card{display:block!important;}
.rep-view-head{
  display:flex;
  align-items:center;
  gap:.65rem;
  margin-bottom:.65rem;
}
.rep-view-head h2{margin:0!important;}
.rep-view-head-inline{margin:0 0 .35rem;}
.rep-icon-btn{
  width:38px;
  height:38px;
  border:1px solid rgba(201,168,76,.35);
  border-radius:999px;
  background:rgba(201,168,76,.09);
  color:var(--gold,#c9a84c);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  cursor:pointer;
}
.rep-icon-btn:hover{background:var(--gold,#c9a84c);color:#080808;}
.rep-mode-actions{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:.65rem;
  margin-top:1rem;
}
.rep-player-tools{
  display:flex;
  align-items:center;
  gap:.45rem;
  flex-wrap:wrap;
  justify-content:flex-end;
}
body[data-rep-view="rehearse"] .rep-hero,
body[data-rep-view="settings"] .rep-hero{margin-bottom:.75rem;}
body[data-rep-view="rehearse"] .rep-lead,
body[data-rep-view="settings"] .rep-lead{display:none;}
body[data-rep-view="rehearse"] .rep-stepbar{display:none;}
body[data-rep-view="rehearse"] .rep-shell{
  padding-bottom: calc(var(--rep-bottom-nav-height) + var(--rep-control-height) + 18px) !important;
}
body[data-rep-view="rehearse"] .rep-player{
  margin-bottom: .6rem;
}
body[data-rep-view="rehearse"] .rep-actions-player{
  position:fixed !important;
  left:max(10px, env(safe-area-inset-left, 0px));
  right:max(10px, env(safe-area-inset-right, 0px));
  bottom:calc(var(--rep-bottom-nav-height) + var(--rep-control-gap)) !important;
  z-index:9999 !important;
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:.38rem;
  align-items:center;
  padding:.45rem;
  min-height:var(--rep-control-height);
  max-height:none !important;
  overflow:visible !important;
  border:1px solid rgba(201,168,76,.28);
  border-radius:18px 18px 0 0;
  background:rgba(10,10,10,.96);
  box-shadow:0 -12px 32px rgba(0,0,0,.42);
  backdrop-filter:blur(12px);
}
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
  min-height:38px !important;
  height:38px;
  padding:.35rem .45rem !important;
  border-radius:12px !important;
  font-size:.78rem !important;
  letter-spacing:0 !important;
  text-transform:none !important;
  white-space:nowrap;
  min-width:0;
  flex:unset !important;
}
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn-primary,
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn-memory,
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn-danger,
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn-star,
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
  background:var(--gold,#c9a84c) !important;
  border-color:var(--gold,#c9a84c) !important;
  color:#050505 !important;
  font-family:inherit !important;
}
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn:disabled{
  display:none !important;
}
body[data-rep-view="rehearse"] .rep-actions-player #repReviewDifficultBtn,
body[data-rep-view="rehearse"] .rep-actions-player #repExitDifficultBtn{
  display:none !important;
}
body[data-rep-view="rehearse"].is-awaiting-user .rep-actions-player{
  grid-template-columns:repeat(4,minmax(0,1fr));
}
body[data-rep-view="rehearse"].is-awaiting-user .rep-actions-player #repContinueBtn{
  grid-column:span 2;
  font-weight:900;
}
body[data-rep-view="rehearse"] .rep-current{
  min-height:220px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
body[data-rep-view="rehearse"] .rep-current-text{
  font-size:clamp(1.25rem, 4vw, 2.15rem);
  line-height:1.35;
}
body[data-rep-view="rehearse"] .rep-card.card{
  box-shadow:0 12px 30px rgba(0,0,0,.22);
}
body[data-rep-view="library"] .rep-shell{padding-bottom:calc(var(--rep-bottom-nav-height) + 30px) !important;}
.rep-offline-actions{grid-template-columns:auto auto auto;}
.rep-offline-actions .rep-btn{min-width:0;}
@media(max-width:760px){
  .rep-stepbar{grid-template-columns:repeat(4,1fr);gap:.3rem;}
  .rep-step{font-size:.62rem;min-height:34px;padding:0 .25rem;}
  body[data-rep-view="role"] .rep-grid-2.rep-view-role,
  body[data-rep-view="settings"] .rep-grid-2.rep-view-settings{display:flex!important;flex-direction:column;}
  .rep-mode-actions{grid-template-columns:1fr;}
  .rep-player-head{display:grid;grid-template-columns:1fr;gap:.7rem;}
  .rep-player-tools{justify-content:flex-start;}
  body[data-rep-view="rehearse"] .rep-actions-player{
    left:8px;right:8px;
    gap:.32rem;
    padding:.38rem;
    border-radius:16px 16px 0 0;
  }
  body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
    height:36px;
    min-height:36px !important;
    font-size:.72rem !important;
    padding:.25rem .34rem !important;
  }
  body[data-rep-view="rehearse"] .rep-current{min-height:190px;}
}
@media(max-width:390px){
  body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{font-size:.68rem!important;}
  .rep-step{font-size:.58rem;}
}


/* ================================================================
   V112 — corrections UX répétition
   - textes simplifiés
   - barre compacte dans un ordre stable
   - retour début
   - évite les boutons qui changent de place
   ================================================================ */
body[data-rep-view="rehearse"]{
  --rep-control-height: 50px;
}
body[data-rep-view="rehearse"] .rep-actions-player{
  grid-template-columns:repeat(8,minmax(0,1fr)) !important;
  min-height:50px !important;
  padding:.32rem .38rem !important;
  gap:.28rem !important;
  border-radius:14px 14px 0 0 !important;
}
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
  height:34px !important;
  min-height:34px !important;
  padding:.18rem .28rem !important;
  font-size:.68rem !important;
  border-radius:10px !important;
  line-height:1.05 !important;
}
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn:disabled{
  display:inline-flex !important;
  opacity:.34 !important;
  filter:grayscale(.25);
  pointer-events:none;
}
body[data-rep-view="rehearse"] .rep-actions-player #repContinueBtn,
body[data-rep-view="rehearse"] .rep-actions-player #repCueBtn,
body[data-rep-view="rehearse"] .rep-actions-player #repDifficultBtn{
  display:inline-flex !important;
}
body[data-rep-view="rehearse"] .rep-actions-player #repReviewDifficultBtn,
body[data-rep-view="rehearse"] .rep-actions-player #repExitDifficultBtn{
  display:none !important;
}
body[data-rep-view="rehearse"] .rep-current{
  min-height:170px !important;
}
body[data-rep-view="rehearse"] .rep-current-text{
  font-size:clamp(1.12rem, 3.45vw, 1.9rem) !important;
}
body[data-rep-view="rehearse"] .rep-shell{
  padding-bottom: calc(var(--rep-bottom-nav-height) + 68px) !important;
}
@media(max-width:760px){
  body[data-rep-view="rehearse"] .rep-actions-player{
    left:6px !important;
    right:6px !important;
    grid-template-columns:repeat(8,minmax(0,1fr)) !important;
    gap:.2rem !important;
    padding:.28rem !important;
  }
  body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
    height:32px !important;
    min-height:32px !important;
    font-size:.62rem !important;
    padding:.12rem .14rem !important;
  }
  body[data-rep-view="rehearse"] .rep-current{min-height:150px !important;}
  body[data-rep-view="rehearse"] .rep-player-head{gap:.45rem !important;}
}

/* ================================================================
   V113 — correction barre de contrôle mobile
   - Annule les anciens centrages transform/left:50% qui pouvaient décaler la barre hors écran.
   - Force une barre bornée à la largeur du viewport.
   - Garde les boutons dans un ordre stable et cliquables.
   ================================================================ */
body[data-rep-view="rehearse"] .rep-actions-player{
  left: max(4px, env(safe-area-inset-left, 0px)) !important;
  right: max(4px, env(safe-area-inset-right, 0px)) !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  transform: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  overflow: hidden !important;
}
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
@media(max-width:760px){
  body[data-rep-view="rehearse"] .rep-actions-player{
    left: max(3px, env(safe-area-inset-left, 0px)) !important;
    right: max(3px, env(safe-area-inset-right, 0px)) !important;
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    gap: .16rem !important;
    padding: .24rem !important;
  }
  body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
    font-size: .58rem !important;
    letter-spacing: -.02em !important;
    padding-left: .08rem !important;
    padding-right: .08rem !important;
  }
}
@media(max-width:360px){
  body[data-rep-view="rehearse"] .rep-actions-player{
    gap: .12rem !important;
    padding: .2rem !important;
  }
  body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
    font-size: .52rem !important;
  }
}


/* ================================================================
   V114 — barre vraiment responsive + texte utilisateur simplifié
   - Evite tout débordement horizontal sur mobile.
   - Conserve la barre collée à la navigation basse.
   - Les boutons restent accessibles même sur petits écrans.
   ================================================================ */
html, body{
  overflow-x:hidden !important;
}
body[data-rep-view="rehearse"] .rep-actions-player{
  position: fixed !important;
  z-index: 9999 !important;
  left: calc(env(safe-area-inset-left, 0px) + 4px) !important;
  right: calc(env(safe-area-inset-right, 0px) + 4px) !important;
  bottom: calc(var(--rep-bottom-nav-height, 64px) + env(safe-area-inset-bottom, 0px) + 2px) !important;
  width: auto !important;
  max-width: calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 8px) !important;
  min-width: 0 !important;
  transform:none !important;
  box-sizing:border-box !important;
  display:grid !important;
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  gap:.14rem !important;
  padding:.22rem !important;
  border-radius:18px 18px 0 0 !important;
  overflow:visible !important;
}
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
  height:30px !important;
  min-height:30px !important;
  padding:.08rem .06rem !important;
  font-size:.56rem !important;
  line-height:1 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
body[data-rep-view="rehearse"] .rep-shell{
  padding-bottom: calc(var(--rep-bottom-nav-height, 64px) + 54px + env(safe-area-inset-bottom, 0px)) !important;
}
@media(max-width:380px){
  body[data-rep-view="rehearse"] .rep-actions-player{
    left: calc(env(safe-area-inset-left, 0px) + 2px) !important;
    right: calc(env(safe-area-inset-right, 0px) + 2px) !important;
    max-width: calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 4px) !important;
    gap:.1rem !important;
    padding:.18rem !important;
  }
  body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
    font-size:.5rem !important;
    padding-left:.04rem !important;
    padding-right:.04rem !important;
  }
}


/* ================================================================
   V115 — lisibilité boutons + option nom du personnage
   - Libellés courts sur la barre de répétition.
   - Boutons plus compacts et non coupés sur petits écrans.
   ================================================================ */
body[data-rep-view="rehearse"] .rep-actions-player{
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  gap: .12rem !important;
  padding: .18rem .2rem !important;
}
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
  height: 30px !important;
  min-height: 30px !important;
  font-size: .58rem !important;
  font-weight: 850 !important;
  letter-spacing: -.035em !important;
  padding: .05rem .04rem !important;
  line-height: .95 !important;
  border-radius: 9px !important;
}
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn-mini{
  font-size: .76rem !important;
  letter-spacing: 0 !important;
}
@media(max-width:430px){
  body[data-rep-view="rehearse"] .rep-actions-player{
    gap: .08rem !important;
    padding: .16rem !important;
  }
  body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
    height: 28px !important;
    min-height: 28px !important;
    font-size: .52rem !important;
    border-radius: 8px !important;
  }
  body[data-rep-view="rehearse"] .rep-actions-player .rep-btn-mini{
    font-size: .7rem !important;
  }
}
@media(max-width:360px){
  body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
    font-size: .48rem !important;
  }
  body[data-rep-view="rehearse"] .rep-actions-player .rep-btn-mini{
    font-size: .64rem !important;
  }
}

/* ================================================================
   V116 — barre mobile lisible + actions bibliothèque compactes
   - Plus de texte coupé dans les boutons.
   - Barre de répétition en deux lignes sur mobile : navigation puis actions.
   - Boutons alignés avec le contour or FTS.
   ================================================================ */
body[data-rep-view="rehearse"]{
  --rep-control-height: 92px;
}
body[data-rep-view="rehearse"] .rep-actions-player{
  border:1px solid rgba(246,220,130,.72) !important;
  background:linear-gradient(180deg,rgba(12,12,12,.98),rgba(4,4,4,.98)) !important;
  box-shadow:0 -10px 30px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04) inset !important;
}
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
  background:linear-gradient(180deg,#ffe45c 0%,#e0b900 100%) !important;
  border:1px solid rgba(255,238,128,.95) !important;
  color:#080808 !important;
  box-shadow:0 5px 12px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.45) !important;
  overflow:hidden !important;
  text-overflow:clip !important;
  white-space:nowrap !important;
}
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn:disabled{
  background:linear-gradient(180deg,#4a4312 0%,#28250b 100%) !important;
  border-color:rgba(246,220,130,.22) !important;
  color:rgba(255,238,128,.34) !important;
  opacity:1 !important;
}
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn-mini,
body[data-rep-view="rehearse"] .rep-actions-player #repDifficultBtn{
  font-size:1rem !important;
  letter-spacing:0 !important;
}
body[data-rep-view="rehearse"] .rep-shell{
  padding-bottom: calc(var(--rep-bottom-nav-height, 64px) + var(--rep-control-height) + env(safe-area-inset-bottom, 0px) + 12px) !important;
}

/* Bibliothèque locale : boutons lisibles sur mobile */
.rep-offline-actions{
  display:grid !important;
  grid-template-columns:minmax(130px,1fr) 42px 42px !important;
  gap:.4rem !important;
  align-items:center !important;
  justify-content:stretch !important;
}
.rep-offline-actions .rep-btn{
  width:100% !important;
  min-width:0 !important;
  min-height:40px !important;
  padding:.5rem .55rem !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.rep-offline-actions .rep-btn-icon-only,
.rep-offline-actions [data-offline-settings]{
  width:42px !important;
  min-width:42px !important;
  padding:0 !important;
  font-size:1rem !important;
}
.rep-resume-actions .rep-btn{
  min-width:110px !important;
}

@media(max-width:760px){
  body[data-rep-view="rehearse"]{
    --rep-control-height: 92px;
  }
  body[data-rep-view="rehearse"] .rep-actions-player{
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
    grid-auto-rows:38px !important;
    gap:.34rem !important;
    padding:.42rem !important;
    border-radius:16px 16px 0 0 !important;
  }
  body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
    height:38px !important;
    min-height:38px !important;
    border-radius:12px !important;
    font-size:.78rem !important;
    line-height:1 !important;
    padding:.15rem .25rem !important;
    letter-spacing:0 !important;
  }
  body[data-rep-view="rehearse"] .rep-actions-player .rep-btn-mini,
  body[data-rep-view="rehearse"] .rep-actions-player #repDifficultBtn{
    font-size:1.05rem !important;
    padding:0 !important;
  }
  body[data-rep-view="rehearse"] .rep-actions-player #repRestartBtn{order:1;}
  body[data-rep-view="rehearse"] .rep-actions-player #repPrevBtn{order:2;}
  body[data-rep-view="rehearse"] .rep-actions-player #repStartBtn{order:3;}
  body[data-rep-view="rehearse"] .rep-actions-player #repStopBtn{order:4;}
  body[data-rep-view="rehearse"] .rep-actions-player #repNextBtn{order:5;}
  body[data-rep-view="rehearse"] .rep-actions-player #repContinueBtn{order:6;grid-column:span 2;font-size:.82rem !important;font-weight:950 !important;}
  body[data-rep-view="rehearse"] .rep-actions-player #repCueBtn{order:7;grid-column:span 2;font-size:.82rem !important;font-weight:950 !important;}
  body[data-rep-view="rehearse"] .rep-actions-player #repDifficultBtn{order:8;grid-column:span 1;}
  body[data-rep-view="rehearse"] .rep-actions-player #repReviewDifficultBtn,
  body[data-rep-view="rehearse"] .rep-actions-player #repExitDifficultBtn{
    display:none !important;
  }
  .rep-offline-actions{
    grid-template-columns:minmax(120px,1fr) 42px 42px !important;
  }
  .rep-offline-actions .rep-btn{min-height:42px !important;}
}

@media(max-width:360px){
  body[data-rep-view="rehearse"] .rep-actions-player{
    gap:.24rem !important;
    padding:.34rem !important;
  }
  body[data-rep-view="rehearse"] .rep-actions-player .rep-btn{
    font-size:.72rem !important;
  }
  body[data-rep-view="rehearse"] .rep-actions-player .rep-btn-mini,
  body[data-rep-view="rehearse"] .rep-actions-player #repDifficultBtn{
    font-size:.98rem !important;
  }
  .rep-offline-actions{
    grid-template-columns:minmax(110px,1fr) 40px 40px !important;
    gap:.3rem !important;
  }
  .rep-offline-actions .rep-btn-icon-only,
  .rep-offline-actions [data-offline-settings]{
    width:40px !important;
    min-width:40px !important;
  }
}


/* V117 — éditeur texte détecté plus lisible */
.rep-editor-preview{
  margin-top:10px;
  padding:12px;
  border:1px solid rgba(245,207,74,.28);
  border-radius:16px;
  background:rgba(0,0,0,.25);
  max-height:260px;
  overflow:auto;
  color:#fff7d2;
  font-size:.94rem;
  line-height:1.55;
}
.rep-preview-line{
  padding:8px 0;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.rep-preview-line strong{
  color:#ffe733;
  letter-spacing:.03em;
}
.rep-preview-line em,
.rep-preview-continuation em,
.rep-preview-stage em{
  color:#f6dca0;
  font-style:italic;
  opacity:.95;
}
.rep-preview-section{
  margin:12px 0 6px;
  padding:7px 10px;
  border-radius:999px;
  display:inline-block;
  background:rgba(245,207,74,.14);
  border:1px solid rgba(245,207,74,.32);
  color:#ffe733;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.78rem;
}
.rep-preview-stage,
.rep-preview-continuation{
  padding:7px 0;
  color:#e8dcc5;
  border-bottom:1px dashed rgba(255,255,255,.07);
}
.rep-preview-muted{
  margin:0;
  color:rgba(255,255,255,.64);
}
.rep-textarea{
  line-height:1.6;
  white-space:pre-wrap;
}

/* ================================================================
   V118 — accès clair aux répliques à revoir
   ================================================================ */
.rep-btn-review{
  background:var(--gold,#f6d400) !important;
  border-color:var(--gold,#f6d400) !important;
  color:#050505 !important;
  font-weight:900 !important;
}
.rep-offline-actions.has-review{
  grid-template-columns:minmax(110px,1fr) minmax(110px,1fr) 42px 42px !important;
}
.rep-resume-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  align-items:center;
  justify-content:flex-end;
}
.rep-resume-actions .rep-btn-review{
  min-width:120px !important;
}
@media(max-width:760px){
  .rep-offline-actions.has-review{
    grid-template-columns:1fr 1fr 42px 42px !important;
  }
  .rep-offline-actions.has-review .rep-btn{
    min-height:42px !important;
    font-size:.82rem !important;
    padding:.35rem .42rem !important;
  }
  .rep-resume-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }
  .rep-resume-actions .rep-btn{
    width:100%;
  }
  .rep-resume-actions #repForgetResumeBtn{
    grid-column:span 2;
  }
}
@media(max-width:380px){
  .rep-offline-actions.has-review{
    grid-template-columns:1fr 1fr !important;
  }
  .rep-offline-actions.has-review .rep-btn-icon-only,
  .rep-offline-actions.has-review [data-offline-settings]{
    min-width:0 !important;
  }
}

/* V121 — cartes enregistrées premium, lisibles et compactes
   Objectif : carte premium + badge rôle réel + boutons arrondis, sans gros carrés. */
.rep-offline-premium{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:.9rem;
  align-items:center;
  padding:1rem !important;
  border:1px solid rgba(201,168,76,.30) !important;
  border-radius:18px !important;
  background:
    radial-gradient(circle at 0 0,rgba(201,168,76,.13),transparent 34%),
    linear-gradient(180deg,rgba(25,25,25,.98),rgba(11,11,11,.98)) !important;
  box-shadow:0 14px 34px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.045);
}
.rep-offline-premium::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:3px;
  background:linear-gradient(180deg,#f3d77c,#c9a84c,transparent);
  opacity:.95;
}
.rep-offline-main{min-width:0;}
.rep-offline-title-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.65rem;
  margin-bottom:.55rem;
}
.rep-offline-title-row strong{
  display:block;
  color:var(--white,#f5f2ee)!important;
  font-size:1rem;
  font-weight:900;
  line-height:1.18;
  letter-spacing:.01em;
  overflow-wrap:anywhere;
}
.rep-offline-role{
  flex:0 0 auto;
  max-width:48%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.28rem;
  padding:.28rem .58rem;
  border-radius:999px;
  border:1px solid rgba(201,168,76,.46);
  background:rgba(201,168,76,.12);
  color:#f3d77c!important;
  font-size:.72rem;
  font-weight:900;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}
.rep-offline-role::before{content:"🎭";font-size:.78rem;}
.rep-offline-progress{
  height:7px;
  border-radius:999px;
  background:rgba(255,255,255,.09);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.06);
  margin:.35rem 0 .55rem;
}
.rep-offline-progress span{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#f7dc7f,#c9a84c);
}
.rep-offline-meta{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
}
.rep-offline-meta span{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:.20rem .46rem;
  border-radius:999px;
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.045);
  color:rgba(245,242,238,.72)!important;
  font-size:.70rem;
  font-weight:800;
  line-height:1.12;
}
.rep-offline-actions{
  display:flex !important;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
  gap:.4rem !important;
  min-width:180px;
  max-width:280px;
}
.rep-offline-actions .rep-btn{
  width:auto !important;
  min-width:0 !important;
  min-height:36px !important;
  height:auto !important;
  padding:.48rem .72rem !important;
  border-radius:999px !important;
  font-size:.76rem !important;
  line-height:1.05 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
  white-space:nowrap !important;
}
.rep-offline-actions .rep-btn-primary{
  flex:1 1 110px;
}
.rep-btn-own{
  border-color:rgba(201,168,76,.72)!important;
  background:linear-gradient(180deg,#f6dc82,#c9a84c)!important;
  color:#090909!important;
  font-weight:950!important;
}
.rep-offline-actions .rep-btn-review{
  background:rgba(201,168,76,.12)!important;
  border-color:rgba(201,168,76,.48)!important;
  color:#f3d77c!important;
  box-shadow:none!important;
}
.rep-offline-actions .rep-btn-icon-only{
  flex:0 0 36px;
  width:36px !important;
  height:36px !important;
  padding:0 !important;
  border-radius:999px !important;
  font-size:1rem !important;
  background:rgba(255,255,255,.07)!important;
  border-color:rgba(255,255,255,.12)!important;
  color:#f5f2ee!important;
  box-shadow:none!important;
}
.rep-current.is-focus-own{
  border-color:rgba(201,168,76,.62)!important;
  background:
    radial-gradient(circle at top right,rgba(201,168,76,.18),transparent 42%),
    linear-gradient(180deg,rgba(21,21,21,.98),rgba(8,8,8,.98))!important;
}
.rep-current.is-focus-own .rep-current-role{color:var(--gold,#c9a84c)!important;}
body.rep-own-only #repContinueBtn,
body.rep-own-only #repCueBtn{display:none!important;}
.rep-resume-actions .rep-btn-own{min-width:0;}
@media (max-width:760px){
  .rep-offline-premium{
    grid-template-columns:1fr;
    gap:.75rem;
    padding:.92rem !important;
  }
  .rep-offline-title-row{
    display:flex;
    align-items:flex-start;
    gap:.5rem;
  }
  .rep-offline-role{
    max-width:44%;
    padding:.25rem .48rem;
  }
  .rep-offline-actions{
    width:100%;
    min-width:0;
    max-width:none;
    display:grid !important;
    grid-template-columns:1fr 1fr auto auto !important;
    gap:.42rem !important;
  }
  .rep-offline-actions.has-review{
    grid-template-columns:1fr 1fr 1fr auto auto !important;
  }
  .rep-offline-actions .rep-btn{
    min-height:38px !important;
    padding:.52rem .48rem !important;
    font-size:.74rem !important;
  }
  .rep-offline-actions .rep-btn-primary,
  .rep-offline-actions .rep-btn-own,
  .rep-offline-actions .rep-btn-review{
    min-width:0 !important;
    width:100% !important;
  }
  .rep-offline-actions .rep-btn-icon-only{
    width:38px !important;
    height:38px !important;
  }
}
@media (max-width:390px){
  .rep-offline-actions,
  .rep-offline-actions.has-review{
    grid-template-columns:1fr 1fr !important;
  }
  .rep-offline-actions .rep-btn-icon-only{
    width:100% !important;
    min-width:0 !important;
  }
}


/* ================================================================
   V122 — bibliothèque locale premium + correctifs boutons
   - CSS réellement chargé via repetition.css?v=122
   - boutons arrondis, compacts, alignés avec le design FTS
   - badge rôle visible
   ================================================================ */
.rep-offline-list{
  display:grid;
  gap:.85rem;
}
.rep-offline-item.rep-offline-premium{
  position:relative !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  gap:.82rem !important;
  padding:1rem !important;
  border-radius:22px !important;
  border:1px solid rgba(201,168,76,.34) !important;
  background:
    radial-gradient(circle at top left,rgba(201,168,76,.16),transparent 34%),
    linear-gradient(180deg,rgba(26,26,26,.98),rgba(9,9,9,.98)) !important;
  box-shadow:0 18px 42px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.055) !important;
  overflow:hidden !important;
}
.rep-offline-item.rep-offline-premium::before{
  content:"" !important;
  position:absolute !important;
  inset:0 auto 0 0 !important;
  width:4px !important;
  background:linear-gradient(180deg,var(--gold,#c9a84c),rgba(201,168,76,.25),transparent) !important;
}
.rep-offline-main{min-width:0 !important;}
.rep-offline-title-row{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:.62rem !important;
  align-items:start !important;
  margin:0 0 .6rem !important;
}
.rep-offline-title-row strong{
  color:var(--white,#f5f2ee) !important;
  font-family:var(--font-body,'DM Sans',sans-serif) !important;
  font-size:1.02rem !important;
  line-height:1.18 !important;
  font-weight:950 !important;
  letter-spacing:-.01em !important;
  overflow-wrap:anywhere !important;
}
.rep-offline-role{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:.28rem !important;
  max-width:42vw !important;
  padding:.32rem .62rem !important;
  border-radius:999px !important;
  border:1px solid rgba(201,168,76,.55) !important;
  background:rgba(201,168,76,.14) !important;
  color:#f4da83 !important;
  font-size:.72rem !important;
  font-weight:950 !important;
  line-height:1 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06) !important;
}
.rep-offline-role::before{
  content:"🎭" !important;
  display:inline-block !important;
  font-size:.78rem !important;
}
.rep-offline-progress{
  height:7px !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.08) !important;
  border:1px solid rgba(255,255,255,.055) !important;
  overflow:hidden !important;
  margin:.15rem 0 .55rem !important;
}
.rep-offline-progress span{
  display:block !important;
  height:100% !important;
  border-radius:inherit !important;
  background:linear-gradient(90deg,#f7df8c,var(--gold,#c9a84c)) !important;
}
.rep-offline-meta{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:.35rem !important;
}
.rep-offline-meta span{
  display:inline-flex !important;
  align-items:center !important;
  min-height:22px !important;
  padding:.22rem .48rem !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.06) !important;
  border:1px solid rgba(255,255,255,.055) !important;
  color:rgba(245,242,238,.72) !important;
  font-size:.70rem !important;
  font-weight:850 !important;
  line-height:1.1 !important;
}
.rep-offline-actions,
.rep-offline-actions.has-review{
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  display:grid !important;
  grid-template-columns:1.15fr 1.15fr 1fr 40px 40px !important;
  gap:.45rem !important;
  align-items:center !important;
  justify-content:stretch !important;
}
.rep-offline-actions:not(.has-review){
  grid-template-columns:1.2fr 1.2fr 40px 40px !important;
}
.rep-offline-actions .rep-btn,
.rep-offline-actions a.rep-btn{
  min-width:0 !important;
  width:100% !important;
  min-height:40px !important;
  height:40px !important;
  padding:.55rem .62rem !important;
  border-radius:999px !important;
  font-family:var(--font-body,'DM Sans',sans-serif) !important;
  font-size:.75rem !important;
  line-height:1 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
  font-weight:950 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  box-shadow:0 8px 18px rgba(0,0,0,.24) !important;
}
.rep-offline-actions .rep-btn-primary{
  background:linear-gradient(180deg,#f7df8c,#c9a84c) !important;
  border:1px solid rgba(255,255,255,.10) !important;
  color:#090909 !important;
}
.rep-offline-actions .rep-btn-own{
  background:rgba(201,168,76,.13) !important;
  border:1px solid rgba(201,168,76,.48) !important;
  color:#f4da83 !important;
}
.rep-offline-actions .rep-btn-review{
  background:rgba(255,255,255,.065) !important;
  border:1px solid rgba(201,168,76,.35) !important;
  color:#f4da83 !important;
}
.rep-offline-actions .rep-btn-icon-only{
  width:40px !important;
  height:40px !important;
  min-width:40px !important;
  max-width:40px !important;
  padding:0 !important;
  border-radius:50% !important;
  background:rgba(255,255,255,.075) !important;
  border:1px solid rgba(255,255,255,.12) !important;
  color:#f5f2ee !important;
  font-size:1rem !important;
  box-shadow:none !important;
}
.rep-offline-actions .rep-btn:hover:not(:disabled){
  transform:translateY(-1px) !important;
  filter:brightness(1.04) !important;
}
@media (max-width:680px){
  .rep-offline-item.rep-offline-premium{
    padding:.92rem !important;
    border-radius:20px !important;
  }
  .rep-offline-actions,
  .rep-offline-actions.has-review,
  .rep-offline-actions:not(.has-review){
    grid-template-columns:1fr 1fr !important;
    gap:.42rem !important;
  }
  .rep-offline-actions .rep-btn-icon-only{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    border-radius:999px !important;
  }
}
@media (max-width:390px){
  .rep-offline-actions .rep-btn,
  .rep-offline-actions a.rep-btn{
    font-size:.72rem !important;
    padding:.5rem .48rem !important;
  }
  .rep-offline-role{max-width:38vw !important;}
}

/* ================================================================
   V123 — Alignement UI repetition avec le design Fais Ton Show
   Objectif : réutiliser l'esprit des cartes membres / compte :
   cartes sombres arrondies, boutons en pilules, badges doux,
   sans gros blocs carrés ni style isolé.
   ================================================================ */

/* Socle visuel proche des cartes membres / compte */
.rep-card.card,
.rep-panel,
.rep-advanced-text,
.rep-offline-library,
.rep-resume-card {
  background: rgba(20,20,20,.78) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 22px !important;
  box-shadow: none !important;
}

.rep-card.card {
  padding: 1rem !important;
}

.rep-section-head h2,
.rep-view-head h2,
.rep-player h2,
.rep-panel h2 {
  letter-spacing: -.01em;
}

.rep-help {
  color: var(--muted) !important;
  font-size: .78rem !important;
  line-height: 1.45 !important;
}

/* Boutons globaux du module : pilules FTS, pas de gros rectangles */
.rep-btn,
a.rep-btn {
  min-height: 40px !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: rgba(255,255,255,.88) !important;
  box-shadow: none !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.rep-btn:hover:not(:disabled),
a.rep-btn:hover:not(:disabled) {
  background: rgba(248,231,2,.10) !important;
  border-color: rgba(248,231,2,.48) !important;
  color: var(--gold) !important;
  transform: translateY(-1px);
}
.rep-btn-primary,
a.rep-btn-primary,
.rep-btn-own {
  background: linear-gradient(135deg, rgba(248,231,2,.96), rgba(176,124,32,.96)) !important;
  border-color: rgba(248,231,2,.82) !important;
  color: #111 !important;
  font-weight: 850 !important;
}
.rep-btn-primary:hover:not(:disabled),
a.rep-btn-primary:hover:not(:disabled),
.rep-btn-own:hover:not(:disabled) {
  color: #111 !important;
  filter: brightness(1.04);
}
.rep-btn-review,
.rep-btn-memory {
  background: rgba(248,231,2,.10) !important;
  border-color: rgba(248,231,2,.34) !important;
  color: var(--gold) !important;
}
.rep-btn-danger {
  background: rgba(255,90,90,.10) !important;
  border-color: rgba(255,90,90,.28) !important;
  color: #ffb4af !important;
}
.rep-btn:disabled,
.rep-btn-primary:disabled,
.rep-btn-memory:disabled,
.rep-btn-danger:disabled {
  background: rgba(255,255,255,.035) !important;
  border-color: rgba(255,255,255,.07) !important;
  color: rgba(255,255,255,.28) !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

/* Champs alignés avec Mon compte */
.rep-select,
.rep-file,
.rep-textarea {
  background: rgba(8,8,8,.8) !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 16px !important;
  color: var(--white) !important;
}
.rep-select:focus,
.rep-file:focus,
.rep-textarea:focus {
  outline: none !important;
  border-color: rgba(248,231,2,.65) !important;
  box-shadow: 0 0 0 3px rgba(248,231,2,.08) !important;
}

/* Badges / statuts */
.rep-status-pill,
.rep-mini-status,
.rep-counter,
.rep-tag,
.rep-note {
  border-radius: 999px !important;
  background: rgba(248,231,2,.10) !important;
  border-color: rgba(248,231,2,.28) !important;
  color: var(--gold) !important;
  box-shadow: none !important;
}
.rep-counter {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Bibliothèque locale : même famille visuelle que quick-card / account-action-card */
.rep-offline-library {
  padding: 1rem !important;
}
.rep-offline-head {
  align-items: center !important;
  margin-bottom: .9rem !important;
}
.rep-offline-head strong {
  color: var(--gold) !important;
  font-size: .68rem !important;
  letter-spacing: .08em !important;
}
.rep-offline-head span {
  color: var(--white) !important;
  font-size: .86rem !important;
  font-weight: 800 !important;
}
.rep-offline-head small {
  color: var(--muted) !important;
  font-size: .68rem !important;
}
.rep-offline-list {
  gap: .7rem !important;
}
.rep-offline-item.rep-offline-premium {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) !important;
  gap: .72rem !important;
  padding: .85rem !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: none !important;
}
.rep-offline-item.rep-offline-premium::before {
  display: none !important;
}
.rep-offline-item.rep-offline-premium:hover {
  border-color: rgba(248,231,2,.38) !important;
}
.rep-offline-title-row {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: .6rem !important;
  margin-bottom: .55rem !important;
}
.rep-offline-title-row strong {
  color: var(--white) !important;
  font-size: .88rem !important;
  font-weight: 800 !important;
  line-height: 1.22 !important;
  letter-spacing: 0 !important;
}
.rep-offline-role {
  flex: 0 0 auto !important;
  max-width: 48% !important;
  min-height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: .32rem !important;
  padding: .28rem .55rem !important;
  border-radius: 999px !important;
  background: rgba(248,231,2,.11) !important;
  border: 1px solid rgba(248,231,2,.24) !important;
  color: var(--gold) !important;
  font-size: .68rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-shadow: none !important;
}
.rep-offline-role::before {
  content: '🎭' !important;
  font-size: .75rem !important;
}
.rep-offline-progress {
  height: 5px !important;
  margin: .45rem 0 .55rem !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.09) !important;
}
.rep-offline-progress span {
  background: linear-gradient(90deg, var(--gold), rgba(248,231,2,.55)) !important;
}
.rep-offline-meta {
  gap: .35rem !important;
}
.rep-offline-meta span {
  min-height: 24px !important;
  padding: .24rem .5rem !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  color: var(--muted) !important;
  font-size: .66rem !important;
  font-weight: 700 !important;
}

/* Actions des cartes : look premium mais discret */
.rep-offline-actions,
.rep-offline-actions.has-review,
.rep-offline-actions:not(.has-review) {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: .5rem !important;
  align-items: stretch !important;
}
.rep-offline-actions .rep-btn,
.rep-offline-actions a.rep-btn {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
  height: auto !important;
  padding: .62rem .72rem !important;
  border-radius: 16px !important;
  font-size: .76rem !important;
  line-height: 1.05 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.rep-offline-actions .rep-btn-icon-only,
.rep-offline-actions [data-offline-settings],
.rep-offline-actions [data-offline-delete] {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 40px !important;
  border-radius: 16px !important;
  font-size: .95rem !important;
}

/* Reprise dernière répétition : cohérence avec bibliothèque */
.rep-resume-card {
  padding: .85rem !important;
}
.rep-resume-card strong {
  color: var(--gold) !important;
  font-size: .68rem !important;
  letter-spacing: .08em !important;
}
.rep-resume-card span {
  color: var(--white) !important;
  font-size: .88rem !important;
}
.rep-resume-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: .5rem !important;
}
.rep-resume-actions .rep-btn,
.rep-resume-actions .rep-btn-review,
.rep-resume-actions .rep-btn-own {
  min-width: 0 !important;
  width: 100% !important;
}

/* Contrôles de répétition : barre compacte, cohérente, boutons arrondis */
body[data-rep-view="rehearse"] .rep-actions-player {
  border-color: rgba(248,231,2,.38) !important;
  background: rgba(10,10,10,.96) !important;
  border-radius: 18px 18px 0 0 !important;
  box-shadow: 0 -12px 30px rgba(0,0,0,.48) !important;
}
body[data-rep-view="rehearse"] .rep-actions-player .rep-btn {
  border-radius: 13px !important;
  background: rgba(255,255,255,.055) !important;
  border-color: rgba(255,255,255,.10) !important;
  color: rgba(255,255,255,.88) !important;
  box-shadow: none !important;
}
body[data-rep-view="rehearse"] .rep-actions-player #repStartBtn,
body[data-rep-view="rehearse"] .rep-actions-player #repContinueBtn {
  background: linear-gradient(135deg, rgba(248,231,2,.96), rgba(176,124,32,.96)) !important;
  border-color: rgba(248,231,2,.78) !important;
  color: #111 !important;
}
body[data-rep-view="rehearse"] .rep-actions-player #repDifficultBtn,
body[data-rep-view="rehearse"] .rep-actions-player #repCueBtn {
  background: rgba(248,231,2,.10) !important;
  border-color: rgba(248,231,2,.28) !important;
  color: var(--gold) !important;
}
body[data-rep-view="rehearse"] .rep-actions-player #repStopBtn {
  background: rgba(255,90,90,.10) !important;
  border-color: rgba(255,90,90,.28) !important;
  color: #ffb4af !important;
}

/* Profils : même sensation que les cartes rapides membres */
.rep-preset-card,
.rep-role-card {
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 18px !important;
  box-shadow: none !important;
}
.rep-preset-card:hover,
.rep-preset-card.is-active,
.rep-role-card:hover,
.rep-role-card.is-active {
  border-color: rgba(248,231,2,.38) !important;
  background: rgba(248,231,2,.08) !important;
}
.rep-preset-card strong,
.rep-role-card strong {
  font-family: var(--font-body) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.rep-preset-card span,
.rep-role-card span {
  color: var(--muted) !important;
}

@media (min-width: 761px) {
  .rep-offline-actions,
  .rep-offline-actions.has-review,
  .rep-offline-actions:not(.has-review) {
    grid-template-columns: repeat(4, minmax(0, auto)) !important;
    justify-content: start !important;
  }
  .rep-offline-actions.has-review {
    grid-template-columns: repeat(5, minmax(0, auto)) !important;
  }
  .rep-offline-actions .rep-btn,
  .rep-offline-actions a.rep-btn {
    width: auto !important;
    min-width: 112px !important;
  }
  .rep-offline-actions .rep-btn-icon-only,
  .rep-offline-actions [data-offline-settings],
  .rep-offline-actions [data-offline-delete] {
    min-width: 42px !important;
    width: 42px !important;
  }
}

@media (max-width: 760px) {
  .rep-card.card { padding: .9rem !important; }
  .rep-offline-title-row { align-items: flex-start !important; }
  .rep-offline-title-row strong { font-size: .86rem !important; }
  .rep-offline-role { max-width: 45% !important; }
  .rep-offline-actions,
  .rep-offline-actions.has-review,
  .rep-offline-actions:not(.has-review) {
    grid-template-columns: 1fr 1fr !important;
    gap: .45rem !important;
  }
  .rep-offline-actions .rep-btn,
  .rep-offline-actions a.rep-btn {
    min-height: 42px !important;
    font-size: .74rem !important;
    padding: .58rem .52rem !important;
  }
  .rep-resume-card { display: grid !important; grid-template-columns: 1fr !important; gap: .75rem !important; }
  .rep-resume-actions { width: 100% !important; }
}


/* =============================================================
   V124 — Carte "Reprendre ma dernière répétition" uniformisée
   Même esprit que les cartes de textes enregistrés : carte sombre,
   badge discret, actions pilules, bouton principal jaune/noir.
   ============================================================= */
.rep-resume-card{
  position: relative !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  gap: .85rem !important;
  align-items: center !important;
  padding: .9rem !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: none !important;
}
.rep-resume-card::before{
  content:'' !important;
  position:absolute !important;
  left:0 !important;
  top:.75rem !important;
  bottom:.75rem !important;
  width:3px !important;
  border-radius:999px !important;
  background: linear-gradient(180deg, var(--gold), rgba(248,231,2,.35)) !important;
  opacity:.85 !important;
}
.rep-resume-card > div:first-child{
  min-width:0 !important;
  padding-left:.28rem !important;
}
.rep-resume-card strong{
  display:inline-flex !important;
  align-items:center !important;
  gap:.38rem !important;
  width:fit-content !important;
  max-width:100% !important;
  min-height:26px !important;
  margin-bottom:.42rem !important;
  padding:.28rem .58rem !important;
  border-radius:999px !important;
  background: rgba(248,231,2,.11) !important;
  border: 1px solid rgba(248,231,2,.24) !important;
  color: var(--gold) !important;
  font-size:.66rem !important;
  font-weight:900 !important;
  line-height:1 !important;
  letter-spacing:.02em !important;
  text-transform:none !important;
  white-space:nowrap !important;
}
.rep-resume-card strong::before{
  content:'▶' !important;
  font-size:.68rem !important;
}
.rep-resume-card span#repResumeTitle{
  display:block !important;
  color:var(--white,#f5f2ee) !important;
  font-size:.92rem !important;
  font-weight:850 !important;
  line-height:1.22 !important;
  letter-spacing:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
.rep-resume-card small#repResumeMeta{
  display:block !important;
  margin-top:.32rem !important;
  color:var(--muted,#b8b8b8) !important;
  font-size:.7rem !important;
  font-weight:650 !important;
  line-height:1.35 !important;
}
.rep-resume-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:flex-end !important;
  align-items:center !important;
  gap:.42rem !important;
  min-width:min(360px, 46vw) !important;
}
.rep-resume-actions .rep-btn{
  min-width:0 !important;
  width:auto !important;
  min-height:38px !important;
  height:38px !important;
  padding:.55rem .74rem !important;
  border-radius:999px !important;
  font-size:.74rem !important;
  font-weight:850 !important;
  line-height:1 !important;
  white-space:nowrap !important;
  box-shadow:none !important;
}
.rep-resume-actions #repResumeBtn{
  background: linear-gradient(135deg, rgba(248,231,2,.98), rgba(225,173,67,.96)) !important;
  border-color: rgba(248,231,2,.75) !important;
  color:#111 !important;
  text-shadow:none !important;
  min-width:118px !important;
}
.rep-resume-actions #repResumeOwnBtn,
.rep-resume-actions #repResumeReviewBtn{
  background: rgba(255,255,255,.055) !important;
  border-color: rgba(255,255,255,.12) !important;
  color: var(--white,#f5f2ee) !important;
}
.rep-resume-actions #repResumeReviewBtn{
  border-color: rgba(248,231,2,.28) !important;
  color: var(--gold) !important;
}
.rep-resume-actions #repForgetResumeBtn{
  width:38px !important;
  min-width:38px !important;
  padding:0 !important;
  display:inline-flex !important;
  justify-content:center !important;
  align-items:center !important;
  background: rgba(255,255,255,.045) !important;
  border-color: rgba(255,255,255,.10) !important;
  color: rgba(255,255,255,.78) !important;
}
.rep-resume-actions #repForgetResumeBtn:hover{
  background: rgba(255,80,70,.12) !important;
  border-color: rgba(255,110,100,.32) !important;
  color:#ffd1cc !important;
}

@media (max-width:760px){
  .rep-resume-card{
    grid-template-columns:1fr !important;
    gap:.72rem !important;
    padding:.85rem !important;
  }
  .rep-resume-card span#repResumeTitle{
    white-space:normal !important;
    display:-webkit-box !important;
    -webkit-line-clamp:2 !important;
    -webkit-box-orient:vertical !important;
  }
  .rep-resume-actions{
    width:100% !important;
    min-width:0 !important;
    display:grid !important;
    grid-template-columns: 1fr 1fr 42px !important;
    gap:.45rem !important;
  }
  .rep-resume-actions #repResumeBtn{
    min-width:0 !important;
  }
  .rep-resume-actions .rep-btn{
    width:100% !important;
    height:40px !important;
    min-height:40px !important;
    padding:.55rem .55rem !important;
    font-size:.72rem !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  .rep-resume-actions #repForgetResumeBtn{
    width:42px !important;
    min-width:42px !important;
  }
  .rep-resume-actions #repResumeReviewBtn:not([hidden]){
    grid-column: span 2 !important;
  }
  .rep-resume-actions #repResumeOwnBtn:not([hidden]){
    grid-column: span 1 !important;
  }
}


/* =============================================================
   V125 — Cartes mobile pleine largeur + boutons lisibles
   Objectif : les cartes de textes enregistrés et reprise occupent
   toute la largeur utile sur mobile, sans couper les libellés.
   ============================================================= */
@media (max-width: 760px){
  .rep-offline-library,
  .rep-resume-card{
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }

  .rep-offline-list{
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: .72rem !important;
  }

  .rep-offline-item.rep-offline-premium{
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding: .9rem !important;
  }

  .rep-offline-title-row{
    width: 100% !important;
    gap: .55rem !important;
  }

  .rep-offline-title-row strong{
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }

  .rep-offline-role{
    max-width: 42% !important;
    flex-shrink: 0 !important;
  }

  /* Actions des textes enregistrés : rangée stable, boutons jamais coupés */
  .rep-offline-actions,
  .rep-offline-actions.has-review,
  .rep-offline-actions:not(.has-review){
    width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) 42px 42px !important;
    gap: .45rem !important;
    align-items: stretch !important;
  }

  .rep-offline-actions [data-offline-open]{
    grid-column: 1 / -1 !important;
  }

  .rep-offline-actions [data-offline-own]{
    grid-column: 1 / 2 !important;
  }

  .rep-offline-actions [data-offline-review]{
    grid-column: 2 / 3 !important;
  }

  .rep-offline-actions [data-offline-settings]{
    grid-column: 3 / 4 !important;
  }

  .rep-offline-actions [data-offline-delete]{
    grid-column: 4 / 5 !important;
  }

  .rep-offline-actions .rep-btn,
  .rep-offline-actions a.rep-btn{
    min-width: 0 !important;
    width: 100% !important;
    min-height: 40px !important;
    height: auto !important;
    padding: .55rem .45rem !important;
    border-radius: 999px !important;
    font-size: .69rem !important;
    line-height: 1.08 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: center !important;
  }

  .rep-offline-actions [data-offline-open]{
    font-size: .78rem !important;
    min-height: 42px !important;
  }

  .rep-offline-actions .rep-btn-icon-only,
  .rep-offline-actions [data-offline-settings],
  .rep-offline-actions [data-offline-delete]{
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 40px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: .95rem !important;
    white-space: nowrap !important;
  }

  /* Dernière répétition : Reprendre pleine largeur, actions secondaires lisibles */
  .rep-resume-actions{
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) 42px !important;
    gap: .45rem !important;
  }

  .rep-resume-actions #repResumeBtn{
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    width: 100% !important;
    font-size: .78rem !important;
  }

  .rep-resume-actions #repResumeOwnBtn:not([hidden]){
    grid-column: 1 / 2 !important;
  }

  .rep-resume-actions #repResumeReviewBtn:not([hidden]){
    grid-column: 2 / 3 !important;
  }

  .rep-resume-actions #repForgetResumeBtn{
    grid-column: 3 / 4 !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    padding: 0 !important;
  }

  .rep-resume-actions .rep-btn,
  .rep-resume-actions .rep-btn-review,
  .rep-resume-actions .rep-btn-own{
    min-width: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 40px !important;
    padding: .55rem .45rem !important;
    border-radius: 999px !important;
    font-size: .69rem !important;
    line-height: 1.08 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: center !important;
  }
}

@media (max-width: 370px){
  .rep-offline-actions,
  .rep-offline-actions.has-review,
  .rep-offline-actions:not(.has-review),
  .rep-resume-actions{
    gap: .38rem !important;
  }
  .rep-offline-actions .rep-btn,
  .rep-resume-actions .rep-btn,
  .rep-resume-actions .rep-btn-review,
  .rep-resume-actions .rep-btn-own{
    font-size: .66rem !important;
    padding-left: .34rem !important;
    padding-right: .34rem !important;
  }
}


/* V126 — navigation actes / scènes en accordéon */
.rep-scene-nav{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto;
  gap:.75rem;
  align-items:center;
  border-radius:18px;
  padding:.8rem;
  background:linear-gradient(135deg,rgba(201,168,76,.10),rgba(255,255,255,.035));
  border:1px solid rgba(201,168,76,.22);
}
.rep-scene-nav[hidden]{display:none!important;}
.rep-scene-current strong{display:block;color:var(--gold,#c9a84c);font-weight:900;line-height:1.2;}
.rep-scene-current small{display:block;color:rgba(245,242,238,.72);font-size:.82rem;margin-top:.18rem;}
.rep-scene-actions{display:flex;gap:.45rem;flex-wrap:wrap;justify-content:flex-end;}
.rep-btn.rep-btn-scene{border-radius:999px!important;padding:.55rem .85rem!important;font-size:.82rem!important;white-space:normal;line-height:1.15;}
.rep-scene-only-toggle{grid-column:1 / -1;display:flex;align-items:center;gap:.55rem;color:rgba(245,242,238,.84);font-weight:750;font-size:.9rem;}
.rep-scene-only-toggle input{width:18px;height:18px;accent-color:var(--gold,#c9a84c);}
.rep-section-select-fallback{display:none!important;}
.rep-scene-panel{grid-column:1 / -1;}
.rep-scene-accordion{display:grid;gap:.65rem;}
.rep-scene-group{border:1px solid rgba(201,168,76,.18);border-radius:16px;background:rgba(0,0,0,.20);overflow:hidden;}
.rep-scene-group summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:.8rem;padding:.8rem .9rem;cursor:pointer;color:var(--white,#f5f2ee);font-weight:900;}
.rep-scene-group summary::-webkit-details-marker{display:none;}
.rep-scene-group summary span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.rep-scene-group summary small{color:var(--gold,#c9a84c);font-size:.78rem;white-space:nowrap;}
.rep-scene-list{display:grid;gap:.45rem;padding:0 .65rem .65rem;}
.rep-scene-choice{width:100%;text-align:left;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.045);color:var(--white,#f5f2ee);border-radius:14px;padding:.7rem .75rem;display:grid;gap:.18rem;cursor:pointer;}
.rep-scene-choice span{font-weight:850;line-height:1.2;}
.rep-scene-choice small{color:rgba(245,242,238,.68);font-size:.8rem;}
.rep-scene-choice.is-active{border-color:rgba(201,168,76,.70);background:rgba(201,168,76,.16);box-shadow:0 0 0 1px rgba(201,168,76,.18) inset;}
@media (max-width:760px){
  .rep-scene-nav{grid-template-columns:1fr;padding:.7rem;gap:.65rem;}
  .rep-scene-actions{display:grid;grid-template-columns:1fr 1fr;justify-content:stretch;}
  .rep-btn.rep-btn-scene{width:100%;min-height:40px;font-size:.78rem!important;padding:.5rem .55rem!important;}
  .rep-scene-group summary{padding:.72rem .75rem;}
}
@media (max-width:390px){
  .rep-scene-actions{grid-template-columns:1fr;}
}

/* ==============================================================
   V128 — stabilité Samsung Z Fold / écrans larges pliables
   - Quand la bottom nav passe en pilule centrée (>=860px), la barre
     de répétition se cale au-dessus avec la même largeur.
   - Evite le saut de la barre lors du changement de viewport Fold.
   - CSS uniquement, moteur de répétition inchangé.
   ============================================================== */
@media (min-width: 860px){
  body[data-rep-view="rehearse"]{
    /* fts-nav.css : bottom nav = bottom 14px + min-height 58px */
    --rep-bottom-nav-height: calc(14px + 58px + env(safe-area-inset-bottom, 0px));
    --rep-control-gap: 6px;
  }

  body[data-rep-view="rehearse"] .rep-actions-player{
    left: 50% !important;
    right: auto !important;
    bottom: calc(var(--rep-bottom-nav-height) + var(--rep-control-gap)) !important;
    width: min(520px, calc(100dvw - 32px)) !important;
    max-width: min(520px, calc(100dvw - 32px)) !important;
    transform: translateX(-50%) translateZ(0) !important;
    will-change: transform;
    contain: layout paint;
    backface-visibility: hidden;
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  }

  body[data-rep-view="rehearse"] .rep-shell{
    padding-bottom: calc(var(--rep-bottom-nav-height) + var(--rep-control-height, 92px) + 22px) !important;
  }
}

@media (max-width: 859px){
  body[data-rep-view="rehearse"] .rep-actions-player{
    transform: translateZ(0) !important;
    will-change: transform;
    contain: layout paint;
    backface-visibility: hidden;
  }
}


/* ==============================================================
   V129 — contrôle répétition ancré au viewport
   - La barre est déplacée par JS dans <body> pour éviter le bug Android/Fold
     où un fixed placé dans une carte graphique se cale au mauvais endroit.
   - Annule le centrage spécial V128 qui supposait une bottom nav en pilule.
   - Barre large, stable, collée au-dessus de la bottom nav.
   ============================================================== */
body[data-rep-view="rehearse"] .rep-actions-player[data-viewport-lifted="1"]{
  position: fixed !important;
  z-index: 2147483000 !important;
  left: max(10px, env(safe-area-inset-left, 0px)) !important;
  right: max(10px, env(safe-area-inset-right, 0px)) !important;
  bottom: calc(var(--rep-bottom-nav-height, 76px) + env(safe-area-inset-bottom, 0px) + 4px) !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  transform: none !important;
  will-change: auto !important;
  contain: none !important;
  backface-visibility: visible !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

@media (min-width: 860px){
  body[data-rep-view="rehearse"] .rep-actions-player[data-viewport-lifted="1"]{
    left: max(24px, env(safe-area-inset-left, 0px)) !important;
    right: max(24px, env(safe-area-inset-right, 0px)) !important;
    bottom: calc(var(--rep-bottom-nav-height, 76px) + env(safe-area-inset-bottom, 0px) + 4px) !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px){
  body[data-rep-view="rehearse"] .rep-actions-player[data-viewport-lifted="1"]{
    left: max(8px, env(safe-area-inset-left, 0px)) !important;
    right: max(8px, env(safe-area-inset-right, 0px)) !important;
    bottom: calc(var(--rep-bottom-nav-height, 76px) + env(safe-area-inset-bottom, 0px) + 3px) !important;
  }
}


/* ==============================================================
   V130 — barre de contrôle visible uniquement en mode répétition
   - Après déplacement dans <body> pour corriger le Fold, la barre ne
     doit jamais apparaître sur les écrans Textes / Rôle / Mode / Réglages.
   - CSS uniquement : moteur de répétition inchangé.
   ============================================================== */
body:not([data-rep-view="rehearse"]) .rep-actions-player{
  display:none !important;
  visibility:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
}
body[data-rep-view="rehearse"] .rep-actions-player{
  visibility:visible !important;
  opacity:1 !important;
  pointer-events:auto !important;
}
body[data-rep-view="rehearse"] .rep-actions-player[data-viewport-lifted="1"]{
  display:grid !important;
}

/* V135 — PDF original local */
.rep-btn-pdf{
  border-color:rgba(255,230,0,.42)!important;
  background:rgba(255,230,0,.10)!important;
  color:var(--white,#f5f2ee)!important;
  white-space:nowrap;
}
.rep-btn-pdf:hover,
.rep-btn-pdf:focus-visible{
  background:rgba(255,230,0,.18)!important;
  border-color:rgba(255,230,0,.65)!important;
}
@media (max-width:760px){
  .rep-offline-actions .rep-btn-pdf,
  .rep-resume-actions .rep-btn-pdf{
    min-width:0;
    width:100%;
  }
}
