/* =========================================
   1. BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-image: url('Images/Background.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: 'Press Start 2P', cursive;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    position: relative;
    cursor: url("Cursor.jpg"), auto;
    overflow-x: hidden;
}

h1, a {
    text-shadow: 4px 4px 0px #000000;
}

/* Effet CRT */
body::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 10;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}


/* =========================================
   2. ANIMATIONS & BACKGROUND (CIEL)
   ========================================= */
.sky-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    filter: drop-shadow(0 0 2px white);
}

.shooting-star {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 80px;
    height: 2px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 100%);
    border-top-right-radius: 50%;
    border-bottom-right-radius: 50%;
    transform: rotate(165deg);
    transform-origin: right center;
    opacity: 0;
}

@keyframes shoot {
    0% {
        top: -10%;
        right: -10%;
        transform: rotate(165deg) translateX(0);
        opacity: 1;
    }
    100% {
        top: 50%;
        right: 120%;
        transform: rotate(165deg) translateX(-200px);
        opacity: 0;
    }
}

.star-1 { animation: shoot 2.5s linear 0s infinite; }
.star-2 { top: -30%; animation: shoot 5s linear 2s infinite; }
.star-3 { top: -20%; animation: shoot 3.5s linear 4s infinite; }
.star-4 { top: -10%; animation: shoot 2s linear 1.5s infinite; }


/* =========================================
   3. ELEMENTS PRINCIPAUX (TITRE & PERSO)
   ========================================= */
h1, .character-container, .menu-grid {
    position: relative;
    z-index: 2;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 160px; 
    margin-top: -180px;
    text-transform: capitalize;
    text-align: center;
    line-height: 1.5;
    overflow: hidden;
    border-right: .15em solid transparent;
    white-space: nowrap;
    margin-left: auto;
    margin-right: auto;
    width: 0;
    animation: typing 3.5s steps(30, end) forwards, blink-caret .75s step-end 5;
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.5rem;
        margin-bottom: 120px;
        white-space: normal;
        border: none;
        width: auto;
        animation: none;
    }
}

@keyframes typing {
    from { width: 0 }
    to { width: 13ch; }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: orange }
}

/* Personnage */
.character-container {
    margin-bottom: 50px;
    position: relative; 
}

.pixel-char {
    width: 120px;
    height: auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    filter: drop-shadow(4px 4px 0px #000000);
}

/* --- BULLE  --- */
.home-speech-bubble {
    position: absolute;
    bottom: 90%; 
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 20px;
    width: 600px; 
    background-color: white;
    border: 3px solid black;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
    z-index: 10;
    animation: floatBubble 3s ease-in-out infinite;
}

.home-speech-bubble p {
    color: black;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    line-height: 1.6;
    text-align: center;
    margin: 0;
    text-shadow: none;
}

.home-speech-bubble::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    margin-left: -10px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: black transparent transparent transparent;
}

.home-speech-bubble::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    margin-left: -7px;
    border-width: 7px 7px 0;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

@keyframes floatBubble {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

@media (max-width: 650px) {
    .home-speech-bubble {
        width: 300px;
        left: 50%;
        bottom: 100%;
    }
}


/* =========================================
   4. MENU NAVIGATION
   ========================================= */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 80px;
    row-gap: 50px;
    text-align: center;
}

/* Menu Mobile  */
@media (max-width: 600px) {
    .menu-grid {
        grid-template-columns: 1fr;
        row-gap: 30px;
    }
}

.menu-item {
    text-decoration: none;
    color: white;
    font-size: 1.6rem;
    display: inline-block;
    width: fit-content;
    margin: 0 auto;
    position: relative;
    padding-left: 35px;
    cursor: url('cursor.png'), pointer;
    transition: transform 0.1s ease, color 0.2s;
}

.menu-item::before {
    content: ">";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    color: orange;
    font-size: 1.4rem;
    transition: all 0.2s ease;
    text-shadow: 2px 2px 0px #000;
}

.menu-item:hover {
    color: #f0f0f0;
    transform: scale(1.1);
    text-shadow: 4px 4px 0px #4a4a4a;
}

.menu-item:hover::before {
    opacity: 1;
    left: 10px;
}

.menu-item:active {
    transform: scale(0.95);
    color: #aaa;
}


