/* Collez le CSS de votre site principal ici */
/* Importation d'une police élégante */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Roboto:wght@300;400&display=swap');

body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    display: flex; /* Active Flexbox sur le body */
    flex-direction: column; /* Organise les enfants en colonne */
    min-height: 100vh; /* S'assure que le body prend au moins toute la hauteur de l'écran */
    align-items: center;
}

main {
    flex-grow: 1; /* Permet au main de s'étendre et de prendre tout l'espace disponible */
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Styles pour le sélecteur de langue */
.lang-switcher {
    position: absolute;
    top: 20px;
    right: 25px;
}

.lang-switcher button {
    background: none;
    border: 1px solid #5d5d5d;
    color: #a0a0a0;
    padding: 5px 10px;
    margin-left: 5px;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.lang-switcher button.active {
    background-color: #3e284a;
    color: #f5f5dc;
    border-color: #3e284a;
}

.lang-switcher button:hover:not(.active) {
    color: #f5f5dc;
    border-color: #f5f5dc;
}

header {
    text-align: center;
    padding: 20px 20px;
}

header h1 {
    font-family: 'Cinzel', serif;
    font-size: 3em;
    color: #f5f5dc; /* Un blanc cassé pour le titre */
    margin-bottom: 10px;
	margin-top: 10px;
}

header p {
    font-size: 1.0em;
    color: #a0a0a0;
}

.translator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    justify-content: center;
    margin-bottom: 2px;
    align-items: center; /* Permet de centrer les éléments verticalement */
}

#translate-button {
    background-color: #3e284a;
    color: #f5f5dc;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    /* La largeur est optionnelle, vous pouvez l'ajuster */
    width: 250px; 
}

.button-container {
    display: flex;
    justify-content: center;
    margin: 0px 0; /* Ajoute de l'espace au-dessus et en dessous du bouton */
}
@media (max-width: 768px) {
    .translator-container {
        flex-direction: column; /* Les blocs s'organisent en colonne */
    }

    #translate-button {
        order: 1; /* Le bouton se place en premier dans le conteneur */
    }

    .input-section {
        order: 2; /* Le bloc original se place en second */
    }
    
    .output-section {
        order: 3; /* Le bloc de traduction se place en dernier */
    }
}

.input-section, .output-section {
    flex: 1 1 45%;
    background-color: #1e1e1e;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.output-section {
    flex: 1 1 45%;
    /* ... autres styles ... */
    position: relative; /* Nécessaire pour positionner le bouton à l'intérieur */
}

#copy-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: #3e284a;
    color: #f5f5dc;
    border: none;
    padding: 10px 15px;
    font-size: 0.9em;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#copy-button:hover {
    background-color: #5d386d;
}
h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.5em;
    border-bottom: 2px solid #5d5d5d;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    height: 200px;
    background-color: #2a2a2a;
    color: #f0f0f0;
    border: 1px solid #444;
    padding: 15px;
    resize: none;
    font-size: 1.1em;
    font-family: 'Roboto', sans-serif;
    border-radius: 5px;
    box-sizing: border-box;
}

textarea::placeholder {
    color: #888;
}

#glyph-translation {
    min-height: 200px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    padding: 15px;
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: flex-start;
}

/* Cache les images de glyphes */
#glyph-translation img {
    max-height: 50px;
    display: block;
    opacity: 0; /* Rendre les images invisibles par défaut */
    transform: scale(0.5); /* Réduire leur taille */
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out; /* Ajoute une transition fluide */
}

/* On ne touche pas aux .word-separator ni aux <br> */

.word-separator {
    width: 25px; /* Ajustez cette valeur pour la taille de l'espace entre les mots */
    height: 1px;
    display: inline-block;
}

#translate-button {
    background-color: #3e284a;
    color: #f5f5dc;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    
    /* Styles pour la nouvelle position du bouton */
    width: 250px; /* Largeur fixe pour le bouton */
    margin: 20px auto; /* Centre le bouton et ajoute des marges verticales */
}

#translate-button:hover {
    background-color: #5d386d;
}

/* Styles pour le bandeau de promotion */
.promo-banner {
    background-color: #2a2a2a;
    color: #f5f5dc;
    padding: 15px;
    font-size: 1.1em;
    font-family: 'Cinzel', serif;
    text-align: center;
	border-radius: 5px;
    border-bottom: 2px solid #5d5d5d;
    margin-bottom: -1px;
	transition: background-color 0.3s ease; /* Ajoute une transition douce */

}
.promo-banner:hover {
    background-color: #3e284a; /* Nouvelle couleur d'arrière-plan au survol */
    cursor: pointer; /* Indique que l'élément est cliquable */
}
/* Styles pour le lien du bandeau de promotion */
.promo-banner-link {
    display: block; /* S'assure que le lien prend toute la largeur pour appliquer la marge */
    margin-top: 20px; /* Ajoute une marge en haut */
}
/* Styles pour le pied de page */
footer {
    width: 100%;
    text-align: center;
    padding: 20px;
    background-color: #1e1e1e;
    margin-top: auto;
    border-top: 1px solid #333;
    color: #e0e0e0;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 50px;
    margin-bottom: 10px;
}

.footer-section {
    text-align: center;
}

.footer-section h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.2em;
    color: #f5f5dc;
    margin-bottom: 10px;
}

.footer-links-group {
    display: flex;
    gap: 25px;
    justify-content: center;
}

