*{box-sizing:border-box}
:root{
  --bg:#0f0f11;
  --panel:#16171a;
  --muted:#ffffff;
  --text:#a5a5a5;
  --primary:#e21818; /* rouge Sonomix */
  --primary-2:#ef4a60;
  --outline:#2a2e34;
  --danger:#c0392b;
  --ok:#1b8f5a;
  --shadow:0 6px 18px rgba(0,0,0,.35);
}
html,body{height:100%;margin:0;background:var(--bg);color:var(--text);font:15px/1.5 system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif}
main{max-width:1200px;margin:24px auto;padding:0 16px}

body.chrono-layout{
  --chrono-content-max-width:960px;
  --chrono-pinned-width:260px;
  --chrono-side-gap:16px;
  --chrono-side-margin:32px;
  --chrono-side-reserved:calc((var(--chrono-pinned-width) + var(--chrono-side-gap) + var(--chrono-side-margin)) * 2);
  --pinned-stack-start:calc(96px + env(safe-area-inset-top, 0px));
  --pinned-stack-offset:360px;
}

body.chrono-layout main{
  max-width:var(--chrono-content-max-width);
}

body.is-fullscreen{
  background:#000;
}

.fullscreen-exit-btn{
  position:fixed;
  top:20px;
  right:20px;
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.3);
  background:rgba(0,0,0,0.75);
  color:#fff;
  font-size:22px;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:10000;
  box-shadow:0 12px 32px rgba(0,0,0,0.6);
}

.fullscreen-exit-btn:hover{
  background:rgba(226,24,24,0.8);
  border-color:rgba(226,24,24,0.9);
}

.fullscreen-exit-btn.visible{
  display:flex;
}

button#fullscreenToggle[aria-pressed="true"]{
  background:rgba(226,24,24,0.15);
  border-color:var(--primary);
  color:#fff;
}

@media (min-width:1340px){
  body.chrono-layout{
    --chrono-content-max-width:none;
  }
  main{
    max-width:none;
    width:100%;
    margin:24px auto;
    padding:0 5%;
    box-sizing:border-box;
  }
  body.chrono-layout main{
    width:min(var(--chrono-content-max-width), calc(100% - var(--chrono-side-reserved)));
    padding:0 16px;
    box-sizing:border-box;
  }
}

h1{margin:0;font-weight:700;font-size:20px}
h2{margin:0 0 12px 0;font-size:18px}
.muted{color:var(--muted)}
.grow{flex:75%}
.row{display:flex;align-items:center}
.wrap{flex-wrap:wrap}
.gap{gap:10px}
.mt-6{margin-top:6px}
.mt-8{margin-top:8px}
.mt-10{margin-top:10px}
.between{justify-content:space-between}
.panel{background:var(--panel);border:1px solid var(--outline);border-radius:14px;padding:14px 16px;box-shadow:var(--shadow);margin-bottom:16px}

.pinned-menu {
  position: fixed;
  bottom: 32px;
  right: 32px;
  top:auto;
  left:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  background:var(--panel);
  border:1px solid var(--outline);
  border-radius:14px;
  padding:40px 16px 16px;
  box-shadow:var(--shadow);
  width:260px;
  max-width:calc(100vw - 64px);
  z-index:6;
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
  transition:opacity .3s ease, transform .3s ease, visibility .3s;
}

.pinned-menu.collapsed{
  padding:16px;
}

.pinned-menu-title{
  font-weight:600;
  color:white;
  text-transform:uppercase;
  font-size:12px;
  letter-spacing:0.04em;
}

.pinned-menu-timer{
  display:grid;
  grid-template-columns:auto 1fr auto;
  grid-template-areas:"label actions timer";
  column-gap:12px;
  align-items:center;
  font-family:ui-monospace,Consolas,Menlo,monospace;
}

.pinned-timer-label{
  grid-area:label;
}

.pinned-timer-actions{
  grid-area:actions;
  display:flex;
  gap:8px;
}

.pinned-menu .pinned-timer-display{
  grid-area:timer;
  justify-self:end;
}

.pinned-menu-timer-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  border-radius:12px;
  background:var(--primary);
  color:#fff;
  border:1px solid var(--primary);

  cursor:pointer;
  transition:background .2s ease, transform .2s ease;
}

.pinned-menu-timer-btn:hover{
  background:var(--primary-2);
  transform:translateY(-1px);
}

.pinned-menu-timer-btn:disabled{
  opacity:0.6;
  cursor:not-allowed;
  transform:none;
}

.pinned-menu-timer-btn-outline{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  border-radius:12px;
  background:transparent;
  color:#fff;
  border:1px solid var(--outline);
  font-weight:600;
  cursor:pointer;
  transition:border-color .2s ease, color .2s ease, transform .2s ease;
}

