:root {
    --hyrule-green: #2e3d24;   /* Vert sombre, rappelant les forêts d'Hyrule */
    --triforce-gold: #c49b3a;  /* Doré inspiré de la Triforce */
    --rupee-green: #0f9b0f;    /* Vert émeraude des rubis */
    --gerudo-red: #9b2e2e;     /* Rouge profond, inspiré du peuple Gerudo */
    --zora-blue: #2e86ab;      /* Bleu océan des Zoras */
    --kokiri-wood: #503821;    /* Marron boisé des Kokiris */
    --hylian-cream: #f4e8c1;   /* Beige clair pour un effet parchemin */
    --shadow-black: #1a1a1a;   /* Noir profond du royaume du Crépuscule */
}

*,
*::after,
*::before {
    box-sizing: border-box;
}

body {
    gap: 10px;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

.hidden {
    display: none;
}

.video{
    position: fixed;
    top: -40px;
    left: -100px;
    width: 110%;
    height: auto;
    min-width: 110vw;
    min-height: 110%;
    object-fit: cover;
    z-index: -1;
}

.container{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
}


h1 {
    font-family: "Modern Antiqua", serif;
    font-weight: 700;
    font-style: normal;
    font-size: 2em;
    text-align: center;
    padding: 10px;
    border-radius: 15px;
    text-transform: uppercase;
}

.retour{
    font-family: "Kulim Park", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1.2rem;
    position: absolute;
    top: 20px;
    left: 20px;
    text-decoration: none;
    padding-bottom: 20px;
    color: var(--shadow-black);
}

.retour:hover{
    text-decoration: underline;
}

.container-menu{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    height: 100vh;
}

.container-menu a, .list-button a{
    font-family: "Modern Antiqua", serif;
  font-weight: 400;
  font-style: normal;
  padding: 20px;
    border-radius: 15px;
    background-color: var(--hyrule-green);
    color: var(--hylian-cream);
    text-decoration: none;
    text-transform: uppercase;
    outline: solid 2px var(--triforce-gold);
    outline-offset: 0px;
    transition: 0.3s all ease; 
}

.container-menu a:hover , .list-button a:hover{
    background-color: var(--triforce-gold);
    color: var(--shadow-black);
    outline: solid 2px var(--hylian-cream);
    outline-offset: 5px;
}

.container-menu img {
    height: 40vh;
    width: auto;
    margin-bottom: 20px;
}

.links-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-self: center;
    text-align: center;
    gap: 30px;
}


/* FORM */

.container-form{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    height: fit-content;
    width: 50%;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: opacity(0.5);
    border-radius: 15px;
}

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

