/* 
 * Styles pour les conteneurs et composants pixel
 * Ce fichier contient tous les styles liés aux conteneurs avec effet pixel
 */

/* Styles de base pour les composants */
.component-container {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    overflow-x: hidden;
    position: relative;
    left: 0;
}

/* Conteneur Pixel */
.pixel-container {
    background: #333;
    padding: 0px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    z-index: 2;
}

.pixel-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.15) 0px,
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
}

.pixel-content {
    position: relative;
    z-index: 1;
    color: #fff;
    font-family: 'Press Start 2P', cursive, var(--main-font-family);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.pixel-content h3 {
    color: #FF9800;
    font-size: clamp(1.2rem, 4vw, 2rem);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.7);
}

.pixel-content p {
    font-size: clamp(0.8rem, 2vw, 1rem);
    line-height: 1.6;
    color: #E0E0E0;
}

/* Signature de profil */
.profile-signature {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(3px);
    border-radius: 10px;
    padding: clamp(15px, 3vw, 25px);
    max-width: min(60%, 350px);
    /* Agrandi pour mieux accueillir les icônes sociales */
    margin: 0px auto;
    text-align: center;
    /* Positionnement nécessaire pour s'afficher correctement sur desktop */
    position: relative;
    /* Changed to relative for better mobile control */
    top: 95%;
    /* Remonté de 110% à 95% pour afficher plus haut sur desktop */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.profile-signature img {
    /* Added image styling */
    width: 95%;
    max-width: 340px;
    height: auto;
    /* Maintain aspect ratio */
    margin: 0px auto 0px auto;
    display: block;
    /* Prevents extra space below image */
}


.profile-signature h3 {
    font-family: 'Press Start 2P', cursive;
    color: var(--main-fonts-color);
    font-size: clamp(1rem, 3vw, 1.8rem);
    margin-bottom: 0.5em;
    text-shadow: 2px 2px 0px rgba(161, 136, 127, 0.5);
}



/* Styles spécifiques de base pour la signature de profil */
.profile-signature h3 {
    font-size: 1.2rem;
    font-family: 'Press Start 2P', cursive !important;
}

.profile-signature p {


    white-space: normal;
    letter-spacing: 2.5px;
    font-size: 1.2rem !important;
    color: #FFFFFF !important;
    font-family: 'Press Start 2P', cursive !important;
    color: #fff;
    text-shadow:
        3px 3px 0 #000,
        -3px 3px 0 #000,
        -3px -3px 0 #000,
        3px -3px 0 #000;
}

/* Styles pour écrans moyens */
@media (min-width: 769px) and (max-width: 1199px) {
    .profile-signature {
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        position: absolute !important;
    }

    .pixel-container {
        margin-left: auto !important;
        margin-right: auto !important;
        left: 0 !important;
        right: 0 !important;
        position: relative !important;
    }

    .pixelated-frame-container {
        margin-left: auto !important;
        margin-right: auto !important;
        left: 0 !important;
        right: 0 !important;
        position: relative !important;
    }
}

/* Styles pour grand écran */
@media (min-width: 1200px) {
    .profile-signature {
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        position: absolute !important;
    }

    .pixel-container {
        margin-left: auto !important;
        margin-right: auto !important;
        left: 0 !important;
        right: 0 !important;
        position: relative !important;
    }

    .pixelated-frame-container {
        margin-left: auto !important;
        margin-right: auto !important;
        left: 0 !important;
        right: 0 !important;
    }
}

/* Compatibilité mobile */
@media (max-width: 768px) {
    .component-container {
        padding: 15px;
        width: 100%;
        max-width: none;
    }

    body .pixel-container,
    main .pixel-container,
    .component-container .pixel-container {
        padding: 15px;
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 100vw !important;
        margin: 0 !important;
        height: calc(100vh - 60px) !important;
        min-height: 500px !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    /* Ajustements pour la bulle de profil sur mobile */
    .pixel-profile-container {
        width: 140px;
        right: 0px !important;
        /* Force la position tout à droite */
        margin: 0;
        /* Supprime les marges */
        bottom: 0;
        /* Aligne avec le bas */
        padding-right: 0 !important;
        transform: translateX(0) !important;
        /* S'assurer qu'il n'y a pas de translation */
    }

    .pixel-profile-bubble {
        left: -80px;
        top: -150px;
        /* Ajusté pour être plus près de l'image */
        width: 160px;
    }

    .pixel-profile-bubble-text {
        font-size: 10px;
        padding: 20px;
    }

    .profile-signature {
        width: 80% !important;
        /* Élargi davantage pour que tous les Laure tiennent sur une ligne */
        padding: 15px 10px;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin: 0px auto !important;
        text-align: center;
        max-height: none;
        overflow: visible;
        height: auto !important;
        min-height: 190px !important;
        /* Augmenter la hauteur pour plus d'espace */
    }

    .profile-signature img,
    .pixel-profile-img {
        width: 100%;
        max-width: 340px;
        height: auto;
        margin: 0 auto 0 auto;
        /* Supprimé la marge du bas */
        display: block;
        object-fit: contain;
    }

    /* Styles de base pour l'image de profil pixel */
    .pixel-profile-img {
        width: 80px;
        height: auto;
        object-fit: contain;
        border: none;
        cursor: pointer !important;
        z-index: 10;
        position: fixed;
        bottom: 0;
        right: 0;
        transition: transform 0.3s ease;
        display: block;
        margin: 0;
    }

    .pixel-profile-img:hover {
        transform: scale(1.05);
    }


    .profile-signature h3 {
        font-size: 0.85rem;
        margin-bottom: 12px;
        /* Plus d'espace sous le titre */
        font-family: 'Press Start 2P', cursive !important;
        letter-spacing: 0;
        padding-top: 8px;
        /* Espace au-dessus du titre */
    }

    /* Style de base pour les paragraphes de la signature sur mobile */
    .profile-signature p {
        font-size: 0.85rem !important;
        /* Augmenté davantage pour une meilleure lisibilité */
        white-space: normal;
        margin-top: 5px;
        margin-bottom: 5px;
        /* Réduit l'espace vertical pour un meilleur rendu */
        letter-spacing: 0.2px;
        /* Léger espacement des lettres */
        line-height: 1.3;
        /* Augmenté pour plus d'espace entre les lignes */
        padding: 0 8px;
        /* Plus d'espace horizontal */
        word-spacing: 0px;
        /* Espacement normal entre les mots */
        font-family: 'VT323', monospace !important;
        /* VT323 est la police pixelisée la plus lisible */
        text-shadow: 0.5px 0.5px 0px rgba(255, 255, 255, 0.5), 1px 1px 1px rgba(0, 0, 0, 0.3);
        /* Amélioration de la lisibilité avec contour subtil */
        color: #FFFFFF;
        /* S'assurer que le texte est bien blanc */
        font-weight: normal;
        /* Éviter le gras qui rend parfois le texte pixelisé moins lisible */
    }

    /* Style spécifique pour "Data Scientist & Full Stack Developer" - Version mobile */
    .profile-signature .pixelated-profession {
        /* Style de base pour desktop reste inchangé */
        font-family: 'Silkscreen', 'VT323', monospace !important;
        font-size: 0.9rem !important;
        letter-spacing: 0.5px;
        line-height: 1.4;
        text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5),
            0px 0px 2px rgb(170, 121, 66, 0.7);
        color: #aa7942;
        margin: 6px 0;
        padding: 0 10px;
        font-weight: 400;
    }

    /* Style pour mobile avec très haute priorité - S'applique UNIQUEMENT en vue mobile */
    @media only screen and (max-width: 768px) {
        [class*="pixelated-profession"] {
            font-family: 'Press Start 2P', cursive !important;
            /* Police hautement pixelisée comme "community post" */
            font-size: 0.75rem !important;
            /* Taille ajustée pour la lisibilité */
            letter-spacing: 1px !important;
            /* Plus d'espacement pour meilleure lisibilité */
            line-height: 1.6 !important;
            /* Augmentation de l'espacement des lignes */
            text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.8) !important;
            /* Ombre plus prononcée */
            color: #FFFFFF !important;
            /* Blanc pour un meilleur contraste */
            margin: 8px 0 !important;
            /* Augmentation de l'espacement vertical */
            padding: 0 5px !important;
            /* Espacement horizontal */
            font-weight: normal !important;
            /* Poids normal */
            transform: scale(1, 1.1) !important;
            /* Léger étirement vertical */
        }
    }

    /* Ajustement supplémentaire pour les très petits écrans */
    @media only screen and (max-width: 375px) {

        .profile-signature .pixelated-profession,
        [class*="pixelated-profession"] {
            font-size: 0.65rem !important;
            /* Taille réduite pour les petits écrans */
            letter-spacing: 0.5px !important;
            /* Espacement réduit */
            line-height: 1.5 !important;
            /* Légèrement ajusté */
            padding: 0 2px !important;
            /* Espacement horizontal réduit */
        }
    }
}