/* =========================================
   5. MODALE & SCROLLBAR
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.90);
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-window {
    background-color: #2c0e37;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    width: 90%;
    max-width: 1200px;
    height: 80%;
    border: 4px solid white;
    box-shadow: 0 0 0 4px black, 10px 10px 0px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
    transform: translateZ(0);
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px dashed white;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 1.2rem;
    color: orange;
    margin: 0;
    text-shadow: 2px 2px 0 #000;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    white-space: nowrap;
}

.close-btn:hover { color: red; }

.modal-content {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding-right: 10px;
}

/* --- SCROLLBAR RÉTRO  --- */
.modal-content::-webkit-scrollbar,
.levels-container::-webkit-scrollbar,
.stats-content::-webkit-scrollbar,
.contact-content::-webkit-scrollbar { 
    width: 10px; 
}

.modal-content::-webkit-scrollbar-track,
.levels-container::-webkit-scrollbar-track,
.stats-content::-webkit-scrollbar-track,
.contact-content::-webkit-scrollbar-track { 
    background: #1a0822; 
}

.modal-content::-webkit-scrollbar-thumb,
.levels-container::-webkit-scrollbar-thumb,
.stats-content::-webkit-scrollbar-thumb,
.contact-content::-webkit-scrollbar-thumb { 
    background: white; 
    border: 2px solid #1a0822; 
}

/* --- FILTRES (Onglets) --- */
.filter-bar {
    position: relative;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 2px dashed #555;
    padding-bottom: 15px;
    min-height: 40px;
}

.filter-btn {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 0 orange;
    border-color: orange;
    color: orange;
}

.filter-btn.active {
    background-color: orange;
    color: black;
    border-color: orange;
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.5); 
}

.filter-back-btn {
    display: none; 
    position: absolute; 
    left: 0;
    top: 0;
    background-color: transparent;
    border: 2px solid orange; 
    color: orange;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    padding: 8px 12px;
    cursor: pointer;
    margin-right: 15px; 
    transition: all 0.2s;
    text-transform: uppercase;
}

.filter-back-btn:hover {
    background-color: orange;
    color: black;
    box-shadow: 0 0 10px orange;
}

/* Mobile responsive (Filtres) */
@media (max-width: 768px) {
    .filter-bar {
        gap: 10px;
        justify-content: center;
    }
    .filter-btn {
        font-size: 0.6rem;
        padding: 6px 8px;
        flex: 1 1 auto; 
    }
    .filter-back-btn {
        position: relative; 
        left: auto;
        top: auto;
        width: 100%; 
        margin-bottom: 10px;
        text-align: center;
    }
}


/* =========================================
   6. VUE LISTE (CARTES PROJETS)
   ========================================= */
.project-card {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #5d2c70;
    padding: 15px;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: orange;
    background: rgba(0, 0, 0, 0.5);
}

.project-img-container {
    width: 100%;
    height: 140px;
    overflow: hidden;
    border: 2px solid #000;
    margin-bottom: 10px;
    background-color: #000;
}

.actual-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s ease;
}

.project-card:hover .actual-img {
    transform: scale(1.1);
}

.project-card h3 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #fff;
}

.project-card p {
    font-size: 0.6rem;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 15px;
    font-family: 'Press Start 2P', cursive;
}