.pinned-menu-timer-btn-outline:hover{
  border-color:var(--primary);
  color:var(--primary);
  transform:translateY(-1px);
}

.pinned-menu-timer-btn-outline:disabled{
  opacity:0.6;
  cursor:not-allowed;
  transform:none;
}

.pinned-menu-timer-btn,
.pinned-menu-timer-btn-outline{
  width:100%;
  box-sizing:border-box;
  min-height:42px;
  max-height:48px;
  line-height:1.2;
}

.pinned-menu .pinned-menu-timer-btn,
.pinned-menu .pinned-menu-timer-btn-outline{
  padding:0;
  width:100%;
  flex:1 1 0;
  min-height:34px;
  font-size:12px;
  line-height:1;
}

.pinned-menu-timer-btn-outline{
  color:var(--text);
}
.pinned-timer-display{
  font-size:18px;
  color:white;
}

.pinned-button{
  width:100%;
  text-align:center;
}

.pinned-menu.visible{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
}

.collapsible{
  position:relative;
}

.pinned-menu.collapsible,
.pinned-menu-bottom.collapsible{
  position:fixed;
  border-width:1px;
  border-style:solid;
  border-color:rgba(255,255,255,0.06);
  background:rgba(14,15,18,0.95);
  box-shadow:var(--shadow);
}

