/* Fichier static/css/styles.css */

/* ----------------------------- */
/*         Styles généraux       */
/* ----------------------------- */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* On évite justify-content: space-between; si la page peut devenir plus grande que la hauteur de la fenêtre */
    min-height: 100vh;  /* Au lieu de height: 100vh, pour laisser la page s'allonger si besoin */
    margin: 0;
    padding: 0;
    background-image: url('/static/img/neo_dr.jpg'); /* Chemin à vérifier */
    background-size: cover;
    background-attachment: fixed;
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    overflow-y: auto; /* Le navigateur gère le scroll si nécessaire */
}

/* Barre de navigation */
.top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    background: none;
    border: none;
    box-shadow: none;
}

/* Style des boutons de la barre supérieure */
.btn-top {
    padding: 10px 20px;
    background-color: #8B0000;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    margin-left: 10px;
    transition: background-color 0.3s;
    border: none;
}

.btn-top:hover {
    background-color: #A00000;
}

/* Date actuelle */
.current-date {
    margin-top: 60px; /* Ajustement pour compenser la barre de navigation fixe */
    text-align: center;
    font-size: 1.2rem;
}

/* Logo Neo */
.logo-container {
    margin-top: 20px;
    text-align: center;
}

.neo-logo {
    font-size: 5rem;
    font-weight: bold;
    color: #FF4F5A;
    text-shadow: 2px 2px #000000;
}

/* Mots-clés */
.keywords {
    margin-top: 20px;
    font-size: 2.5rem;
    color: #FF4F5A;
    text-align: center;
}

.keywords span {
    margin: 0 20px;
    display: inline-block;
}

/* Logos des outils */
.logo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.logo-section img {
    width: 100px;
    height: auto;
    margin: 0 20px;
}

/* Contenu principal */
.container {
    text-align: center;
    margin: 50px 0;
    width: 80%;
    max-width: 1000px;
    padding: 20px;
    border-radius: 10px;
}

/* Boutons généraux */
.buttons {
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #8B0000;
    color: white;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    margin: 10px 5px;
    font-size: 1.1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #A00000;
}

.btn-bottom {
    display: block;
    width: 250px;
    margin: 50px auto;
    text-align: center;
    font-size: 1.2rem;
}

.btn-bottom.disabled {
    background-color: gray;
    cursor: not-allowed;
}

/* Bouton Tutoriel IA en bas à gauche */
.btn-tutorial {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 0.8rem 1.6rem;
    background-color: #8B0000;
    color: white;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    z-index: 1001;
}

.btn-tutorial:hover {
    background-color: #A00000;
}

/* Styles pour la page de résumé des vidéos */
.video-container {
    margin-top: 20px;
}

.video-item {
    margin-bottom: 40px;
    padding: 20px;
    border-radius: 5px;
}

.video-item p {
    margin-bottom: 15px;
    font-size: 1rem;
}

.video-item iframe {
    width: 100%;
    max-width: 560px;
    height: 315px;
    border: none;
    border-radius: 5px;
}

/* Bouton de retour à l'accueil */
.return-home {
    display: block;
    width: 100%;
    text-align: right;
    padding: 10px 20px;
}

.return-home a {
    padding: 10px 20px;
    background-color: #8B0000;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.return-home a:hover {
    background-color: #A00000;
}

/* Animation Matrix */
#matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* ----------------------------- */
/*      Styles "response-frame"  */
/* (pour l'affichage des onglets C++, Blueprints, Explications) */
/* ----------------------------- */
.response-frame {
    background-color: #000; /* Fond noir */
    color: #00FF00;         /* Texte vert clair */
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 0 15px #00FF00;
    font-family: 'Courier New', monospace;
    border-radius: 8px;
    resize: both; /* Permet de redimensionner si besoin */
    border: 1px solid #00FF00;
}

/* Blocs de code (C++, Blueprint, etc.) */
.response-frame pre.code-block {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto; /* Le code peut défiler en largeur si très long */
}

/* Couleur du texte C++ */
.response-frame pre.language-cpp code {
    color: #00FF00;
}

/* Couleur du texte Blueprint */
.response-frame pre.language-blueprint code {
    color: #FFFFFF;
}

/* Explications, on force le wrap pour éviter le scroll horizontal */
.response-frame pre.language-explanation.code-block {
    color: #FFFFFF;
    white-space: pre-wrap;  /* Force le renvoi à la ligne si trop long */
    word-wrap: break-word;  /* Coupe les mots trop longs si nécessaire */
}

/* ----------------------------- */
/*         Spinner de chargement */
/* ----------------------------- */

/* Le conteneur de chargement (spinner) */
#loading {
    display: none;                /* Caché par défaut, activé dynamiquement */
    margin-left: 10px;           /* Espace si placé à côté du bouton "Envoyer" */
    font-size: 0.9rem;
    color: #FF4F5A;
    font-family: 'Courier New', monospace;
    align-items: center;         /* Aligner texte et spinner */
}

/* Le petit rond qui tourne */
#loading-spinner {
    border: 4px solid #888;          /* Couleur grise de base */
    border-top: 4px solid #FF4F5A;   /* Couleur du dessus */
    border-radius: 50%;
    width: 18px;
    height: 18px;
    margin-left: 8px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ----------------------------- */
/*     Styles responsives        */
/* ----------------------------- */
@media (max-width: 600px) {
    .neo-logo {
        font-size: 3rem;
    }
    .keywords {
        font-size: 1.5rem;
    }
    .keywords span {
        margin: 0 10px;
    }
    .logo-section img {
        width: 60px;
        margin: 0 10px;
    }
    .btn {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
        margin: 5px 0;
    }
    .buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .btn-bottom {
        width: 200px;
        font-size: 1rem;
    }
    .container {
        width: 90%;
        padding: 15px;
    }
    .btn-tutorial {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    .top-bar {
        flex-direction: column;
        align-items: flex-end;
        padding: 5px;
    }
    .btn-top {
        margin: 5px 0;
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    .current-date {
        margin-top: 80px; /* Ajustement pour compenser la barre de navigation fixe */
        font-size: 1rem;
    }
    .video-item iframe {
        height: auto;
    }

    /* Adapter l'affichage du conteneur #loading en version mobile */
    #loading {
        margin: 10px 0 0 0; /* Le spinner passe sous le bouton s'il n'y a pas la place */
    }
}