.tech-stack {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.badge {
    font-size: 0.6rem;
    padding: 4px 6px;
    border-radius: 4px;
    background-color: white;
    color: black;
    font-weight: bold;
    text-shadow: none;
    font-family: sans-serif;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
    white-space: normal;
    text-align: center;
    height: auto;
}

.badge.html { background-color: #ff9f43; }
.badge.css { background-color: #54a0ff; }
.badge.js { background-color: #feca57; }
.badge.php { background-color: #777bb3; }
.badge.wordpress { background-color: #21759b; color: #ffffff;}
.badge.ux { background-color: #54a0ff; color: #ffffff;}
.badge.figma { background-color: #ff9f43; color: #ffffff;}
.badge.ps {background-color: #001e36; color: #31a8ff;}
.badge.ai {background-color: #330000; color: #ff9a00;}
.badge.pr {background-color: #00005b; color: #9999ff;}
.badge.ae {background-color: #03005b; color: #9898fe;}

.project-link {
    margin-top: auto;
    font-size: 0.7rem;
    color: orange;
    text-decoration: none;
    border: 1px solid orange;
    background-color: transparent;
    padding: 8px 12px;
    align-self: flex-end;
    transition: all 0.2s;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
}

.project-link:hover {
    background: orange;
    color: black;
    text-shadow: none;
}


/* =========================================
   7. VUE DÉTAIL (CONTENU)
   ========================================= */
.project-detail-view {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.back-btn {
    background: transparent;
    border: none;
    color: orange;
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 #000;
}

.back-btn:hover { color: white; }

.detail-text p {
    font-family: sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #ddd;
    margin-bottom: 20px;
    white-space: pre-line;
}

.big-link {
    display: inline-block;
    font-size: 1rem;
    padding: 15px 25px;
    background-color: orange;
    color: black;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid white;
    text-shadow: none; 
}

.big-link:hover {
    background-color: white;
    color: black;
    transform: scale(1.05);
}


/* =========================================
   8. VUE DÉTAIL (TECH STACK)
   ========================================= */
.stack-title {
    font-size: 0.8rem;
    color: orange;
    margin-bottom: 15px;
    margin-top: 20px;
    text-transform: uppercase;
    border-bottom: 2px dashed #555;
    padding-bottom: 5px;
    display: inline-block;
}

.tech-stack-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.tech-card {
    background-color: orange;
    display: flex;
    flex-direction: column;
    align-items: center;    
    justify-content: center; 
    padding: 10px 15px;     
    min-width: 80px;        
    border: 2px solid white; 
    box-shadow: 4px 4px 0px black; 
    transition: transform 0.2s;
    cursor: default;
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 6px 6px 0px black;
}

.tech-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 0px rgba(0,0,0,0.2));
    object-fit: contain;
}

.tech-name {
    color: black;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    text-transform: uppercase;
    text-shadow: none;
}

.tech-card.soft {
    background-color: #00d2d3;
    box-shadow: 4px 4px 0px black; 
}

.tech-card.soft:hover {
    box-shadow: 6px 6px 0px black; 
}

/* =========================================
   9. VUE DÉTAIL (CARROUSEL)
   ========================================= */
.carousel-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    width: 100%;
}

.carousel-main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
}

.carousel-frame {
    width: 100%;
    max-width: 600px; /* Limité à 600px */
    height: 350px;
    border: 4px solid white;
    background-color: black;
    overflow: hidden;
    position: relative;
    box-shadow: 4px 4px 0px black;
}

.carousel-arrow {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.1s;
    user-select: none;
}

.carousel-arrow:hover {
    color: orange;
    transform: scale(1.2);
}

.carousel-arrow:active {
    transform: scale(0.9);
}

.carousel-dots-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: #333;
    border: 2px solid white;
    display: inline-block;
    cursor: pointer;
    box-shadow: 2px 2px 0px black;
}

.dot.active {
    background-color: orange;
    transform: scale(1.1);
}

/* =========================================
   11. PAGE COMPÉTENCES
   ========================================= */

.stats-content {
    display: flex;
    gap: 40px;
    height: 100%;
    overflow-y: auto; 
    overflow-x: hidden;
    padding: 10px 10px 60px 10px;
}

/* Mobile responsive (Compétences) */
@media (max-width: 768px) {
    .stats-content {
        flex-direction: column;
    }
    .profile-section {
        border-right: none;
        border-bottom: 2px dashed #555;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
}

/* --- COLONNE GAUCHE (PROFIL) --- */
.profile-section {
    flex: 1;
    min-width: 250px;
    border-right: 2px dashed #555; 
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-card {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border: 2px solid white;
    box-shadow: 4px 4px 0px black;
}

.profile-avatar {
    width: 100px;
    margin-bottom: 15px;
    border: 2px solid orange;
    background: black;
    padding: 5px;
}

.profile-info h3 {
    font-size: 1rem;
    color: orange;
    margin-bottom: 10px;
}

.class-label, .level-label {
    font-size: 0.7rem;
    color: #ccc;
    margin-bottom: 5px;
    font-family: 'Press Start 2P', cursive;
}

.highlight {
    color: white;
    font-weight: bold;
}

.rpg-stats {
    width: 100%;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.stars {
    color: orange;
    letter-spacing: 2px;
}


/* --- COLONNE DROITE (SKILLS) --- */
.skills-section {
    flex: 2; 
}

.skill-category {
    margin-bottom: 30px;
}

.skill-category h3 {
    font-size: 0.9rem;
    color: #00d2d3; 
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cat-icon {
    width: 24px;
    filter: invert(1); 
}

/* BARRES DE PROGRESSION RETRO */
.skill-bar-container {
    margin-bottom: 20px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin-bottom: 8px;
    font-family: 'Press Start 2P', cursive;
}

.progress-bar-bg {
    width: 100%;
    height: 20px;
    background-color: #222;
    border: 2px solid white;
    box-shadow: 2px 2px 0px black;
    position: relative;
    padding: 2px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%; 
    transition: width 1s ease-out;
    position: relative;
}

/* Texture rayée pour l'effet rétro */
.progress-bar-fill::after {
    content: " ";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0,0,0,0.2) 10px,
        rgba(0,0,0,0.2) 20px
    );
}

/* Couleurs des barres */
.progress-bar-fill.orange { background-color: #ff9f43; }
.progress-bar-fill.yellow { background-color: #feca57; }
.progress-bar-fill.blue { background-color: #54a0ff; }
.progress-bar-fill.green { background-color: #1dd1a1; }
.progress-bar-fill.purple { background-color: #5f27cd; }
.progress-bar-fill.pink { background-color: #ff9ff3; }


/* =========================================
   10. PERFORMANCE & OPTIMISATIONS
   ========================================= */
body.modal-open {
    overflow: hidden;
}

body.modal-open::after {
    display: none !important;
}

body.modal-open .sky-container {
    display: none;
}

.save-game-btn {
    display: block;
    margin-top: auto;
    background-color: #2ecc71;
    color: black;
    text-decoration: none;
    padding: 15px 10px;
    text-align: center;
    border: 2px solid white;
    box-shadow: 4px 4px 0px black;
    text-shadow: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    line-height: 1.5;
    transition: transform 0.1s, background-color 0.2s;
    cursor: pointer;
}

.save-game-btn small {
    font-size: 0.5rem;
    text-transform: uppercase;
}

.save-game-btn:hover {
    background-color: #27ae60;
    transform: translateY(2px);
    box-shadow: 2px 2px 0px black;
    color: white;
}

.save-icon {
    font-size: 1.2rem;
    vertical-align: middle;
}

.skill-bar-container {
    position: relative; 
    cursor: help; 
}

.rpg-tooltip {
    visibility: hidden;
    opacity: 0;
    
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px); 
    
    width: 250px;
    background-color: #09090b;
    border: 2px solid #00d2d3;
    color: #fff;
    padding: 10px;
    z-index: 10;
    
    font-family: sans-serif;
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    
    transition: all 0.2s ease-in-out;
    pointer-events: none;
}

.rpg-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #00d2d3 transparent transparent transparent;
}

.skill-bar-container:hover .rpg-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.rpg-tooltip strong {
    color: orange;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    display: block;
    margin-bottom: 5px;
}

.rpg-tooltip.bottom {
    bottom: auto;
    top: 100%;
    transform: translateX(-50%) translateY(10px);
}

.rpg-tooltip.bottom {
    bottom: auto;
    top: 100%;
    transform: translateX(-50%) translateY(10px);
}

/* =========================================
   12. PAGE EXPÉRIENCES (LEVEL CARDS)
   ========================================= */

.levels-container {
    height: 100%;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* --- LA CARTE GLOBALE --- */
.level-card {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 4px solid #555;
    box-shadow: 6px 6px 0px black;
    transition: transform 0.2s;
    min-height: 160px;
}

.level-card:hover {
    transform: translateY(-3px);
    border-color: white;
}

/* --- BLOC GAUCHE : THUMBNAIL --- */
.level-thumbnail {
    width: 120px;
    background-color: #222;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 4px solid #555;
    padding: 10px;
    flex-shrink: 0;
}

.level-id {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 10px;
    font-weight: bold;
}

.level-icon {
    width: 48px;
    height: 48px;
    opacity: 0.8;
    margin-bottom: 10px;
    filter: invert(1);
}

.level-status {
    font-size: 0.5rem;
    background-color: #555;
    padding: 4px 6px;
    color: white;
    border-radius: 4px;
}

/* --- BLOC DROIT : INFO --- */
.level-info {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
    border-bottom: 2px dashed #444;
    padding-bottom: 5px;
}

.level-header h3 {
    font-size: 1rem;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.level-date {
    font-size: 0.6rem;
    color: #aaa;
    font-family: 'Press Start 2P', cursive;
    margin-top: 3px;
    white-space: nowrap;
}

.level-zone {
    font-size: 0.7rem;
    color: #ccc;
    font-family: 'Press Start 2P', cursive;
    margin-bottom: 15px;
}

.level-zone .highlight {
    color: orange;
}

.level-desc p {
    font-family: sans-serif;
    font-size: 0.9rem;
    color: #ddd;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* --- FOOTER --- */
.level-footer {
    margin-top: auto; 
    display: flex;
    align-items: center;
    gap: 10px;
}

.loot-label {
    font-size: 0.6rem;
    color: #777;
    font-weight: bold;
}

.loot-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.level-card.current-level {
    border-color: orange;
    background: rgba(255, 165, 0, 0.05);
}

.level-card.current-level .level-thumbnail {
    background-color: #5e3800;
    border-right-color: orange;
}

.level-card.current-level .level-id {
    color: orange;
}

.level-card.current-level .level-status {
    background-color: orange;
    color: black;
    animation: blink 1.5s infinite;
}

.level-card.current-level .level-icon {
    filter: sepia(1) saturate(5) hue-rotate(-50deg);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}


/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {

    /* --- LA BULLE  --- */
    .home-speech-bubble {
        height: 65%;
        width: 300%;
        left: 50%;
        bottom: 100%;
        margin-bottom: 10px;
        transform: translateX(-50%);
        padding: 10px;
    }
    
    .home-speech-bubble p {
        font-size: 0.55rem;
        line-height: 1.4;
    }

    /* --- EXPÉRIENCES --- */
    
    .level-card {
        flex-direction: column; 
        min-height: auto; 
        height: auto;
    }

    .level-thumbnail {
        width: 100%; 
        height: auto;
        padding: 10px 20px;
        flex-direction: row; 
        justify-content: space-between;
        gap: 10px;
        border-right: none; 
        border-bottom: 4px solid #555;
    }
    
    .level-card.current-level .level-thumbnail {
        border-bottom-color: orange;
    }

    .level-id, .level-status {
        margin-bottom: 0; 
        font-size: 0.6rem;
    }
    
    .level-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 0;
    }

    .level-info {
        padding: 15px;
        width: 100%;
    }

    .level-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .level-date {
        white-space: normal; 
    }

    .level-zone {
        white-space: normal;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        line-height: 1.4;
    }
    
    .type-badge {
        margin-left: 0;
    }

    /* --- CONTACT MOBILE --- */
    .contact-content {
        flex-direction: column;
        gap: 20px;
    }

    .contact-info {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .social-links {
        width: 100%;
        display: flex;
        flex-direction: row; 
        justify-content: center;
        gap: 20px;
        margin-bottom: 20px; 
    }

    .social-btn {
        display: flex;
        width: auto;
        padding: 10px 20px;
        justify-content: center;
        flex: 1; 
        max-width: 150px; 
    }
    
    .social-icon {
        display: inline-block;
        margin-right: 10px;
        flex-shrink: 0;
    }
}

.type-badge {
    font-size: 0.5rem;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 10px;
    font-weight: bold;
    border: 1px solid transparent;
    vertical-align: middle;
    display: inline-block;
}

.type-badge.job { background-color: #ff9f43; color: black; }
.type-badge.school { background-color: #54a0ff; color: black; }

/* =========================================
   13. PAGE CONTACT
   ========================================= */

.contact-content {
    display: flex;
    gap: 40px;
    height: 100%;
    padding: 10px;
    overflow-y: auto;
}

/* --- COLONNE GAUCHE --- */
.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.npc-dialogue {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border: 2px solid white;
    box-shadow: 4px 4px 0px black;
}

.npc-avatar {
    width: 60px;
    height: 60px;
    border: 2px solid orange;
    background: black;
    object-fit: contain;
}

.dialogue-box p {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    line-height: 1.6;
    color: orange;
}

/* Boutons Réseaux Sociaux */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    padding: 15px;
    background: black;
    border: 2px solid white;
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.5);
}

.social-icon {
    width: 24px;
    height: 24px;
    filter: invert(1);
}

.social-btn:hover {
    transform: translateX(5px);
    background: #222;
    border-color: orange;
    color: orange;
}

.social-btn:hover .social-icon {
    filter: sepia(1) saturate(5) hue-rotate(-50deg);
}

/* --- COLONNE DROITE (FORMULAIRE) --- */
.contact-form-wrapper {
    flex: 1.5;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #555;
    padding: 20px;
}

.pixel-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.7rem;
    color: #ccc;
    font-family: 'Press Start 2P', cursive;
}

.pixel-form input, 
.pixel-form textarea {
    background-color: #111;
    border: 2px solid #555;
    color: white;
    padding: 12px;
    font-family: monospace;
    font-size: 1rem;
    outline: none;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.5);
    transition: border-color 0.2s;
}

.pixel-form input:focus, 
.pixel-form textarea:focus {
    border-color: orange;
    background-color: #000;
}

.submit-btn {
    margin-top: 10px;
    padding: 15px;
    background-color: orange;
    color: black;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    border: 2px solid white;
    cursor: pointer;
    box-shadow: 4px 4px 0px black;
    transition: transform 0.1s;
}

.submit-btn:hover {
    transform: translateY(2px);
    box-shadow: 2px 2px 0px black;
    background-color: white;
}