/* =============================================
   HULYX TUTORIAL (Viewport Masking Logic)
   ============================================= */

@media (max-width: 767px) {
    .h-tutorial-body { flex: 1; overflow-y: auto; padding: 20px;  padding-bottom: 80px; }
}

@media (min-width: 768px) {
    .h-tutorial-body { flex: 1; overflow-y: auto; padding: 20px; padding-bottom: 30px!important;}
}

#hulyx-tutorial-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--h-video-width);
    height: 100%;
    z-index: 100;
    pointer-events: none;
    overflow: hidden; 
    
    background: rgba(0, 0, 0, 0);
    transition: background 0.4s ease, visibility 0.4s;
    visibility: hidden;
}

#hulyx-tutorial-overlay.is-visible {
    visibility: visible;
    pointer-events: auto;
    background: var(--h-bg-overlay); /* Fond sombre centralisé */
}

#hulyx-tutorial-overlay .h-tutorial-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--h-bg-main); /* Fond principal noir */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: hidden;
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);

    /* --- MOBILE LOGIC (DEFAULT): Slide from LEFT --- */
    transform: translateX(-100%);
}

/* --- PC LOGIC (min-width: 768px): Slide from RIGHT --- */
@media (min-width: 768px) {
    #hulyx-tutorial-overlay .h-tutorial-content {
        transform: translateX(100%);
        border-right: none;
    }
}

#hulyx-tutorial-overlay.is-visible .h-tutorial-content {
    /* ACTIVE STATE: Always centered in mask regardless of origin */
    transform: translateX(0) !important;
}

/* --- HULYX TUTORIAL OVERLAY (ICONS FIXED) --- */

@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
}

.h-tutorial-container {
    background: var(--h-bg-surface); /* Fond de surface */
    border-radius: 0; overflow: hidden;
    height: 100%; width: 100%;
    display: flex; flex-direction: column;
    position: relative;
}

/* HEADER */
.h-tutorial-header { 
    padding: 20px; 
    border-bottom: 1px solid var(--h-border-subtle); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}

/* TABS NAV */
.h-tutorial-tabs-nav { 
    display: flex; 
    background: var(--h-bg-card); 
    border-bottom: 1px solid var(--h-border-subtle); 
    overflow-x: auto; 
    scrollbar-width: none; 
}
.h-tutorial-tabs-nav::-webkit-scrollbar { display: none; }
.h-tab-trigger { 
    background: none; 
    border: none; 
    color: var(--h-text-muted); 
    padding: 15px 20px; 
    font-size: 10px; 
    font-weight: 800; 
    cursor: pointer; 
    border-bottom: 2px solid transparent; 
    text-transform: uppercase; 
}
.h-tab-trigger.is-active { 
    color: var(--h-accent-red); 
    border-bottom-color: var(--h-accent-red); 
    background: rgba(255,255,255,0.02); 
}

/* BODY */
.h-tutorial-body::-webkit-scrollbar { width: 4px; }
.h-tutorial-body::-webkit-scrollbar-thumb { 
    background: var(--h-border-active); 
    border-radius: 10px; 
}
.h-tab-content { display: none; }
.h-tab-content.is-active { display: block; animation: hFadeSlide 0.4s ease forwards; }
@keyframes hFadeSlide { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* ACCORDIONS */
.h-accordion-list { display: flex; flex-direction: column; gap: 10px; }
.h-acc-item { 
    border: 1px solid var(--h-border-subtle); 
    border-radius: 6px; 
    background: var(--h-bg-card); 
    overflow: hidden; 
    transition: all 0.3s; 
}
.h-acc-header { 
    padding: 25px; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 11px; 
    font-weight: 800; 
    color: var(--h-text-primary); 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    transition: background 0.3s; 
}
.h-acc-item:hover .h-acc-header { 
    background: var(--h-bg-surface); 
    color: var(--h-text-primary); 
}

/* ICON STYLING */
.h-acc-icon-box { 
    width: 24px; 
    height: 24px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    background: var(--h-border-subtle); 
    border-radius: 4px; 
}
.h-acc-icon-box .material-icons { font-size: 18px !important; color: var(--h-text-muted); transition: color 0.3s; }
.h-acc-chevron { color: var(--h-text-dim); font-size: 18px !important; transition: transform 0.3s; }

.h-acc-item.is-open { border-color: var(--h-accent-red); }
.h-acc-item.is-open .h-acc-header { background: rgba(255,255,255,0.02); color: var(--h-accent-red); }
.h-acc-item.is-open .h-acc-icon-box .material-icons { color: var(--h-accent-red); }
.h-acc-item.is-open .h-acc-chevron { transform: rotate(180deg); color: var(--h-accent-red); }

.h-acc-content { background: var(--h-bg-main); display: none; }
.h-acc-inner { 
    padding: 20px 25px; 
    font-size: 12px; 
    color: var(--h-text-muted); 
    line-height: 1.6; 
    border-top: 1px solid var(--h-border-subtle); 
}
.h-acc-inner img { 
    max-width: 100%; 
    border-radius: 4px; 
    margin: 10px 0; 
    border: 1px solid var(--h-border-active); 
}

/* CALL TO ACTION */
.h-tutorial-cta { 
    margin-top: 30px; 
    width: 100%; 
    padding: 18px; 
    background: transparent; 
    border: 1px solid var(--h-accent-red); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 10px; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: all 0.3s; 
    color: var(--h-accent-red); 
    text-transform: uppercase; 
    font-weight: 800; 
    font-size: 11px; 
    letter-spacing: 2px; 
}
.h-tutorial-cta .material-icons { font-size: 16px !important; }
.h-tutorial-cta:hover { 
    background: var(--h-accent-red); 
    color: var(--h-bg-main); 
    box-shadow: 0 0 15px var(--h-accent-red-glow); 
}