@media (min-width:721px){
  body.chrono-layout main{
    padding-left:calc(var(--chrono-pinned-width) + var(--chrono-side-gap) + var(--chrono-side-margin));
    padding-right:var(--chrono-side-margin);
  }
  .pinned-menu{
    left:var(--chrono-side-margin);
    right:auto;
    width:var(--chrono-pinned-width);
    max-width:calc(100vw - (var(--chrono-side-margin) + 16px));
    bottom:auto;
  }
  .pinned-menu{
    top:var(--pinned-stack-start);
    right:auto;
    transform:none;
  }
  .pinned-menu.visible{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
}

@media (max-width:720px){
  .pinned-menu,
  .pinned-menu-bottom{
    display:none !important;
  }
  body.chrono-layout main{
    padding-bottom:calc(64px + env(safe-area-inset-bottom, 0px));
    padding-left:16px;
    padding-right:16px;
  }
}

.collapsible-content{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.collapsible.collapsed .collapsible-content{
  display:none;
}

.collapsible-toggle{
  position:absolute;
  top:10px;
  right:10px;
  min-width:24px;
  height:24px;
  padding:0;
  border-radius:6px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(0,0,0,0.35);
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  cursor:pointer;
  transition:background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}

.collapsible-toggle:hover{
  background:rgba(255,255,255,0.15);
  border-color:rgba(255,255,255,0.4);
  color:#fff;
}

.collapsible-toggle-label{
  font-size:10px;
  font-weight:600;
  letter-spacing:0.04em;
  text-transform:uppercase;
  color:rgba(255,255,255,0.78);
  pointer-events:none;
}

.collapsible-toggle:hover .collapsible-toggle-label{
  color:#fff;
}

.collapsible-toggle:focus-visible{
  outline:2px solid var(--primary);
  outline-offset:2px;
}

.collapsible-icon{
  font-size:14px;
  line-height:1;
}

.app-header{position:sticky;top:0;z-index:5;background:linear-gradient(180deg,rgba(15,15,17,.95),rgba(15,15,17,.85));backdrop-filter:saturate(1.2) blur(6px);border-bottom:1px solid var(--outline);padding:10px 16px;display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center}
.brand{display:flex;align-items:center;gap:12px}
.logo{width:36px;height:36px;border-radius:10px;background:var(--primary);color:white;display:grid;place-items:center;font-weight:900;box-shadow:var(--shadow)}
.subtitle{margin:0;color:var(--muted);font-size:12px}
.tabs{display:flex;gap:8px}
.tab{background:transparent;color:var(--text);border:1px solid var(--outline);padding:8px 12px;border-radius:10px;cursor:pointer}
.tab.active{border-color:var(--primary);color:white}
.export-actions{margin-top:12px}
.tab-link {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.tab-link:hover {
  background-color: var(--outline);
  border-color: var(--outline);
}

.tab-link.active {
  border-color: var(--primary);
  color: white;
  background: rgba(226,24,24,0.18);
}

.post-intro{
  margin-bottom:12px;
  line-height:1.6;
}

.post-form{
  align-items:flex-end;
}

.post-input{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:160px;
}

.post-input label{
  font-size:12px;
  letter-spacing:0.04em;
  text-transform:uppercase;
}

.post-time-input{
  min-width:120px;
  max-width:140px;
  text-align:center;
  font-family:ui-monospace,Consolas,Menlo,monospace;
}

.post-title-input{
  width:100%;
  min-width:260px;
}

.post-actions{
  display:flex;
  align-items:flex-end;
}

.post-actions button{
  min-width:140px;
}

.post-hint{
  display:block;
  margin-top:10px;
}

.post-export-actions{
  align-items:center;
}

.post-item{
  display:flex;
  flex-direction:column;
  gap:4px;
  flex:1;
  min-width:0;
}

.post-meta{
  font-size:12px;
  font-family:ui-monospace,Consolas,Menlo,monospace;
  color:var(--muted);
}

.post-inline-edit{
  width:100%;
}

.post-inline-edit .edit-time{
  width:120px;
  max-width:140px;
  text-align:center;
  font-family:ui-monospace,Consolas,Menlo,monospace;
}

.post-inline-edit .edit-title{
  flex:1;
  min-width:240px;
}

.tutorial-main{
  display:flex;
  flex-direction:column;
  gap:48px;
  padding-bottom:48px;
}

.tutorial-hero{
  display:flex;
  flex-wrap:wrap;
  gap:32px;
  align-items:flex-start;
}

.tutorial-hero-text{
  flex:1 1 320px;
  min-width:280px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.tutorial-hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.tutorial-hero-actions .tutorial-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:180px;
}

.tutorial-hero-diagram{
  flex:1 1 320px;
  min-width:280px;
}

.tutorial-subtitle{
  margin:0;
  font-size:16px;
  font-weight:600;
  letter-spacing:0.02em;
}

.tutorial-demo-block{
  margin-top:26px;
  padding:24px 24px;
  border:1px solid var(--outline);
  border-radius:12px;
  background:rgba(255,255,255,0.04);
  display:flex;
  flex-direction:column;
  gap:8px;
}

.tutorial-demo-block footer{
  margin-top:4px;
}

.tutorial-accordion-toggle{
  width:100%;
  background:rgba(255,255,255,0.04);
  border:1px solid var(--outline);
  border-radius:12px;
  padding:18px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  color:white;
  font-weight:600;
  cursor:pointer;
  text-align:left;
  transition:background 0.2s ease, border-color 0.2s ease;
}

.tutorial-accordion-toggle:hover,
.tutorial-accordion-toggle.is-open{
  border-color:var(--primary);
  background:rgba(226,24,24,0.12);
}

.tutorial-accordion-toggle:focus-visible{
  outline:2px solid var(--primary);
  outline-offset:3px;
}

.tutorial-accordion-label{
  flex:1;
  font-size:16px;
  letter-spacing:0.01em;
}

.tutorial-accordion-icon{
  font-size:18px;
  transition:transform 0.2s ease;
}

.tutorial-accordion-toggle.is-open .tutorial-accordion-icon{
  transform:rotate(90deg);
}

.tutorial-accordion-content{
  margin-top:22px;
}

.tutorial-subtabs{
  margin-top:26px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.tutorial-subtab-toggle{
  padding:8px 16px;
  border-radius:999px;
  border:1px solid var(--outline);
  background:rgba(255,255,255,0.06);
  color:var(--muted);
  cursor:pointer;
  font-weight:600;
  letter-spacing:0.02em;
  transition:background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tutorial-subtab-toggle:hover,
.tutorial-subtab-toggle.is-active{
  border-color:var(--primary);
  color:white;
  background:rgba(226,24,24,0.18);
}

.tutorial-subtab-toggle:focus-visible{
  outline:2px solid var(--primary);
  outline-offset:3px;
}

.tutorial-subtab-panels{
  margin-top:26px;
  display:flex;
  flex-direction:column;
  gap:24px;
}

.tutorial-subtab-content[hidden]{
  display:none;
}

.tutorial-demo-inline{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.tutorial-demo-inline input{
  flex:1;
  min-width:140px;
  border-radius:10px;
  border:1px solid var(--outline);
  background:#101114;
  color:white;
  padding:8px 10px;
}

.tutorial-demo-inline output{
  min-width:100px;
  text-align:center;
  border:1px solid var(--outline);
  border-radius:10px;
  padding:6px 10px;
  font-family:ui-monospace,Consolas,Menlo,monospace;
  background:#101114;
  color:white;
}

.tutorial-demo-inline select{
  flex:1;
  min-width:180px;
}

.tutorial-demo-content{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.tutorial-demo-timer{
  font-family:ui-monospace,Consolas,Menlo,monospace;
  font-size:18px;
  font-weight:600;
  border:1px solid var(--outline);
  border-radius:10px;
  padding:6px 10px;
  background:#101114;
}

.tutorial-demo-preview{
  border:1px solid var(--outline);
  border-radius:10px;
  background:#101114;
  padding:10px 12px;
  font-size:13px;
  line-height:1.4;
  max-height:160px;
  overflow:auto;
  color:var(--muted);
}

.tutorial-demo-log{
  border:1px solid var(--outline);
  border-radius:10px;
  background:#101114;
  padding:8px 10px;
  min-height:60px;
  font-size:13px;
  color:var(--muted);
  line-height:1.4;
}

.tutorial-demo-log span{
  display:block;
}

.tutorial-tag-list{
  list-style:none;
  display:flex;
  gap:8px;
  padding:0;
  margin:0;
  flex-wrap:wrap;
}

.tutorial-tag-list li{
  padding:4px 8px;
  border-radius:8px;
  border:1px solid var(--outline);
  background:rgba(255,255,255,0.05);
  font-size:12px;
  letter-spacing:0.02em;
}

.tutorial-action-list{
  margin:0;
  padding-left:20px;
  display:flex;
  flex-direction:column;
  gap:6px;
  color:var(--muted);
}

.tutorial-action-list li{
  display:flex;
  align-items:flex-start;
  gap:12px;
}

.tutorial-action-list span{
  flex:1;
}

.tutorial-action-list.compact{
  padding-left:16px;
  gap:4px;
}

.tutorial-demo-btn{
  opacity:0.9;
  min-width:180px;
  text-align:center;
}

.tutorial-demo-btn:active{
  transform:translateY(1px);
}

.tutorial-live-steps{
  margin:0 0 8px 0;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.tutorial-live-steps li{
  display:flex;
  gap:12px;
  align-items:flex-start;
}

.tutorial-step-index{
  width:24px;
  height:24px;
  border-radius:50%;
  background:var(--primary);
  color:white;
  display:grid;
  place-items:center;
  font-size:13px;
  font-weight:700;
  margin-top:2px;
}

.tutorial-live-steps li>div{
  flex:1;
  color:var(--muted);
}

.tutorial-live-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.tutorial-live-textarea{
  flex:1 1 260px;
  min-height:70px;
  border-radius:12px;
  border:1px solid var(--outline);
  background:#101114;
  color:white;
  padding:10px;
  resize:vertical;
}

.tutorial-live-buttons{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:160px;
}

.tutorial-live-buttons .tutorial-demo-btn{
  width:100%;
}

.tutorial-live-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  border:1px solid var(--outline);
  border-radius:12px;
  background:#101114;
  padding:12px;
}

.tutorial-live-item{
  display:flex;
  align-items:center;
  gap:12px;
}

.tutorial-live-meta{
  min-width:72px;
  border:1px solid var(--outline);
  border-radius:8px;
  padding:4px 8px;
  font-family:ui-monospace,Consolas,Menlo,monospace;
  font-size:13px;
  color:white;
  background:rgba(255,255,255,0.05);
}

.tutorial-live-title{
  flex:1;
  color:white;
}

.tutorial-live-empty{
  color:#c5c5c5;
  font-style:italic;
}

.tutorial-live-actions{
  display:flex;
  gap:6px;
}

.tutorial-demo-mini{
  opacity:0.65;
  cursor:default;
  min-width:0;
  padding:4px 8px;
}

.tutorial-prepared-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.tutorial-prepared-textarea{
  flex:1 1 260px;
  min-height:70px;
  border-radius:12px;
  border:1px solid var(--outline);
  background:#101114;
  color:white;
  padding:10px;
  resize:vertical;
}

.tutorial-prepared-buttons{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:180px;
}

.tutorial-prepared-buttons .tutorial-demo-btn{
  width:100%;
}

.tutorial-prepared-legend{
  margin:0;
  padding-left:20px;
  display:flex;
  flex-direction:column;
  gap:6px;
  color:var(--muted);
}

.tutorial-prepared-legend.nested{
  margin-top:4px;
  padding-left:24px;
}

.tutorial-prepared-note{
  margin:12px 0 4px;
}

.tutorial-prepared-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  border:1px dashed var(--outline);
  border-radius:12px;
  background:#101114;
  padding:12px;
}

.tutorial-prepared-item{
  display:flex;
  gap:10px;
  align-items:center;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.04);
  cursor:grab;
}

.tutorial-prepared-item:active{
  cursor:grabbing;
}

.tutorial-prepared-body{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.tutorial-prepared-handle{
  font-size:18px;
  color:var(--muted);
}

.tutorial-prepared-title{
  flex:1;
  color:white;
  font-weight:600;
}

.tutorial-prepared-controls{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.tutorial-prepared-action{
  padding:4px 10px;
  border-radius:8px;
  font-size:12px;
  cursor:pointer;
}

.tutorial-points-example{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  color:var(--muted);
}

.tutorial-points-example li{
  display:flex;
  align-items:center;
  gap:12px;
}

.tutorial-points-time{
  padding:4px 8px;
  border-radius:8px;
  border:1px solid var(--outline);
  background:#101114;
  font-family:ui-monospace,Consolas,Menlo,monospace;
  font-size:13px;
  color:white;
}

.tutorial-points-example em{
  font-style:normal;
  color:#c5c5c5;
}

.tutorial-modules{
  display:grid;
  gap:18px;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
}

.tutorial-card{
  border:1px solid var(--outline);
  border-radius:14px;
  padding:18px;
  background:rgba(255,255,255,0.03);
  display:flex;
  flex-direction:column;
  gap:12px;
  box-shadow:var(--shadow);
}

.tutorial-card header{
  display:flex;
  align-items:center;
  gap:12px;
}

.tutorial-card-icon{
  width:40px;
  height:40px;
  border-radius:12px;
  background:rgba(226,24,24,0.18);
  display:grid;
  place-items:center;
  font-size:20px;
}

.tutorial-card ul{
  margin:0;
  padding-left:20px;
  color:var(--muted);
  display:flex;
  flex-direction:column;
  gap:6px;
}

.tutorial-card footer{
  margin-top:auto;
}

.tutorial-link{
  color:var(--primary);
  text-decoration:none;
}

.tutorial-link:hover{
  text-decoration:underline;
}

.tutorial-video-player{
  width:100%;
  max-height:480px;
  border:1px solid var(--outline);
  border-radius:12px;
  background:#000;
  margin-top:12px;
}

.tutorial-note{
  margin-top:12px;
}

.tutorial-timeline{
  position:relative;
  margin-top:16px;
  padding-left:26px;
  display:flex;
  flex-direction:column;
  gap:18px;
}

.tutorial-timeline::before{
  content:"";
  position:absolute;
  left:10px;
  top:0;
  bottom:0;
  width:2px;
  background:rgba(255,255,255,0.08);
}

.tutorial-timeline-entry{
  position:relative;
  display:flex;
  gap:16px;
}

.tutorial-timeline-dot{
  position:absolute;
  left:-16px;
  top:6px;
  width:12px;
  height:12px;
  border-radius:50%;
  background:var(--primary);
  box-shadow:0 0 0 4px rgba(226,24,24,0.2);
}

.tutorial-timeline-content{
  background:rgba(255,255,255,0.03);
  border:1px solid var(--outline);
  border-radius:12px;
  padding:16px;
  width:100%;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.tutorial-timeline-content time{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:0.06em;
  color:var(--muted);
}

.tutorial-checklist{
  display:grid;
  gap:10px;
}

.tutorial-check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 14px;
  border:1px solid var(--outline);
  border-radius:12px;
  background:rgba(255,255,255,0.03);
}

.tutorial-check input{
  margin-top:4px;
}

.tutorial-section h2{
  margin-bottom:12px;
}
.header-actions{justify-self:end}

button{cursor:pointer;border:1px solid var(--outline);background:#1e2024;color:var(--text);padding:8px 12px;border-radius:10px}
button.primary{background:var(--primary);border-color:var(--primary);color:white}
button.primary:hover{background:var(--primary-2)}
button.outline:hover{border-color:var(--primary)}

@media (min-width:1340px){
  .pinned-menu.collapsible.collapsed{
    width:auto;
    min-width:0;
    padding:0;
    gap:0;
    background:transparent;
    border-color:transparent;
    box-shadow:none;
    align-items:center;
  }
.pinned-menu.collapsible.collapsed .collapsible-toggle{
  position:static;
  width:auto;
  min-height:auto;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(15,15,17,0.9);
  border:1px solid rgba(255,255,255,0.18);
  box-shadow:none;
  justify-content:center;
}
.pinned-menu.collapsible.collapsed .collapsible-toggle-label{
  text-align:center;
  width:auto;
}
}
button.danger{background:#6e1511;border-color:#7a1813;color:#fff}
button:disabled{opacity:.5;pointer-events:none}

/* ✅ CORRECTIF : Forcer la réactivation des éléments enabled */
input[type=text]:enabled,
button:enabled {
  pointer-events: auto !important;
  opacity: 1 !important;
}

/* ✅ CORRECTIF SPÉCIFIQUE : Champs du nouveau parser - VERSION CORRIGÉE */
#newParserName:enabled,
#newParserDisplay:enabled {
  pointer-events: auto !important;
  opacity: 1 !important;
  cursor: text !important;
}

#createParserBtn:enabled {
  pointer-events: auto !important;
  opacity: 1 !important;
  cursor: pointer !important;
}

input[type=file]{border:1px dashed var(--outline);padding:6px;border-radius:10px;background:#1b1c20;color:var(--muted)}
#fileInput,#xmlInput{display:none}
select{
  background:#1b1c20;
  border:1px solid var(--outline);
  color:var(--text);
  padding:8px 10px;
  border-radius:10px
}

/* AJOUT : Amélioration de la visibilité des options du select */
select option {
  background: var(--panel);
  color: white;
  padding: 8px;
}

select option:hover,
select option:focus {
  background: var(--primary);
  color: white;
}

select option:disabled {
  color: var(--muted);
  background: var(--bg);
}

/* Amélioration spécifique pour le select des parsers */
#parserSelect {
  flex: 1;
  min-width: 200px;
  color: white; /* Forcer le texte en blanc */
}

#parserSelect option {
  background: var(--panel);
  color: white;
  padding: 10px;
}

.timer{font:700 42px/1 ui-monospace,Consolas,Menlo,monospace}
.offset-controls{
  align-items:center;
  justify-content:center;
  width:100%;
}
.offset-settings{
  min-width:260px;
  background:rgba(18,19,22,0.6);
  border:1px solid var(--outline);
  border-radius:14px;
  padding:16px 18px;
  display:flex;
  flex-direction:column;
  gap:14px;
  box-shadow:var(--shadow);
  text-align:center;
}
.offset-label{
  text-align:center;
  font-weight:600;
}
.offset-slider-wrapper{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:12px;
  justify-items:center;
}
.offset-slider{
  width:100%;
  appearance:none;
  height:6px;
  border-radius:999px;
  background:linear-gradient(90deg,rgba(226,24,24,0.35),rgba(226,24,24,0.8));
  outline:none;
  position:relative;
}
.offset-slider::-webkit-slider-thumb{
  appearance:none;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  border:2px solid var(--primary);
  box-shadow:0 0 8px rgba(226,24,24,0.45);
  cursor:pointer;
}
.offset-slider::-moz-range-thumb{
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  border:2px solid var(--primary);
  box-shadow:0 0 8px rgba(226,24,24,0.45);
  cursor:pointer;
}
.offset-slider-min,
.offset-slider-max{
  font-size:12px;
  font-weight:600;
  text-align:center;
}
.offset-preview-badge{
  display:flex;
  justify-content:center;
  align-items:center;
}
.offset-preview-badge span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:80px;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(226,24,24,0.12);
  border:1px solid rgba(226,24,24,0.35);
  color:white;
  font-weight:600;
  font-size:14px;
  text-align:center;
}
.offset-manual{
  align-items:center;
  justify-content:center;
}
.offset-seconds{
  max-width:160px;
  text-align:center;
  background:#1b1c20;
  border:1px solid var(--outline);
  border-radius:10px;
  padding:8px 10px;
  color:white;
  font-weight:600;
}
.offset-manual button{
  min-width:120px;
}
.offset-hint{
  display:block;
  text-align:center;
  font-size:12px;
}

.list{display:flex;flex-direction:column;gap:8px}
.line{border:1px solid var(--outline);border-radius:10px;padding:10px 12px;background:#1a1b1f;position:relative;transition:box-shadow .2s ease,border-color .2s ease}
.line-top{display:flex;align-items:flex-start;gap:12px;margin-bottom:4px}
.line-top .title{flex:1}
.drag-handle{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--outline);border-radius:10px;background:rgba(255,255,255,0.04);color:var(--text);cursor:grab;flex-shrink:0;transition:border-color .2s ease, background .2s ease, color .2s ease}
.drag-handle:hover{border-color:var(--primary);background:rgba(226,24,24,0.12);color:#fff}
.drag-handle:active{cursor:grabbing}
.drag-handle:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.drag-handle span{pointer-events:none;font-size:18px;line-height:1}
.line.is-dragging{opacity:0.55}
.line.drag-over-before::before,
.line.drag-over-after::after{content:"";position:absolute;left:12px;right:12px;height:2px;background:var(--primary);border-radius:999px;box-shadow:0 0 8px rgba(226,24,24,0.4)}
.line.drag-over-before::before{top:-6px}
.line.drag-over-after::after{bottom:-6px}
.line .meta{color:var(--muted);font:12px ui-monospace,monospace}
.line .controls{margin-top:8px}
.line .title {
  white-space: pre-wrap;
  word-break: break-word;
}
.line .title a{
  color: var(--primary);
  text-decoration: underline;
}
.line .title a:hover{
  color: var(--primary-2);
}
.inline-edit textarea{width:100%;min-height:96px}

#logPanel{position:fixed;left:0;right:0;bottom:0;height:240px;background:#0b0b0c;border-top:1px solid var(--outline);box-shadow:0 -6px 18px rgba(0,0,0,.45);padding:8px 10px;z-index:9999}
#logPanel.hidden{display:none}
#logPanel .toolbar{display:flex;gap:8px;align-items:center;margin-bottom:6px}
#logInner{height:180px;overflow:auto;font:12px ui-monospace,monospace;white-space:pre-wrap;color:#b8f5b8}

.page{display:none}
.page.active{display:block}
@media (max-width:720px){
  .timer{font-size:32px}
}

@media (max-width:960px){
  main{padding:0 12px}
  .app-header{grid-template-columns:1fr auto;grid-template-rows:auto auto;row-gap:10px}
  .header-actions{justify-self:flex-end}
  .tutorial-hero{flex-direction:column}
  .tutorial-hero-diagram{width:100%}
}

@media (max-width:720px){
  html,body{font-size:14px}
  main{margin:16px auto}
  .app-header{grid-template-columns:1fr;grid-template-rows:auto auto auto;text-align:center}
  .brand{justify-content:center}
  .tabs{flex-wrap:wrap;justify-content:center}
  .header-actions{justify-self:stretch;display:flex;gap:8px}
  .header-actions button{flex:1}
  .timer{font-size:28px}
  .panel{padding:12px 14px}
  .panel .row{flex-direction:column;align-items:stretch}
  .panel .row.gap>*{width:100%}
  .panel .row.gap.wrap{flex-direction:column}
  .post-form{align-items:stretch}
  .post-input{width:100%}
  .post-time-input{max-width:none}
  .post-actions{width:100%}
  .post-actions button{width:100%}
  .post-inline-edit .edit-time{width:100%;max-width:none}
  .post-inline-edit .edit-title{min-width:0}
  .tutorial-demo-inline{flex-direction:column;align-items:stretch}
  .tutorial-demo-inline input,
  .tutorial-demo-inline button,
  .tutorial-demo-inline output,
  .tutorial-demo-inline select{width:100%;min-width:0}
  .tutorial-action-list li{flex-direction:column;align-items:stretch}
  .tutorial-demo-btn{width:100%}
  .tutorial-live-steps li{flex-direction:column}
  .tutorial-step-index{margin-top:0}
  .tutorial-prepared-row{flex-direction:column}
  .tutorial-prepared-buttons{width:100%}
  .tutorial-prepared-controls{flex-direction:column;align-items:stretch}
  .tutorial-subtabs{flex-direction:column}
  .tutorial-subtab-toggle{width:100%}
  .tutorial-hero-actions .tutorial-cta{width:100%}
  .offset-controls{
    align-items:center;
    justify-content:center;
  }
  .offset-settings{min-width:0;width:100%}
  .offset-seconds{max-width:none}
  .export-actions{flex-direction:column;align-items:stretch}
  .export-actions button{width:100%}
  textarea,select,input,button{font-size:0.85rem;padding:8px 10px}
  .tabs .tab,.tabs .tab-link{flex:1 1 100%;text-align:center}
  .history-card{left:16px;right:16px;width:auto}
  .line .controls.row{flex-direction:column;align-items:stretch}
  .line .controls.row button{width:100%}
  #logPanel{height:220px}
}

.hidden {
  display: none !important;
}

.pinned-hidden{
  display:none !important;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
}

#prepInput {
  overflow-y: hidden;
  resize: none;
}

#liveInput {
  min-height: 48px;
  resize: vertical;
}

#sourceMode {
  min-width: 220px;
  flex: 1 1 220px;
}

#sourceMode,
#docType {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--panel);
  border: 1px solid var(--outline);
  color: white;
  padding: 8px 42px 8px 12px;
  border-radius: 10px;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M1 1.5l5 5 5-5' stroke='%23ffffff' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}

#sourceMode:focus,
#docType:focus {
  border-color: #ffffff99;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
  outline: none;
}

#sourceMode option,
#docType option {
  background: var(--panel);
  color: white;
}

#sourceMode::-ms-expand,
#docType::-ms-expand {
  display: none;
}

