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

:root {
    --rouge: #8B0000;
    --rouge-vif: #FF1A1A;
    --rouge-fonce: #4a0101;
    --or: #F0A500;
    --or-fonce: #442e0893;
    --bleu: #1A3A6C;
    --bleu-vif: #00A8FF;
    --noir: #0D0D0D;
    --gris: #1A1A1A;
    --gris-metal: #2E2E2E;
    --blanc: #E8E8E8;
}

body {
    background-color: var(--noir);
    background-image: url("../img/fond.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--blanc);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    min-height: 100vh;
}

.btn-back, .btn-soigner {
    display: block;
    width: fit-content;
    margin: 1rem auto;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.1rem;
    transition: color 0.2s, border-color 0.2s;
}

.btn-back {
    border: solid 1px var(--or);
    color: var(--or);
}

.btn-back:hover {
    background: var(--or); 
    color: var(--noir);
}

.btn-soigner {
    margin: auto;
    border: 1px solid var(--bleu-vif);
    color: var(--bleu-vif);
}

.btn-soigner:hover {
    background: var(--bleu-vif);
    color: var(--noir);
}

h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 6rem;
    text-align: center;
    letter-spacing: 0.8rem;
    line-height: 1;
    margin-bottom: 1.5rem;
    color: var(--or);
    text-shadow:
      0 0 10px rgba(187, 128, 51, 0.8),
      0 0 30px rgba(180, 110, 12, 0.4);
}

h1::after {
    content: '';
    display: block;
    width: 60%;
    height: 2px;
    margin: auto;
    background: linear-gradient(90deg, transparent, var(--or), transparent);
}

h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.2rem;
    color: var(--or);
    margin-bottom: 1rem;
}

p {
  text-align: center;
  font-size: 1.1rem;
  color: var(--or);
  background: var(--or-fonce);
  border: 0.8px solid var(--or);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin: 20px auto;
  max-width: 600px;
}

form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 25px;
}

.vs{
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    color: var(--rouge-vif);
    text-shadow:
      0 0 10px rgba(255, 32, 32, 0.8),
      0 0 30px rgba(255, 32, 32, 0.4);
    animation: pulse-vs 2s ease-in-out infinite;
}

@keyframes pulse-vs {
    0%, 100% { 
        transform: scale(1); 
    }
    50% {
        transform: scale(1.08); 
    }
}

.combattant {
    flex: 1;
    min-width: 280px;
    max-width: 380px;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    background-color: var(--gris);
    border: 1px solid var(--gris-metal);
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.combattant:hover {
    border-color: var(--rouge);
    box-shadow:
      0 0 10px rgba(255, 32, 32, 0.604),
      0 0 30px rgba(255, 32, 32, 0.4);
}


.avatar-container-1, .avatar-container-2 {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid var(--gris-metal);
    background: var(--noir);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 4px 20px rgba(0,0,0,0.5);
    transition: border-color 0.3s;
}

.combattant:hover .avatar-container-1, .combattant:hover .avatar-container-2 {
    border-color: var(--rouge);
    box-shadow: 0 0 20px rgba(192, 57, 43, 0.35);
}

.img-perso1, .img-perso2 {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

select {
    width: 100%;
    background: var(--gris);
    color: var(--blanc);
    border: 1px solid var(--gris-metal);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    padding-right: 2.2rem;
    transition: border-color 0.2s;
}

select:focus {
    border-color: var(--or);
}

button[type="submit"]:not(.btn-modifier):not(.btn-supprimer) {
    width: 100%;
    padding: 1rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.1rem;
    color: var(--blanc);
    background: var(--rouge);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

button[type="submit"]:hover:not(.btn-supprimer) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(159, 30, 16, 0.65);
}

.pv-display{
    font-weight: 700;
}

.gestion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    margin-bottom: 1.5rem;
}

.btn-ajouter {
    padding: 10px 20px;
    margin-bottom: 15px;
    margin-right: 10px;
    float: right;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.1rem;
    background: var(--rouge);
    color: var(--blanc);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-ajouter:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139,0,0,0.5);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(22, 19, 19, 0.849);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gris-metal);
}

th {
    background: var(--rouge-fonce);
    color: var(--or);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.1rem;
    padding: 15px;
    text-align: center;
}

td {
    padding: 10px;
    border-bottom: 1px solid var(--gris-metal);
    text-align: center;
}

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

td img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid var(--gris-metal);
    background: var(--noir);
}

.btn-modifier, .btn-supprimer {
    padding: 5px 14px;
    border-radius: 8px;
    font-family: 'Bebas Neue', sans-serif;
    cursor: pointer;
    background: transparent;
    border: 1px solid;
    transition: all 0.2s;
    width: auto;
    display: inline-block;
}

.btn-modifier {
    color: var(--or);
    border-color: var(--or);
}
.btn-modifier:hover {
    background: var(--or);
    color: var(--noir);
}

.btn-supprimer {
    color: var(--rouge-vif);
    border-color: var(--rouge-vif);
}
.btn-supprimer:hover {
    background: var(--rouge-vif);
    color: var(--blanc);
}

.modal-content.open {
    display: flex; 
}

.modal-content {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal {
    background: var(--gris);
    border: 1px solid var(--gris-metal);
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    max-width: 440px;
    position: relative;
}

.modal h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.15rem;
    color: var(--or);
    margin-bottom: 10px;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--blanc);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 6px 10px;
    line-height: 1;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0;
}

.modal input{
    width: 100%;
    background: var(--noir);
    color: var(--blanc);
    border: 1px solid var(--gris-metal);
    border-radius: 8px;
    padding: 8px 15px;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.2s;
}

.modal input[type="submit"] {
    padding: 10px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 0.1rem;
    color: var(--blanc);
    background: var(--rouge);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    transition: transform 0.15s, box-shadow 0.15s;
}
.modal input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139,0,0,0.5);
}

.avatar-preview {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid var(--gris-metal);
    background: var(--noir);
}

@media (max-width: 768px) {
    form {
        flex-direction: column;
        align-items: center;
    }

    .combattant {
        min-width: 400px;
    }

    .vs {
        font-size: 2.5rem;
    }

    td img {
    width: 60px;
    height: 60px;
    }
}