*{
    box-sizing: border-box;
}

body{
    background: url("../public/img/Background.png");
    background-repeat: repeat;
}

/*
-----------------------
STYLES GLOBAUX
-----------------------
*/

form {
    background: #0d0d0d;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
    font-family: "Courier New", monospace;
    margin: 20px 0;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

form label {
    color: #00ccff;
    font-weight: bold;
    font-size: 1.1rem;
}

form input, form select {
    background: #1e1e1e;
    border: 1px solid #00ccff;
    padding: 8px 12px;
    color: #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    outline: none;
    transition: background 0.3s ease, border-color 0.3s ease;
}

form input:focus, form select:focus {
    background: #282828;
    border-color: #00aaff;
}

form button {
    background: #00ccff;
    color: #121212;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

form button:hover {
    background: #00aaff;
    box-shadow: 0 4px 10px rgba(0, 204, 255, 0.5);
}

form:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.7);
}


form select {
    background: #1e1e1e;
    color: #fff;
    border: 1px solid #00ccff;
    border-radius: 5px;
    padding: 8px;
    font-size: 1rem;
    cursor: pointer;
}

form button:hover {
    background: #00aaff;
    box-shadow: 0 4px 10px rgba(0, 204, 255, 0.5);
}


/*
---------------------
MESSAGE D'ERREUR
---------------------
*/

.game-error {
    background-color: #2e2e2e;
    color: #fff; 
    font-family: 'Courier New', Courier, monospace;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    position: relative;
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    max-width: 100%;
}

.game-error .error-icon {
    font-size: 30px;
    margin-right: 15px;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-8px); }
    100% { transform: translateX(0); }
}

.game-error.error {
    background-color: #ff0000;
    border: 3px solid #d40000;
    animation: shake 0.5s ease-out;
}

.game-error.warning {
    background-color: #ffcc00;
    border: 3px solid #e5b300;
}

.game-error.info {
    background-color: #00bfff;
    border: 3px solid #0099cc;
}

.game-error p {
    margin: 0;
    padding: 0;
}

.game-error a {
    color: #fff;
    text-decoration: underline;
    margin-left: 10px;
}




/*
    1. : Index.
*/

/* 
    1.1 : Header 
*/
header {
    background: linear-gradient(90deg, #1e1e1e, #282828);
    padding: 0 20px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;  
    border-radius: 15px;
    height: 150px;  
    
}

header img {
    cursor: pointer;
    max-height: 170px; 
    width: auto;
    transition: transform 0.3s ease;
}

header img:hover {
    transform: rotate(-15deg);
}

nav {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    height: 100%;  
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
    align-items: center; 
    height: 100%;
}

nav ul li a {
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #00ccff;
}

nav ul li a::after {
    content: ''; 
    position: absolute;
    width: 0;
    height: 3px;
    left: 0;
    bottom: -5px;
    background-color: transparent; 
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
    background-color: #00ccff;  
}

header nav ul li {
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeIn 0.5s forwards;
}

header nav ul li:nth-child(1) { animation-delay: 0.2s; }
header nav ul li:nth-child(2) { animation-delay: 0.4s; }
header nav ul li:nth-child(3) { animation-delay: 0.6s; }
header nav ul li:nth-child(4) { animation-delay: 0.8s; }

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center; 
        padding: 15px 20px;
        height: auto;
    }
    nav {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    nav ul {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        margin-top: 10px;
    }
    header img {
        height: 90px;
        margin-bottom: 30px;
    }
}






/*
    1.2 : Présentation 
*/