#webControls small {
  display: block;
  line-height: 1.4;
}

#scrapeStatus {
  white-space: pre-line;
}

.conversion-stats{margin-bottom:10px;font-weight:700;color:#999}
.conversion-output{
  background:#0f1115;
  padding:14px;
  border-radius:10px;
  max-height:500px;
  overflow:auto;
  min-height:120px;
  border:1px solid var(--outline);
  white-space:pre-wrap;
  font-family:ui-monospace,Consolas,Menlo,monospace;
  font-size:13px;
  color:#e5e5e5;
}

/* Styles pour le modal */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.modal-content {
  background: var(--panel);
  border: 1px solid var(--outline);
  border-radius: 14px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--outline);
}

.modal-header h2 {
  margin: 0;
  color: white;
}

.modal-body {
  padding: 20px;
}

.close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
  padding: 5px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close:hover {
  color: white;
  background: var(--outline);
}

/* Section Nouveau Parser */
.modal-body > div:first-child {
  background: var(--bg);
  border: 1px solid var(--outline);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
}

.modal-body h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: white;
  font-size: 16px;
}

/* Amélioration des lignes du modal */
.modal-body .row {
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.modal-body label {
  font-weight: bold;
  color: white;
  min-width: 140px;
  flex-shrink: 0;
}

/* Amélioration du select des parsers */
#parserSelect {
  flex: 1;
  min-width: 200px;
  color: white; /* Forcer le texte en blanc */
}

