:root {
    /* Palette de couleurs centralisée */
    --text-main: white;
    --bg-main: black;
    --bg-block: rgba(0, 0, 0, 0.5); /* Fond des articles et widgets */
    --primary-color: rgba(211, 47, 47, 0.8); /* Rouge pour le hover du menu */
    
    --msg-error: rgba(255, 0, 0, 0.5);
    --msg-success: rgba(0, 255, 0, 0.5);
    
    --scroll-track: #4b4b4b;
    --scroll-thumb: #858585;
    --scroll-thumb-hover: #777777;
    
    /* Ombres centralisées */
    --shadow-main: 1px 1px 20px 7px rgb(0, 0, 0);
    --shadow-hover: 1px 1px 25px 10px rgba(0, 0, 0, 0.8);
}

html {
    font-size: 1rem;
    color: var(--text-main);
    font-family: ui-sans-serif, system-ui, sans-serif,"Segoe UI", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.6;
}

body {
    margin: 0;
    background-color: var(--bg-main);
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-image: url(../images/VDay-en.png);
}

/* width */
::-webkit-scrollbar {
    width: 5px;
}

/* Track */
::-webkit-scrollbar-track {
    background: var(--scroll-track);
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 5px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-hover);
}

.header {
    display: flex;
    position: sticky;
    top: 0px;
    z-index: 1;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    height: 57px;
    backdrop-filter: blur(20px);
    background-image: url(../images/hautgauche.png);
    background-repeat: no-repeat;
    border-image: linear-gradient(90deg, rgba(0, 0, 0, 0.5), rgba(100, 100, 100, 0.25)) 1;
}

#titre_header {
    padding-left: 10px;
    font-size: 3rem;
    color: rgb(255, 255, 255);
}


/* debut Menu */

#menu {
    display: block;
    position: sticky;
    top: 50px;
    width: 100%;
    height: 40px;
    z-index: 1;
    backdrop-filter: blur(20px);

}

#menu ul {
    list-style-type: none;
    margin: 0px auto;
    padding-right: 10px;
}

#menu li {
    float: left;
}

#menu a {
    display: block;
    color: var(--text-main);
    padding: 8px 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 5px;
}

#menu li a:hover {
    color: var(--text-main);
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* fin Menu */

.admin_page {
    display: block;
    position: relative;
    padding: 10px;
}

.admin_page a {
    color: var(--text-main);
}

.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
    align-content: center;
    width: 100%;
    padding-top: 10px;
    padding-bottom: 145px;

}

.footer {
    position: fixed;
    bottom: 0px;
    width: 100%;
    height: 45px;
    color: var(--text-main);
    text-align: center;
    backdrop-filter: blur(20px);
    background-image: url(../images/basdroite.png);
    background-position: bottom right;
    background-repeat: no-repeat;
    border-top: 1px solid;
    border-image: linear-gradient(90deg, rgba(100, 100, 100, 0.25), rgb(0 0 0 / 50%)) 1;
}

.error {
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    color: var(--text-main);
    background-color: var(--msg-error);
}

.success {
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    color: var(--text-main);
    background-color: var(--msg-success);
}

/* Block */
.pub {
    display: block;
    text-align: center;
    overflow: hidden;
    width: auto;
    /*height: 100px;*/
}

/* --- Regroupement des styles de blocs (DRY) --- */
.blk_std, .article, .blk_projet {
    backdrop-filter: blur(20px);
    background-color: var(--bg-block);
    box-shadow: var(--shadow-main);
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Styles spécifiques par type de bloc */
.blk_std, .blk_projet {
    width: auto;
    margin: 20px;
    padding: 10px;
}
.article {
    width: 450px;
    padding: 20px;
    margin: 10px;
}

.blk_std:hover, .article:hover, .blk_projet:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Elements enfants des blocs */
.blk_std #video, .article #video, .blk_projet #video { margin: 0 auto; }
.blk_std #video { width: 500px; }
.article #video {
    max-width: 95%;
    min-width: 60%;
}
.blk_projet #video { width: 90%; }

.blk_std img, .article img, .blk_projet img { width: 10vw; }

.blk_std #other, .article #other, .blk_projet #other {
    margin: 0 auto;
    width: 90%;
    height: 100%;
}

.blk_std a, .article a, .blk_projet a { color: var(--text-main); }
.blk_std #description, .article #description, .blk_projet #description { text-align: left; }
.blk_std #description p, .article #description p, .blk_projet #description p { line-height: 1.5em; margin: 10px; }
.blk_std #date p, .article #date p, .blk_projet #date p { font-size: 0.7rem; }

.article-full {
    width: 80%;
    margin: 0 auto; /* Pour centrer l'article s'il ne prend pas toute la largeur */
}


/* cat */
#Gaming {
    background-color: rgba(143, 0, 0, 0.5);
}


#Web {
    background-color: rgb(228 43 186 / 0.5);
}

#Crypto {
    background-color: rgba(141, 118, 0, 0.5);
}

#Video {
    background-color: rgb(122, 122, 122, 0.5);
}

#Projet {
    background-color: rgb(23 84 123 / 0.5);
}

/* --- Layouts des sections --- */
.homesection, .projet, .videosection, .adminsection {
    display: flex;
    width: 100%;
    max-width: 1200px;
    flex-direction: row;
    flex-wrap: wrap;
}

.homesection, .projet, .videosection {
    justify-content: center;
}

.homesection {
    align-items: stretch;
}

.projet {
    align-items: center;
}

/* Admin */
.adminsection {
    align-items: flex-start;
    flex-wrap: nowrap;
}