.footer-links-group a {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.footer-links-group a:hover {
    transform: scale(1.1); /* Effet de zoom au survol */
}

.footer-links-group img {
    width: 60px; /* Taille des logos */
    height: auto;
    border: 1px solid transparent;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

.footer-links-group a:hover img {
    border-color: #f5f5dc;
}

.footer-divider {
    width: 2px; /* Largeur de la barre */
    height: 100px; /* Hauteur de la barre */
    align-self: center; /* Alignement vertical au centre du conteneur flex */
    background: linear-gradient(to bottom, transparent, #3e284a, transparent); /* Un dégradé vertical pour un effet mystique */
}
.legal-info {
    font-size: 0.9em;
    color: #888;
    border-top: 1px solid #333;
    padding-top: 10px;
}

.copyright-notice {
    margin-top: 5px;
    font-style: italic;
}

/* Styles pour le bouton flottant de news */
.news-button-container {
    position: fixed;
    bottom: 770px; /* Augmente cette valeur pour le faire monter au-dessus du footer */
    left: 30px; 
    z-index: 1000;
}

.news-button-container a {
    position: relative; /* Définit le conteneur de référence pour la bulle */
    display: block;
}

.news-button-container img {
    width: 120px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.news-button-container img:hover {
    transform: scale(1.1);
}

/* Styles pour la fenêtre modale */
.modal {
    display: none; /* Cache la fenêtre par défaut */
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: #1e1e1e;
    border: 1px solid #333;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    margin: 10% auto;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    animation-name: animatetop;
    animation-duration: 0.4s;
	
}

.close-button {
    color: #f5f5dc;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover, .close-button:focus {
    color: #9d88ab;
    text-decoration: none;
}

.news-list {
    margin-top: 20px;
    padding: 0 10px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Roboto', sans-serif;
}

.news-list::-webkit-scrollbar {
    width: 8px;
}

.news-list::-webkit-scrollbar-thumb {
    background-color: #3e284a;
    border-radius: 4px;
}

.news-item {
    border-bottom: 1px solid #333;
    padding: 15px 0;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.2em;
    color: #f5f5dc;
    margin-top: 0;
    margin-bottom: 5px;
}

.news-item p {
    font-size: 0.9em;
    color: #a0a0a0;
}

.news-item small {
    display: block;
    text-align: right;
    font-size: 0.8em;
    color: #5d5d5d;
}

/* Animation d'apparition */
@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

/* Styles pour la bulle de dialogue */
.speech-bubble {
    /* Cache la bulle par défaut */
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.5s linear;

    background-color: #2a2a2a;
    color: #e0e0e0;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 120%; /* Positionne la bulle au-dessus de l'image */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Ajoute une petite pointe en bas de la bulle */
.speech-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2a2a2a transparent transparent transparent;
}

/* Affiche la bulle au survol du lien */
.news-button-container a:hover .speech-bubble {
    visibility: visible;
    opacity: 1;
}

.soul-art-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin-top: 20px;
}

.art-palette {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    background-color: #1e1e1e;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.palette-glyph {
    cursor: pointer;
    max-height: 40px;
    transition: transform 0.2s ease;
}

.palette-glyph:hover {
    transform: scale(1.2);
}

.art-canvas {
    width: 100%;
    height: 600px;
    background-color: #121212;
    border: 1px solid #5d5d5d;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
}

.art-canvas img {
    position: absolute;
    max-height: 50px;
}

.art-controls {
    margin-top: 20px;
    margin-bottom: 20px; /* Ajoute une marge en bas */
}

.art-controls button {
    background-color: #3e284a;
    color: #f5f5dc;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    border-radius: 5px;
    margin: 0 10px;
    transition: background-color 0.3s ease;
}

.art-controls button:hover {
    background-color: #5d386d;
}
/* Styles pour les glyphes sur la zone de dessin */
.canvas-glyph {
    position: absolute; /* Indispensable pour que left et top fonctionnent */
    max-height: 50px; /* Taille maximale pour les glyphes */
}

/* Styles pour le menu latéral */
.sidebar {
    width: 200px;
    background-color: #1a1a1a;
    position: fixed; /* Reste en place lors du défilement */
    left: 0;
    top: 50%;
    transform: translateY(-50%); /* Centre le menu verticalement */
    padding: 20px 0;
    z-index: 1001;
	 /* Arrondit les coins du côté droit */
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
}
/* Cache le menu par défaut sur les petits écrans */
.sidebar-hidden {
    transform: translateX(-100%);
}
.sidebar nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sidebar nav li {
    text-align: center;
    margin-bottom: 10px;
}

.sidebar nav a {
    display: block;
    color: #f5f5dc;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 1.1em;
    padding: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar nav a:hover {
    background-color: #3e284a;
    color: #f5f5dc;
}

/* Ajoute un conteneur pour le contenu principal pour laisser de l'espace à la barre latérale */
.content-wrapper {
    margin-left: 220px; /* Décale le contenu principal pour ne pas chevaucher le menu */
    width: calc(100% - 220px);
}
/* Bouton "hamburger" caché par défaut */
.menu-toggle {
    display: none;
    position: absolute;
    left: 20px;
    top: 20px;
    background: none;
    border: none;
    color: #f5f5dc;
    font-size: 2em;
    cursor: pointer;
    z-index: 1001;
}

/* Cache le menu par défaut sur les petits écrans */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: block;
    }
}