/*
 * Styles pour les conteneurs et composants pixel
 * Ce fichier contient les styles généraux pour les conteneurs avec effet pixel
 * 
 * Note: Les styles spécifiques au profil pixelisé (en bas à droite) et à sa bulle 
 * ont été déplacés vers profile-bubble-text-styles.css
 */

/* ============================================
   1. BULLE DE DIALOGUE STANDARD (non-pixel)
   ============================================ */

/**
 * Bulle de dialogue standard
 * - Utilisée dans d'autres parties du site
 */
.speech-bubble {
    position: absolute;
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 50;
    border: 2px solid var(--main-decor-color);
    font-family: 'VT323', monospace;
    font-size: 16px;
    line-height: 1.4;
    pointer-events: none;
}

/**
 * Flèche de la bulle standard (pointe vers le bas)
 */
.speech-bubble:before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
    bottom: -10px;
    left: 140px;
    z-index: 2;
}

/**
 * Bordure de la flèche standard
 */
.speech-bubble:after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid var(--main-decor-color);
    bottom: -12px;
    left: 38px;
    z-index: 1;
}

/* ============================================
   2. ADAPTATIONS RESPONSIVES
   ============================================ */

/* Adaptations desktop */
@media only screen and (min-width: 769px) {

    /* Bulle de dialogue standard au survol sur desktop */
    .profile-container:hover .speech-bubble {
        opacity: 1;
        visibility: visible;
        top: -10px;
        left: 10px;
    }
}

/* Adaptations mobile */
@media only screen and (max-width: 768px) {

    /* Style de la bulle de dialogue standard sur mobile */
    .speech-bubble {
        width: 200px;
        font-size: 14px;
        top: -170px;
        left: -40px;
    }

    /* Espacement supplémentaire pour le conteneur de profil sur mobile */
    .profile-container {
        margin-bottom: 30px;
    }
}