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

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

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

/* ====================================================== */
/*                Main Tutorial Container                 */
/* ====================================================== */
.content-tutoriel {
    max-width: var(--content-max-w);
    margin: var(--space-4) auto;
    padding: var(--space-4);
}

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

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

/* ====================================================== */
/*              Layout & Flex Containers                  */
/* ====================================================== */
.tutorial-layout {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: var(--space-2);
}

/* ====================================================== */
/*                Tutorial Menu Styles                    */
/* ====================================================== */
.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;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-transition: left 0.3s ease;
    -o-transition: left 0.3s ease;
    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);
}

/* ====================================================== */
/*                Menu Toggle Button                      */
/* ====================================================== */
#menu-toggle-tab {
    position: fixed;
    top: 50%;
    left: -5px;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    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;
    -webkit-transition: left 0.3s ease;
    -o-transition: left 0.3s ease;
    transition: left 0.3s ease;
}

/* ====================================================== */
/*               Tutorial Content Area                    */
/* ====================================================== */
.tutorial-content {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-transition: margin-left 0.3s ease;
    -o-transition: margin-left 0.3s ease;
    transition: margin-left 0.3s ease;
    color: var(--clr-text-light);
}

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

/* ====================================================== */
/*                Buttons & Links                         */
/* ====================================================== */
.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);
}

/* ====================================================== */
/*                Search Input                            */
/* ====================================================== */
.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);
    -webkit-box-sizing: border-box;
    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);
}

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

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

.tutoriel-item div {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    gap: var(--space-1);
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: space-evenly;
    -ms-flex-pack: space-evenly;
    justify-content: space-evenly;
}

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

/* ====================================================== */
/*               Modal Overlay & Image Display            */
/* ====================================================== */
.tutoriel-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    z-index: 2000;
}

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

/* ====================================================== */
/*               Tutorial Image Link Styles               */
/* ====================================================== */
.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: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-orient: vertical !important;
    -webkit-box-direction: normal !important;
    -ms-flex-direction: column !important;
    flex-direction: column !important;
    text-align: center !important;
}

/* ====================================================== */
/*                Back Button Styles                      */
/* ====================================================== */
.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;
}