#parserSelect option {
  background: var(--panel);
  color: white;
  padding: 10px;
}

/* Zone de code */
#parserCode {
  width: 100%;
  height: 400px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
  font-size: 13px;
  line-height: 1.4;
  background: var(--bg);
  border: 1px solid var(--outline);
  color: var(--text);
  padding: 12px;
  border-radius: 10px;
  resize: vertical;
  tab-size: 4;
}

#parserCode:focus {
  outline: none;
  border-color: var(--primary);
}

/* Zone de statut */
#parserStatus {
  border-radius: 10px;
  padding: 12px;
  margin-top: 16px;
  font-weight: 500;
  border: 1px solid transparent;
}

/* Inputs du nouveau parser */
#newParserName, #newParserDisplay {
  flex: 1;
  min-width: 180px;
}

/* Message d'aide */
.modal-body small {
  color: var(--muted);
  font-size: 12px;
  display: block;
  margin-top: 8px;
}

/* Responsive pour le modal */
@media (max-width:768px){
  .modal-content{width:95%;max-height:95vh}
  .modal-body .row{flex-direction:column;align-items:stretch}
  .modal-body label{min-width:auto;margin-bottom:4px}
  #parserCode{height:300px}
}

/* Correctifs d'interaction */
input:enabled,
textarea:enabled,
select:enabled,
button:enabled{pointer-events:auto !important;opacity:1 !important;cursor:auto}