.presentation {
  max-width: 1400px;
  margin: 50px auto;
  padding: 40px;
  background: linear-gradient(145deg, #1f1f1f, #2c2c2c);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.8;
  color: #e0e0e0; 
}

.presentation h1 {
  color: #00aaff; 
  margin-bottom: 20px;
}

.presentation p {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.presentation strong {
  color: #00aaff;
}

.presentation-content {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.presentation-text {
  flex: 2;
  min-width: 300px;
}

.presentation-photo {
  flex: 1;
  max-width: 300px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.presentation-photo img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.presentation-photo:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.presentation-photo:hover img {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .presentation {
    padding: 30px 20px;
  }

  .presentation p {
    font-size: 1rem;
  }

  .presentation-photo {
    flex: 0 0 100%;
    margin-top: 20px;
  }
}

@media (max-width: 480px) {
  .presentation {
    padding: 20px 15px;
  }

  .presentation p {
    font-size: 0.95rem;
  }
}


/*
   1.3 :   Articles :
*/

.competences {
    max-width: 900px;
    margin: 50px auto;
    padding: 20px;
}

.competence {
    background: #1e1e1e;
    color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tags span {
    background: #2a2a2a;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: default;
}

.tags span:hover {
    background: #00ccff;
    color: #1c1c1c;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 204, 255, 0.6);
}

.competence h2 {
    color: #00ccff;
    margin-bottom: 10px;
}

.competence p {
    line-height: 1.5;
}

@media (max-width: 768px) {
    .competences {
        padding: 15px;
    }
    .competence {
        padding: 15px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .competence {
        padding: 12px;
        font-size: 0.9rem;
    }
}


/* =========================
   SECTION JEUX VIDÉO
========================= */

.pixel-section {
    width: 90%;
    max-width: 1200px;
    text-align: center;
    padding: 40px 0;
    margin: 0 auto;
    font-family: 'Press Start 2P', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pixel-title {
    margin-bottom: 30px;
    font-size: 32px;
    color: #ffcc66;
    text-shadow: 
        2px 2px #333,
        4px 4px #333,
        6px 6px #333;
    display: inline-block;
    position: relative;
}

.pixel-title::before {
    content: "⚔";
    font-size: 32px;
    color: #ffcc66;
    text-shadow: 
        1px 1px #333,
        2px 2px #333,
        3px 3px #333;
    margin-right: 10px;
    display: inline-block;
}

.pixel-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    font-family: 'Press Start 2P', monospace;
}

.pixel-select {
    padding: 12px 20px;
    border: 3px solid #333;
    background-color: #eee;
    color: #111;
    font-size: 12px;
    outline: none;
    cursor: pointer;
    box-shadow: 3px 3px 0 #999;
    font-family: 'Press Start 2P', monospace;
}

.pixel-select option {
    background-color: #eee;
    color: #111;
}

.pixel-button {
    padding: 12px 25px;
    border: 3px solid #333;
    background-color: #ffcc66;
    color: #111;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 3px 3px 0 #999;
    font-family: 'Press Start 2P', monospace;
    transition: transform 0.1s;
}

.pixel-button:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #555;
}

.pixel-select:focus, .pixel-button:focus {
    outline: none;
    border-color: #ff8800;
}

.pixel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    justify-items: center;
    width: 100%;
}

.pixel-jeu {
    border: 3px solid #333;
    box-shadow: 5px 5px 0 #999;
    padding: 15px;
    width: 100%;
    max-width: 250px;
    transition: transform 0.2s;
    text-align: center;
    font-family: 'Press Start 2P', monospace;
    background-color: #f9f9f9;
    color: #111;
}

.pixel-img {
    width: 100%;
    height: auto;
    border: 2px solid #333;
    margin-bottom: 10px;
}

.pixel-jeu-title {
    font-size: 12px;
    margin: 5px 0;
    color: #ffcc66;
    text-shadow: 1px 1px #555;
}

.pixel-jeu-desc {
    font-size: 10px;
    margin: 5px 0;
    color: #222;
    text-shadow: 1px 1px #aaa;
}

.pixel-jeu-tag {
    font-size: 10px;
    color: #ff8800;
    text-shadow: 1px 1px #555;
}

.pixel-jeu:hover {
    transform: translate(-5px, -5px);
    box-shadow: 8px 8px 0 #999;
}

.pixel-error {
    border: 3px solid #ff8800;
    padding: 20px;
    max-width: 400px;
    margin: 20px auto;
    box-shadow: 4px 4px 0 #999;
    font-family: 'Press Start 2P', monospace;
    color: #111;
    background-color: #f5f5f5;
}

.pixel-error-text {
    font-size: 10px;
    margin-top: 10px;
}

@media (max-width: 900px) {
    .pixel-form {
        flex-direction: column;
        gap: 10px;
        width: 100%-20%;
    }
    .pixel-select, .pixel-button {
        width: 100%;
        font-size: 11px;
    }
    .pixel-jeu {
        max-width: 220px;
    }
}

@media (max-width: 500px) {
    .pixel-form {
        flex-direction: column;
        gap: 10px;
    }
    .pixel-select, .pixel-button {
        width: 100%;
        font-size: 10px;
    }
    .pixel-jeu {
        max-width: 90%;
    }
}

/*
=========================
 PROGRAMMATION.
=========================
*/
/* Style de la console (formulaire) */
/* .form-console - style de base */
.form-console {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    padding: 10px;
    border-radius: 8px;
    background-color: #1e1e1e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
    border: 1px solid #444;
}

.terminal-prompt {
    color: #70a1ff;
    font-weight: bold;
    font-size: 1rem;
    margin-right: 12px;
}

.form-console input {
    background: #2a2a2a;
    border: 1px solid #444;
    color: #d1d1d1;
    padding: 10px 12px;
    font-size: 0.9rem;
    width: 100%;
    max-width: 350px;
    font-family: "Courier New", monospace;
    outline: none;
    border-radius: 5px;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.form-console input:focus {
    background: #333;
    transform: scale(1.05);
    box-shadow: 0 0 5px rgba(112, 161, 255, 0.6);
}

.form-console button {
    background: #444;
    color: #d1d1d1;
    padding: 10px 18px;
    border-radius: 5px;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 15px;
}

.form-console button:hover {
    background: #555;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.form-console button:active {
    background: #666;
}

.form-console input[type="text"] {
    max-width: 450px;
}

.form-console .terminal-prompt {
    font-size: 1.2rem;
    color: #70a1ff;
    margin-right: 10px;
}

.form-console span {
    flex-grow: 1;
    width: 100%;  /* Permet au span de prendre toute la largeur de son conteneur */
    text-align: center;
    /*text-overflow: ellipsis;   Ajoute des points de suspension si le texte déborde */
    overflow: hidden;  /* Cache tout excédent de texte */
    white-space: nowrap;  /* Empêche le texte de se plier sur plusieurs lignes */
}


/* Fenêtre de console pour les projets */
.terminal-window {
    position: relative;
    width: 100%;
    max-width: 1000px;
    min-width: 400px;
    margin: 40px auto;
    background-color: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    max-height: 400px;
    overflow: hidden;
}

.terminal-header {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    gap: 12px;
    align-items: center;
    padding-left: 20px;
    height: 30px;
    background-color: #333;
    width: 100%;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    margin: 0;
}

.terminal-header .btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.terminal-header .btn.red {
    background-color: #f28d8d;
}

.terminal-header .btn.yellow {
    background-color: #f3e86e;
}

.terminal-header .btn.green {
    background-color: #9dff91;
}

.terminal-header .btn:hover {
    transform: scale(1.3);
}

.terminal-header .logo {
    width: 16px;
    height: 16px;
    background-color: #70a1ff;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}

.terminal-body {
    margin-top: 30px;
    padding: 20px 25px;
    background-color: #1a1a1a;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    color: #d1d1d1;
    font-family: "Courier New", monospace;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    overflow-y: auto;
    height: auto;
    flex-grow: 1;
    width: 100%;
}

.terminal-body:hover {
    background-color: #111;
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.4);
}

.terminal-body p {
    margin-bottom: 10px;
    line-height: 1.5;
    font-size: 1rem;
    color: #d1d1d1;
}

.terminal-body .user {
    color: #70a1ff;
    font-weight: bold;
}

.terminal-body .command {
    color: #8e8e8e;
}

.terminal-body .prompt {
    color: #70a1ff;
    font-weight: bold;
}

.terminal-body .path {
    color: #8e8e8e;
}

.terminal-body .command-line {
    color: #d1d1d1;
}

.terminal-body .command-line::before {
    content: "PS C:\Users\NathanGiunta\Site portefolio> ";
    color: #70a1ff;
}

.terminal-body a {
    color: #70a1ff;
    text-decoration: none;
    display: inline-block;
}

.terminal-body a:hover {
    opacity: 0.9;
    text-decoration: underline;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.game-error {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f44336;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-top: 30px;
    animation: fadeIn 1s ease-in-out;
}

.game-error .error-icon {
    margin-right: 10px;
    font-size: 1.5rem;
}

.projets-title {
    font-family: "Press Start 2P", monospace;
    font-size: 3rem;
    color: #70a1ff;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    width: 100%;
    overflow: hidden; 
    white-space: nowrap; 
    text-overflow: ellipsis;
    animation: typing 3s steps(30) 1s forwards;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.projets-title::after {
    content: '|';
    position: absolute;
    right: 0;
    top: 0;
    color: #70a1ff;
    animation: disappear 0.5s forwards 3.1s;
}

@keyframes disappear {
    to {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .form-console {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 80%;
        min-width: 300px;
    }

    .terminal-window {
        width: 90%;
    }

    .form-console input {
        width: 100%;
        font-size: 0.8rem;
        padding: 8px;
    }

    .form-console button {
        width: 100%;
        margin-top: 10px;
    }

    .terminal-body p {
        font-size: 0.9rem;
    }

    .projets-title {
        font-size: 6vw; 
        max-width: 100%;
        word-wrap: break-word;
        white-space: normal; /* Permet de forcer l'affichage sur une seule ligne */
        text-overflow: ellipsis; /* Prévenir tout dépassement */
    }

    .form-console span {
        width: 100%;  /* Utilise toute la largeur disponible sur des écrans plus petits */
        font-size: 0.9rem;  /* Réduit la taille du texte pour mieux s'adapter */
        text-overflow: ellipsis;  /* Toujours ajouter des points de suspension si nécessaire */
    }
}

@media (max-width: 480px) {
    .form-console {
        margin: 20px auto;
        gap: 8px;
        padding: 10px;
    }

    .terminal-window {
        width: 95%;
    }

    .form-console input {
        width: 100%;
        font-size: 0.7rem;
        padding: 8px;
    }

    .form-console button {
        width: 100%;
        margin-top: 10px;
        font-size: 0.8rem;
    }

    .terminal-body p {
        font-size: 0.85rem;
    }

    .projets-title {
        font-size: 8vw; 
        max-width: 100%;
        word-wrap: break-word;
        white-space: normal;
        text-overflow: ellipsis;
    }

    .form-console span {
        width: 100%;  /* Utilise toujours 100% de la largeur disponible */
        font-size: 0.8rem;  /* Encore plus petit pour s'ajuster aux très petits écrans */
        text-overflow: ellipsis;  /* Toujours gérer le texte excédentaire avec des points de suspension */
    }
}

.projets-section {
    margin-bottom: 40px;
}