.editor-container {
    border: 2px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.toolbar {
    background: #f5f5f5;
    padding: 10px;
    border-bottom: 2px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.toolbar button {
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.toolbar button:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.toolbar button:active {
    transform: scale(0.95);
}

.toolbar .separator {
    width: 1px;
    background: #ccc;
    margin: 0 5px;
}

#editor {
    min-height: 200px;
    padding: 15px;
    outline: none;
    font-size: 14px;
    line-height: 1.6;
}

#editor:empty:before {
    content: attr(data-placeholder);
    color: #999;
}

.html-preview {
    margin-top: 10px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    max-height: 150px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Home */

.gjack_home {
    display: flex;
    width: 90vw;
    flex-direction: row;
    justify-content: space-evenly;
    flex-wrap: nowrap;
    margin-bottom: 15px;
}

.element {
    display: block;
    width: 40px;
    height: 40px;
    margin: 5px;
    border-radius: 10%;
    overflow: hidden;
    box-shadow: 1px 1px 20px 5px rgb(0, 0, 0);
    transform: scale(1);
    opacity: 0.90;
    transition-duration: 400ms;
}

.element:hover {
    transition-duration: 400ms;
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 0.8);
}

.bk_gauche {
    display: flex;
    width: 100px;
    flex-direction: row;
    align-items: flex-start;
    align-content: space-around;
    justify-content: flex-start;
    flex-wrap: wrap;

}

.bk_centre {
    height: 250px;
    margin: 10px;
    backdrop-filter: blur(25px);
    background-color: rgba(30, 30, 30, 0.70);
    box-shadow: 1px 1px 20px 7px rgb(0, 0, 0);
    border-radius: 10px;
    overflow: hidden;
}

.bk_droit {
    display: flex;
    width: 100px;

}

.bk_fixed {
    display: block;
    position: fixed;
    top: 100px;
    right: 10px;
    z-index: 1;
    max-width: 350px;
    padding: 10px;
    text-align: left;
    backdrop-filter: blur(25px);
    background-color: rgb(0 70 100 / 70%);
    box-shadow: var(--shadow-main);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bk_fixed:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

#scroll {
    height: 150px;
    overflow-y: auto;


}

#scrolling {
    width: 95%;

    animation: floatText 15s linear infinite;
}

@keyframes floatText {
    0% {
        transform: translatey(100%);
    }

    100% {
        transform: translatey(-100%);
    }
}

#scrolling:hover {
    animation-play-state: paused;
}

.bk_droit img {
    border-radius: 10px;
}



#gjack {
    width: 90px;
    height: 90px;
    border-radius: 10%;
    background-image: url(../images/01.jpg);
    background-size: contain;
    background-repeat: no-repeat;
    background-color: rgb(0, 0, 0);
}

#twitter {
    background-image: url(../images/twitter.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-color: #1ca1f3;
}

#insta {
    background-size: contain;
    background-repeat: no-repeat;
    background-image: url(../images/instagram.png), linear-gradient(90deg, rgb(255, 230, 0) 12%, rgba(198, 13, 13, 1) 47%, rgba(151, 0, 170, 1) 100%);
}

#youtube {
    background-image: url(../images/youtube.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-color: rgb(255, 255, 255);
}

#twitch {
    background-image: url(../images/twitch.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-color: #9146ff;
}

#tvlogo {
    background-image: url(../images/tv.jpg);
    background-size: contain;
    background-repeat: no-repeat;
    background-color: rgb(255, 255, 255);
}

.iframeTV {
    display: none;
    position: absolute;
    z-index: 1;
    width: 750px;
    height: 440px;
    backdrop-filter: blur(25px);
    background-color: rgba(30, 30, 30, 0.70);
    border-style: solid;
    border-color: white;
    border-radius: 10px;
    border-width: 3px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0px 0px 15px 0px rgba(255, 255, 255, 0.7);
}

/* Bouton Lire la suite */
.btn-lire-suite {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: var(--text-main) !important; /* !important pour forcer la couleur sur le lien */
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-lire-suite:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Layout pour le résumé d'article avec miniature */
.article-summary-container {
    display: flex;
    align-items: flex-start; /* Aligne le haut de l'image avec le haut du texte */
    gap: 20px; /* Espace entre l'image et le texte */
}

.summary-thumbnail {
    flex-shrink: 0; /* Empêche l'image de se réduire */
    width: 150px; /* Largeur fixe pour la miniature */
}

.summary-thumbnail img {
    width: 100%;
    height: 100px; /* Hauteur fixe */
    object-fit: contain; /* Recadre l'image pour remplir l'espace sans la déformer */
    border-radius: 8px;
    display: block;
    transition: transform 0.3s ease;
}

.summary-thumbnail img:hover {
    transform: scale(1.05);
}

/* Adaptation du résumé et des articles pour les téléphones (Mobile Responsive) */
@media (max-width: 600px) {
    .article {
        width: 100%; /* S'assure que la carte ne déborde pas de l'écran */
        box-sizing: border-box;
    }
    .article-summary-container {
        flex-direction: column; /* Empile l'image au-dessus du texte */
    }
    .summary-thumbnail {
        width: 100%; /* La miniature prend toute la largeur de l'article */
    }
    .summary-thumbnail img {
        height: 150px; /* Rend l'image un peu plus haute sur mobile pour un meilleur rendu */
    }
}

/* Style adapté pour les petits écrans (mobiles/tablettes) */
@media (max-width: 768px) {
    .article-full {
        width: 100%;
        padding: 0 10px; /* Ajoute un petit espace sur les bords du téléphone */
    }
}