button:enabled{cursor:pointer}

/* Carte flottante Historique */
.history-card{position:fixed;top:70px;right:30px;width:340px;background:var(--panel);border:1px solid var(--outline);border-radius:14px;box-shadow:var(--shadow);z-index:2000;padding:0;display:flex;flex-direction:column;animation:fadeIn .2s}
.history-card.hidden{display:none !important}
.history-card-header{display:flex;justify-content:space-between;align-items:center;padding:14px 18px 8px 18px;border-bottom:1px solid var(--outline);font-weight:bold;color:white}
.history-card .close{background:none;border:none;font-size:22px;cursor:pointer;color:var(--text);padding:2px 8px;border-radius:50%}
.history-card .close:hover{background:var(--outline);color:white}
#exportHistory{padding:12px 18px 18px 18px;font-size:14px}
#exportHistory .history-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;gap:10px}
#exportHistory .history-row:last-child{margin-bottom:0}
.history-download{white-space:nowrap}
.history-date{color:#888;font-size:12px;margin-left:4px}

/* Toast notifications */
.toast{position:fixed;top:30px;left:50%;transform:translate(-50%,0);background:var(--panel);color:#fff;padding:16px 32px;border-radius:12px;font-size:1.1em;z-index:3000;box-shadow:0 2px 12px rgba(0,0,0,.3);pointer-events:none;animation:fadeIn .2s ease-out forwards}
.toast--success{background:#2ecc40}
.toast--danger{background:#e74c3c}
.toast--info{background:var(--primary)}

@keyframes fadeIn{
  from{opacity:0;transform:translate(-50%,-10px)}
  to{opacity:1;transform:translate(-50%,0)}
}
.btn-add-now{
  border-color:rgba(27,143,90,.7);
  color:#7fffa9;
}

.btn-add-now:hover{
  border-color:rgba(27,143,90,1);
  color:#b9ffd1;
  background:rgba(27,143,90,.1);
}
/* --- POPUP VIDÉO  --- */
.video-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.video-popup {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.video-popup-inner {
  width: 90%;
  max-width: 900px;
  background: var(--panel);
  border: 1px solid var(--outline);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ✅ Apparition */
.video-popup.active,
.video-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ✅ Masquage */
.hidden {
  display: none !important;
}