form>div{
    display: flex;
    flex-direction: row;
    gap: 50px;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

form .form-group{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.form-group img{
    height: 150px;
    width: 150px;
    margin-bottom: 20px;
    cursor: pointer;
    border: solid 2px var(--triforce-gold);
    object-fit: contain;
    object-position: center;
}

form .form-group label, form .form-group span{
    font-family: "Kulim Park", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1.3rem;
}

form span {
    font-family: "Kulim Park", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1rem;
}

input[type="text"], input[type="number"]{
    padding: 10px;
    border-radius: 5px;
    border: 2px solid var(--triforce-gold);
    outline: none;
    margin-bottom: 10px;
    width: 100%;
}

input[type="submit"]{
    font-family: "Kulim Park", serif;
    padding: 10px;
    border-radius: 5px;
    border: 2px solid var(--triforce-gold);
    background-color: var(--hyrule-green);
    color: var(--hylian-cream);
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s all ease;
}

input[type="submit"]:hover{
    background-color: var(--triforce-gold);
    color: var(--shadow-black);
}

input[type="file"]{
    display: none;
}

span.reset{
    font-family: "Kulim Park", serif;
    padding: 10px;
    border-radius: 5px;
    border: 2px solid var(--triforce-gold);
    background-color: var(--hyrule-green);
    color: var(--hylian-cream);
    cursor: pointer;
    transition: 0.3s all ease;
}

span.reset:hover{
    background-color: var(--triforce-gold);
    color: var(--shadow-black);
}


/* LISTE DES PERSOS */

.container-page-list{
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    height: 100vh;
}

.container-list{
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: opacity(0.5);
    border-radius: 15px;
    padding: 40px;
    width: 40%;
    height: fit-content;
}

.card-perso{
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    height: 70vh;
    width: 30%;
    gap: 20px;
    padding: 20px;
    border-radius: 15px;
    background-color: var(--hyrule-green);
    color: var(--hylian-cream);
    border: 4px solid var(--triforce-gold);
    box-shadow: 0 0 15px rgba(196, 155, 58, 0.6);
}

.card-img{
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-perso img{
    height: 300px;
    z-index: 5;
    width: auto;
    border-radius: 15px;
    object-fit: contain;
    object-position: center;
}

.circle-background{
    position: absolute;
    z-index: 1;
    height: 250px;
    width: 250px;
    border-radius: 50%;
    background-color: var(--triforce-gold);
    opacity: 0.8;
    filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-text{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-family:"Modern Antiqua", serif;

}


table {
    width: 95%;
    margin: 20px auto;
    border-collapse: collapse;
    background: var(--hyrule-green);
    color: var(--hylian-cream);
    border: 4px solid var(--triforce-gold);
    box-shadow: 0 0 15px rgba(196, 155, 58, 0.6);
    height: 280px;
}

th, td {
    padding: 12px;
    border: 2px solid var(--triforce-gold);
    text-align: center;
    width: 800px;
}

th {
    background: var(--kokiri-wood);
    font-size: 1.3em;
    text-transform: uppercase;
    position: relative;
}

tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.1);
}

tr:hover {
    background: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    cursor: pointer;
}

thead{
    display: block;
}

.col-id{
    width: 10%;
}


tbody{
    display: block;
    overflow-y: scroll;
    max-height: 50vh;
    scrollbar-color: var(--triforce-gold) var(--hyrule-green);
    scrollbar-width: 15px;
    scrollbar-gutter: 10px;
}

.links-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.links-list a{
    justify-self: center;
}


/* SELECTION PERSOS */


.container-persos{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 80%;
    gap: 20px;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 50px;
    height: 50vh;
}

.carre-perso{
    height: 120px;
    width: 120px;
    padding-top: 10px;
    border: white 1px solid;
    box-shadow: inset 0 0 30px var(--triforce-gold);
    overflow: hidden;
    background-color: var(--hylian-cream);
    transition: all 0.3s ease;
}

.carre-perso img {
    height: 130px;
    width: 120px;
    object-fit: contain;
    object-position: center;
    transition: all 0.5s ease;
}

.perso {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.perso:hover {
    cursor: pointer;
}

.perso:hover .carre-perso {
    box-shadow: 0 0 40px var(--gerudo-red);
}

.perso:hover .carre-perso img {
    transform: scale(1.1);
}

.taken {
    height: 120px;
    width: 120px;
    padding-top: 10px;
    border: white 1px solid;
    box-shadow: inset 0 0 30px var(--triforce-gold);
    overflow: hidden;
    background-color: var(--hylian-cream);
    filter: grayscale(100%);
    cursor: not-allowed;
}
.taken img{
    height: 130px;
    width: 120px;
    object-fit: contain;
    object-position: center;
}

.vs{
    text-transform: uppercase;
    font-family: "Modern Antiqua", serif;
    font-size: 3rem;
}

.perso-selected {
    display: flex;
    width: 30vw;
    align-items: center;
    background-color: rgba(245, 245, 245, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 20px auto;
}

.selected{
    background-color: var(--rupee-green);
    box-shadow: inset 0 0 100px var(--triforce-gold);
}

.perso-selected img {
    height: 200px;
    width: auto;
    max-width: 200px;
    object-fit: cover;
    margin-right: 15px;
}

.infos-perso-selected {
    flex: 1;
    justify-self: flex-end;
}

.infos-perso-selected h2 {
    font-size: 1.5em;
    margin: 0 0 10px;
    font-family: "Modern Antiqua", serif;
    text-transform: uppercase;
}

.infos-perso-selected p {
    width: 50%;
    margin: 5px 0;
    font-weight: bold;
    color: var(--shadow-black);
}

progress {
    width: 60%;
    height: 25px;
    border-radius: 15px;
    overflow: hidden;
}



.flex-ligne{
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
}

/* ECRAN COMBAT */

h2 {
    margin: 0;
    font-family: "Modern Antiqua", serif;
    font-size: 2em;
    text-align: center;
    border-radius: 15px;
    text-transform: uppercase;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: opacity(0.5);
    padding: 10px;
}

.combat-zone {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px;
}

.character {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px 50px;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: opacity(0.5);
    border-radius: 15px;
}

.active {
    background-color: var(--triforce-gold);
}

.character img {
    width: auto;
    height: 300px;
}

.character p{
    font-family: "Kulim Park", serif;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 400;
    font-style: normal;
}

progress {
    width: 100%;
    height: 15px;
    border-radius: 5px;
    border: solid 2px var(--shadow-black);
    overflow: hidden;
}

progress::-webkit-progress-bar {
    background-color: var(--shadow-black);
}

progress::-webkit-progress-value {
    background-color: var(--rupee-green);
}

progress::-moz-progress-bar {
    background-color: var(--rupee-green);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px;
}

button {
    background-color: var(--gerudo-red);
    color: var(--hylian-cream);
    border: none;
    padding: 10px 20px;
    font-size: 1.2em;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Modern Antiqua', serif;
}

button:hover {
    background-color: var(--triforce-gold);
}

.log {
    background-color: var(--zora-blue);
    padding: 10px 20px;
    border-radius: 10px;
    max-width: 600px;
    max-height: 20vh;
    overflow-y: scroll;
    margin: 20px auto;
    font-family: 'Kulim Park', serif;
    line-height: 1.5;
}

.log p:first-child {
    font-size: 1.2em;
    color: var(--hylian-cream);
}

.dead {
    background-color: var(--gerudo-red);
}

/* --- Style de la popup --- */
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: fit-content;
    width: 500px;
    background-color: var(--hylian-cream);
    border: 4px solid var(--triforce-gold);
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
    text-align: center;
    padding: 40px;
    border-radius: 15px;
    font-family: "Kulim Park", sans-serif;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* --- Style du texte dans la popup --- */
.popup h3 {
    color: var(--shadow-black);
    font-family: "Modern Antiqua", serif;
    margin-bottom: 15px;
}

.popup p {
    color: var(--kokiri-wood);
    font-size: 18px;
    margin-bottom: 20px;
}

/* --- Bouton de fermeture --- */
.popup a {
    background-color: var(--rupee-green);
    color: var(--hylian-cream);
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.popup a:hover {
    background-color: var(--gerudo-red);
}
