*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

html,
body {
    height: 100%;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

h1 {
    margin-bottom: 2rem;
}

#currentCategoryGuide {
    font-weight: 500;
    font-size: .8em;
}

h2 {
    margin-bottom: 1rem;
}

button {
    background-color: unset;
    border: unset;
}

a {
    text-decoration: unset;
    color: unset;
}

#root,
#__next {
    isolation: isolate;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background-color: #0f1117;
    color: #eee;
    display: flex;
    height: 100vh;
}

.container {
    display: flex;
    width: 100%;
}

.sidebar {
    width: 220px;
    background-color: #1a1d25;
    padding: 1rem;
    border-right: 1px solid #2c2f38;
    overflow-y: auto;
}

.sidebar .logo {
    margin-bottom: 1rem;
    transition: transform 0.2s ease;
}

.sidebar .logo:hover {
    transform: scale(1.05);
}

.sidebar hr {
    border: 1px solid #2c2f38;
    margin: 1rem 0;
}

.sidebar h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.sidebar ul {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    font-weight: 600;
}

.sidebar li:hover {
    background-color: #2a2e39;
}

.sidebar li.active {
    background-color: #2d3140;
}

.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

h1,
h2 {
    color: #fff;
}

h2 {
    font-weight: 600;
}

.section {
    margin-bottom: 2rem;
    opacity: 0;
}

.section.visible {
    animation: slideFromLeft 0.5s ease-out forwards;
}

.cards,
.gallery,
.videos {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

#links a {
    max-width: 300px;
}

#images {
    min-height: 200px;
    padding-bottom: 2rem;
}

#images a {
    transition: transform 0.2s ease;
}

#images a:hover {
    transform: translateY(-2px);
}

.cards a {
    background-color: #1e212b;
    padding: 1rem;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #333;
    transition: background 0.2s;
}

.cards a:hover {
    background-color: #2d3140;
}

.gallery img {
    max-width: 200px;
    border-radius: 6px;
    border: 1px solid #333;
}

.videos iframe {
    width: 400px;
    height: 200px;
    border: none;
    border-radius: 6px;
}

textarea {
    width: 100%;
    padding: 1rem;
    background-color: #1e1f26;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    resize: vertical;
    font-size: 1rem;
}

.category {
    position: relative;
    background-color: #1a1d25;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #2c2f38;
}

.category .links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 10px;
    position: relative;
}

.category .links:not(:hover)::-webkit-scrollbar-thumb {
    opacity: 0.5;
}

/* Animation de la scrollbar au hover */
.category .links:hover::-webkit-scrollbar-thumb {
    opacity: 1;
}

/* Pour Firefox */
.category .links {
    scrollbar-width: thin;
    scrollbar-color: #2d3140 #1e212b;
}

/* Amélioration de la visibilité du scroll */
.category .links::-webkit-scrollbar-thumb {
    background: #2d3140;
    border-radius: 4px;
    transition: background 0.3s ease, opacity 0.3s ease;
}

.category h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #2c2f38;
}

.category .links a {
    background-color: #1e212b;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #333;
    transition: all 0.2s ease;
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 1rem;
    align-items: start;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.category .links a:hover {
    background-color: #2d3140;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Ajout d'une petite flèche discrète */
.category .links a::after {
    content: '↗';
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.category .links a:hover::after {
    opacity: 0.7;
}

.category .links a img.link-icon {
    margin-top: 7px;
    width: 24px;
    height: 24px;
    object-fit: contain;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.category .links a:hover img.link-icon {
    opacity: 1;
}

.category .links a strong {
    display: block;
    margin-bottom: 0.3em;
    color: #fff;
}

.category .links a p {
    color: #ccc;
    font-size: 0.9em;
    line-height: 1.4;
}

.link-content {
    width: 230px;
}

/* Styles pour la section YouTube */
.youtube {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.youtube a {
    background-color: #1e212b;
    padding: 1.2rem;
    border-radius: 8px;
    border: 1px solid #333;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.youtube a::before {
    content: '▶';
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    color: #ff0000;
    opacity: 0.7;
    font-size: 1.2rem;
}

.youtube a:hover {
    background-color: #2d3140;
    transform: translateY(-3px);
    border-color: #ff0000;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.1);
}

.youtube a strong {
    color: #fff;
    font-size: 1.1rem;
    padding-right: 2.5rem;
    margin-bottom: 0.3rem;
}

.youtube a p {
    color: #ccc;
    font-size: 0.9em;
    line-height: 1.4;
}

.welcome {
    background-color: #1a1d25;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #2c2f38;
    animation: fadeIn 0.5s ease-out;
}

.welcome-content {
    line-height: 1.6;
}

.welcome h2 {
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: 1.5rem;
}

.welcome h3 {
    color: #fff;
    margin: 1.5rem 0 1rem;
    font-size: 1.2rem;
}

.welcome p {
    color: #ccc;
    margin-bottom: 1rem;
}

.welcome ul {
    color: #ccc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.welcome ul ul {
    margin-top: 0.5rem;
}

.welcome li {
    margin-bottom: 0.5rem;
}

.welcome .tip {
    background-color: #2d3140;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}