/*
 * ------------------------------------------------------------
 * GLOBAL STYLES
 * ------------------------------------------------------------
 */

 body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: white;
    color: #333;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/*
 * ------------------------------------------------------------
 * COULEURS FLUTTER (VARIABLES CSS)
 * ------------------------------------------------------------
 */

:root {
    --flutter-blue: #02569B;
    --flutter-light-blue: #5AC8FA;
    --flutter-teal: #00BFA5;
    --flutter-yellow: #FFCA28;
    --flutter-orange: #FF9800;
}

/*
 * ------------------------------------------------------------
 * SECTION DE BIENVENUE
 * ------------------------------------------------------------
 */

.welcome-section {
    background-color: #6066d6; /* Couleur de fond */
    color: white;
    padding: 80px 20px;
    display: flex;
    justify-content: center; /* Centre les éléments horizontalement */
    align-items: center; /* Centre les éléments verticalement */
    gap: 40px; /* Espace entre le texte et l'image */
}

.welcome-text {
    text-align: left;
    max-width: 40%;
    padding: 20px;
    border-radius: 10px;
}

.welcome-text h1 {
    font-size: 4em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-text p {
    font-size: 1.2em;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.welcome-section .cta-button {
    background-color: var(--flutter-yellow);
    color: var(--flutter-blue);
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block; /* Pour que la largeur s'adapte au contenu */
}

.welcome-section .cta-button:hover {
    background-color: var(--flutter-orange);
    color: white;
}

.flutter-image-container {
    max-width: 35%;
    text-align: left; /* Réaligne le contenu à gauche pour un meilleur centrage global */
}

.flutter-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}








/*
 * ------------------------------------------------------------
 * SECTION DES TECHNOLOGIES
 * ------------------------------------------------------------
 */






/* Styles pour la section contenant les technologies */
.section-technologies {
    padding: 80px;
    margin-bottom: 30px;
    text-align: center;
    background-color: #eee;
}

/* Styles pour le titre de la section des technologies */
.section-titre {
    font-size: 34px;
    font-weight: bold;
    margin-bottom: 40px;
    color: #333;
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
    display: inline-block;
}

/* Styles pour le conteneur des filtres de technologies */
.filtres-technologies {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

/* Styles pour chaque bouton de filtre */
.filtre {
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    background-color: #eee;
    color: #333;
    font-weight: bold;
    transition: background-color 0.4s ease;
}

.filtre:hover {
    background-color: #ddd;
}

.filtre.actif {
    background-color: #6066d6;
    color: white;
    border-color: #6066d6;
}

/* Styles pour la liste des compétences (technologies) */
.competences-liste {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    
}

/* Styles pour chaque boîte de compétence (contenant une technologie) */
.competence-boite {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    display: none; /* Masque toutes les boîtes de compétences par défaut (affichées par JavaScript) */

    opacity: 0; /* Initialement transparent */
    transition: opacity 0.3s ease-out; /* Transition pour l'opacité uniquement pour l'instant */
    transform: translateX(0); /* Position initiale neutre */
}

.competence-boite.afficher {
    opacity: 1;
    transform: translateX(0); /* Position finale visible */
}

/* Classes pour l'animation directionnelle */
.competence-boite.entrer-droite {
    transform: translateX(100%);
    opacity: 0;
}

.competence-boite.entrer-gauche {
    transform: translateX(-100%);
    opacity: 0;
}

.competence-boite.sortir-gauche {
    transform: translateX(-100%);
    opacity: 0;
}

.competence-boite.sortir-droite {
    transform: translateX(100%);
    opacity: 0;
}

/* Styles pour l'image de l'icône de technologie */
.icone-technologie-img {
    width: 40px;
    height: auto;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

/* Styles pour le nom de la technologie */
.nom-technologie {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-grow: 1;
}

/* Styles pour le conteneur de la barre de progression */
.progress-bar-container {
    background-color: #e0e0e0;
    border-radius: 5px;
    height: 8px;
    width: 100%;
    margin-top: auto;
}

/* Styles pour la barre de progression elle-même */
.progress-bar {
    background-color: #6066d6;
    height: 100%;
    border-radius: 5px;
}















/*
 * ------------------------------------------------------------
 * SECTION DES PROJETS
 * ------------------------------------------------------------
 */

.projects-section {
    padding: 40px 20px;
    text-align: center;
    background-color: #fff;
}

.projects-section h2 {
    font-size: 34px;
    font-weight: bold;
    margin-bottom: 40px;
    color: #333;
    border-bottom: 2px solid #555;
    padding-bottom: 5px;
    display: inline-block;
}

.projects-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 20px;
}


/*
 * ------------------------------------------------------------
 * CARTE DE PROJET (PROJECT CARD)
 * ------------------------------------------------------------
 */

.project-card {
    width: 375px;
    height: 667px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    background-color: #f0f0f0;
    overflow: hidden;
    margin-top: 20px;
    text-align: left;
    padding: 20px;
    position: relative; /* Pour positionner les éléments enfants */
    display: flex;
    flex-direction: column; /* Organisation des éléments en colonne */
    align-items: center; /* Centre l'icône horizontalement */
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Icône de l'application */
.app-icon {
    margin-bottom: 10px; /* Espacement entre l'icône et le titre */
}

.app-icon img {
    border-radius: 10px; /* Ajustez la valeur selon vos besoins */
    max-width: 50px;
    height: auto;
    display: block; /* Empêche les marges verticales de s'effondrer */
}

.app-icon i {
    color: var(--flutter-blue); /* Couleur de l'icône (si Font Awesome par exemple) */
    /* Vous pouvez ajouter d'autres styles ici (taille, etc.) */
}

/* Titre du projet */
.project-card h3 {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 10px;
    color: #34495e;
    text-align: center; /* Centre le titre sous l'icône */
}

.flutter-package {
    color: #808080; /* Gris moyen */
  }

/* Description du projet */
.project-card .description-container {
    font-size: 14px;
    color: #333;
    overflow-y: auto; /* Ajoute une barre de défilement si le contenu dépasse */
    flex-grow: 1; /* Permet à la description de prendre l'espace disponible */
    margin-bottom: 10px; /* Marge avant le bouton */
    text-align: left;
}

/* Styles de la barre de défilement pour WebKit (Chrome, Safari) */
.project-card .description-container::-webkit-scrollbar {
    width: 8px;
}

.project-card .description-container::-webkit-scrollbar-track {
    background-color: #f1f1f1;
    border-radius: 4px;
}

.project-card .description-container::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
}

.project-card .description-container::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

/* Styles de la barre de défilement pour Firefox */
.project-card .description-container {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

/* Bouton de test */
.test-button {
    background-color: #6066d6; /* Couleur de fond bleu vif */
    color: white; /* Texte en blanc pour un bon contraste */
    border: none; /* Suppression de la bordure grise */
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease; /* Animation de la couleur de fond au survol */
    margin-top: 15px;
}

.test-button:hover {
    background-color: #4c50a7; /* Assombrissement de la couleur au survol pour un feedback visuel */
}

.test-button i {
    margin-right: 10px; /* Espace entre l'icône et le texte du bouton */
    color: white; /* Assurez-vous que l'icône est également blanche */
}

/* Style appliqué lorsque le bouton de test est actif (si vous le conservez) */
.test-button.active {
    background-color: #c0392b; /* Couleur rouge pour l'état actif (exemple) */
    color: white;
}

.test-button.active:hover {
    background-color: #a03025; /* Assombrissement de la couleur active au survol */
}


.test-button i {
    margin-right: 10px; /* Espace entre l'icône et le texte du bouton */
}

/* Indication de difficulté */
.difficulty {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
    color: white;
    margin-left: 5px;
}

.difficulty.facile {
    background-color: #4CAF50;
}

.difficulty.moyenne {
    background-color: #FF9800;
}

.difficulty.difficile {
    background-color: #F44336;
}

.difficulty.expert {
    background-color: #7f241e;
}

/*
 * ------------------------------------------------------------
 * CONTENEUR DE L'IFRAME
 * ------------------------------------------------------------
 */

.frame-container {
    position: relative;
    width: 100%;
    height: auto; /* La hauteur s'ajuste au contenu */
    overflow: hidden;
    display: flex;
    flex-direction: column; /* Organise les éléments verticalement */
    justify-content: flex-start; /* Aligne les éléments au début (en haut) */
}

.iframe-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Empêche l'iframe de dépasser */
    flex-grow: 1;
    display: none; /* Caché par défaut */
    background-color: #d0d0d0;
}

.iframe-container.active {
    display: block; /* Affiché lorsque la classe 'active' est ajoutée */
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

/*
 * ------------------------------------------------------------
 * GESTION DE L'AFFICHAGE DESCRIPTION / IFRAME
 * ------------------------------------------------------------
 */

.description-container {
    display: block; /* Affiché par défaut */
}

.description-container.hidden {
    display: none; /* Caché lorsque la classe 'hidden' est ajoutée */
}

/* Styles appliqués lorsque la carte de projet est active */
.project-card.active {
    background-color: #000;
    color: #fff;
}

.project-card.active h3,
.project-card.active p,
.project-card.active strong {
    color: #fff;
}

/* Style appliqué lorsque le bouton de test est actif */
.test-button.active {
    background-color: #f44336;
    color: white;
}

.test-button.active:hover {
    background-color: #e53935;
}

/*
 * ------------------------------------------------------------
 * STYLES RESPONSIVES (MEDIA QUERIES)
 * ------------------------------------------------------------
 */

@media (max-width: 1200px) {
    .project-card {
        width: 320px;
        height: 568px;
    }
}

@media (max-width: 768px) {
    .welcome-section {
        flex-direction: column; /* Empile le texte et l'image */
        text-align: center;
        padding: 80px 20px;
    }

    .welcome-text {
        text-align: center;
        max-width: 100%;
        margin-bottom: 30px;
    }

    .flutter-image-container {
        max-width: 80%;
        text-align: center;
    }

    .welcome-section h1 {
        font-size: 2.5em;
    }

    .welcome-section p {
        font-size: 1.2em;
    }

    .projects-container {
        gap: 30px;
        padding: 10px;
    }

    .project-card {
        width: 90%; /* Exemple : prend 90% de la largeur du parent */
        height: 500px;
        padding: 8px; /* Ajuste cette valeur pour les téléphones si nécessaire */
    }
}