/* ------------------------------------------------------------------
   VARIABLES GLOBALES
------------------------------------------------------------------ */
:root {
    /* Couleurs */
    --clr-bg-dark:      #1e1e1e;
    --clr-bg-darker:    #2e2e2e;
    --clr-text-light:   #ffffff;
    --clr-accent:       #FFD700;
    --clr-border-light: #CCCCCC;

    /* Dimensions */
    --content-max-w: 1200px;
    --radius-sm:     5px;
    --shadow-lg:     0 4px 10px rgba(0, 0, 0, 0.5);

    /* Espacements */
    --space-1: 10px;
    --space-2: 20px;
    --space-3: 30px;
    --space-4: 50px;
}

/* ------------------------------------------------------------------
   STRUCTURE GÉNÉRALE
------------------------------------------------------------------ */
.content-tutoriel {
    max-width: var(--content-max-w);
    margin: var(--space-4) auto;
    padding: var(--space-4);
}

/* Titres */
.content-tutoriel h4,
.content-tutoriel h5 {
    text-align: center;
    color: var(--clr-accent);
    margin-bottom: var(--space-3);
}

.content-tutoriel h5 {
    text-align: left;
}

/* ------------------------------------------------------------------
   MISE EN PAGE
------------------------------------------------------------------ */
.tutorial-layout {
    position: relative;
    display: flex;
    gap: var(--space-2);
}

/* ------------------------------------------------------------------
   MENU LATERAL (burger)
------------------------------------------------------------------ */
.tutorial-menu {
    position: fixed;
    top: 0;
    left: -270px;
    width: 250px;
    height: 100%;
    padding: var(--space-2);
    padding-top: 70px !important;      /* préserve ton décalage */
    background-color: var(--clr-bg-darker);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    box-sizing: border-box;
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 1000;
    color: var(--clr-text-light);
}

.tutorial-menu.open {
    left: 0;
}

.tutorial-menu a {
    color: var(--clr-text-light);
    text-decoration: none;
}

.tutorial-menu a:hover {
    color: var(--clr-accent);
    text-decoration: underline;
}

.tutorial-menu nav ul li {
    margin-bottom: var(--space-1);
}

/* Onglet d’ouverture du menu */
#menu-toggle-tab {
    position: fixed;
    top: 50%;
    left: -5px;
    transform: translateY(-50%);
    background-color: var(--clr-bg-darker);
    color: var(--clr-accent);
    padding: var(--space-1);
    cursor: pointer;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    z-index: 1100;
    transition: left 0.3s ease;
}

/* ------------------------------------------------------------------
   CONTENU PRINCIPAL
------------------------------------------------------------------ */
.tutorial-content {
    flex: 1;
    box-sizing: border-box;
    transition: margin-left 0.3s ease;
    color: var(--clr-text-light);
}

.tutorial-menu:not(.open) ~ .tutorial-content {
    margin-left: var(--space-2);
}

/* ------------------------------------------------------------------
   BOUTONS & LIENS
------------------------------------------------------------------ */
.btnSeeAll,
.content-tutoriel a {
    background: none;
    border: none;
    color: var(--clr-text-light);
    cursor: pointer;
}

.btnSeeAll:hover,
.content-tutoriel a:hover {
    color: var(--clr-accent);
}

/* ------------------------------------------------------------------
   RECHERCHE
------------------------------------------------------------------ */
.search-tutoriel {
    margin-bottom: var(--space-1);
}

.search-input-tutoriel {
    width: 100%;
    padding: 5px 15px;
    font-size: 14px;
    background: none;
    border: 1px solid var(--clr-border-light);
    border-left: none;
    border-right: none;
    color: var(--clr-text-light);
    box-sizing: border-box;
    margin-bottom: var(--space-3);
    outline: none;
}

.search-input-tutoriel:hover,
.search-input-tutoriel:focus,
.search-input-tutoriel:active {
    border-color: var(--clr-accent);
}

/* ------------------------------------------------------------------
   LISTE DES TUTORIELS
------------------------------------------------------------------ */
.tutoriel-item {
 background-color: var(--clr-bg-dark);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    color: var(--clr-text-light);
    box-sizing: border-box;
    padding: 10px;
    margin-bottom: var(--space-3);
    transition: ease 0.3s box-shadow;
}

.tutoriel-item:hover {
    box-shadow: 4px 6px 10px var(--clr-accent);
}

.tutoriel-item div {
    display: flex;
    flex-direction: row;
    gap: var(--space-1);
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.tutoriel-item div img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    margin-right: var(--space-1);
}

/* ------------------------------------------------------------------
   MODAL IMAGE
------------------------------------------------------------------ */
.tutoriel-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.tutoriel-modal img {
    max-width: 70%;
    max-height: 70%;
}

/* ------------------------------------------------------------------
   IMAGES & LIENS ASSOCIÉS
------------------------------------------------------------------ */
.img-tutoriel {
    border: 1px solid var(--clr-text-light);
    border-radius: var(--radius-sm);
}

.link-tutoriel-img {
    color: var(--clr-accent);
}

.div-img-tutoriel {
    display: flex !important;
    flex-direction: column !important;
    text-align: center !important;
}

/* ---------- Bouton de retour externe ---------- */
.back-button-container {
    margin: 20px 0;
    position: absolute;
}

.back-button {
    background: none;
    border: none;
    color: var(--clr-text-light) !important;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
}

.back-button:hover {
    color: var(--clr-accent);
}

.back-button i {
    margin-right: 8px;
}