body {
    background-color: #000;
    color: #fff;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

#logo {
    text-align: center;
    margin: 20px 0;
    max-width: 100%;
}

#logo img
{
    max-height: 250px;
}

footer {
    text-align: center;
}

.parchment-box {
    /* Centrage et taille du bloc */
    max-width: 800px;
    margin: auto; /* Centre horizontalement avec des marges en haut/bas */
    padding: 20px 40px;
    
    /* Couleur de fond et dégradé subtil pour donner du relief */
    background-color: #f4ecd8;
    background-image: linear-gradient(135deg, #fdf8ef 0%, #eddcc2 100%);
    
    /* Bordure et ombres pour imiter l'épaisseur et le vieillissement */
    border: 2px solid #c5ab80;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 
                inset 0 0 50px rgba(160, 130, 90, 0.15);
                
    /* Style de texte adapté (optionnel) */
    color: #4a3525;
    font-family: 'Georgia', serif;
}

.page-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin: 0 20px;
}

.page-layout .parchment-box {
    box-sizing: border-box;
    flex: 0 1 884px;
    max-width: 884px;
    width: 100%;
    margin: 0;
}

.character-panel {
    box-sizing: border-box;
    flex: 0 0 240px;
    padding: 18px;
    color: #4a3525;
    font-family: 'Georgia', serif;
    background-color: #f4ecd8;
    background-image: linear-gradient(135deg, #fdf8ef 0%, #eddcc2 100%);
    border: 2px solid #c5ab80;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), inset 0 0 30px rgba(160, 130, 90, 0.15);
}

.character-panel h2 {
    margin-bottom: 16px;
    overflow-wrap: anywhere;
}

.character-panel h3 {
    margin: 16px 0 8px;
}

.character-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.character-stat {
    box-sizing: border-box;
    flex: 1 1 55px;
    padding: 6px 8px;
    text-align: center;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid #c5ab80;
    border-radius: 5px;
}

.character-stat dt {
    font-size: 0.8em;
}

.character-stat dd {
    margin: 0;
    font-weight: bold;
}

.character-items {
    margin: 0;
    padding-left: 20px;
}

.character-items li {
    margin: 6px 0;
}

.character-items span {
    white-space: nowrap;
}

.character-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.character-menu > a,
.character-menu form {
    box-sizing: border-box;
    flex: 1 1 100px;
    min-width: 0;
}

.character-menu form {
    margin: 0;
}

.character-menu .btn-parchemin {
    box-sizing: border-box;
    display: block;
    width: 100%;
    padding: 8px 4px;
    font-size: 14px;
}

.character-menu button {
    cursor: pointer;
}

.combat {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid #c5ab80;
    border-radius: 5px;
    padding: 12px;
}

.combat-image {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.combat-texte {
    min-width: 0;
}

@media (max-width: 480px) {
    .combat {
        gap: 10px;
    }

    .combat-image {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }
}

.liste-succes {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    list-style: none;
    margin: 24px 0;
    padding: 0;
}

.succes-card {
    box-sizing: border-box;
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid #c5ab80;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(74, 53, 37, 0.15);
}

.liste-succes > li {
    flex: 1 1 320px;
}

.succes-card > img {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.succes-details {
    min-width: 0;
}

.succes-details h2 {
    margin: 0 0 8px;
    text-align: left;
}

.succes-details p {
    margin: 0;
}

.succes-details .succes-date {
    margin-top: 10px;
    font-size: 0.9em;
    font-style: italic;
}

.notification-succes {
    background: linear-gradient(135deg, #fdf8ef 0%, #eddcc2 100%);
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    width: min(460px, calc(100vw - 32px));
    padding: 18px;
    animation: notification-succes-entree 250ms ease-out both;
}

.notification-succes-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: inherit;
    font: bold 24px/1 Arial, sans-serif;
    background: rgba(74, 53, 37, 0.12);
    border: 1px solid #c5ab80;
    border-radius: 50%;
    cursor: pointer;
}

.notification-succes-close:hover,
.notification-succes-close:focus-visible {
    background: rgba(74, 53, 37, 0.25);
}

.notification-succes.is-closing {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 200ms ease, transform 200ms ease;
}

@keyframes notification-succes-entree {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.liste-personnages {
    display: grid;
    gap: 16px;
    list-style: none;
    margin: 24px 0;
    padding: 0;
}

.personnage-form {
    margin: 0;
}

.liste-personnages > li {
    position: relative;
}

.personnage-item {
    box-sizing: border-box;
    width: 100%;
    padding: 18px 48px;
    color: inherit;
    font: inherit;
    text-align: left;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid #c5ab80;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.1s ease, padding 0.1s ease;
}

.personnage-item:hover,
.personnage-item:focus-visible {
    padding-right: 48px;
    padding-left: 48px;
    background: rgba(255, 255, 255, 0.45);
}

.personnage-delete-form {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    margin: 0;
}

.personnage-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    background: #8b2f20;
    border: 1px solid #4e270a;
    border-radius: 50%;
    cursor: pointer;
}

.personnage-delete:hover,
.personnage-delete:focus-visible {
    background: #b13d2a;
}

.personnage-nom,
.personnage-stats,
.personnage-action {
    display: block;
}

.personnage-nom {
    margin-bottom: 12px;
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
}

.personnage-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.personnage-stats span {
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid #c5ab80;
    border-radius: 5px;
}

.personnage-actif {
    display: block;
    margin-top: 6px;
    font-size: 0.7em;
}

.personnage-action {
    margin-top: 12px;
    font-size: 0.9em;
    text-align: center;
}

/* Style Global */
h1, h2 {
    margin-top: 0;
    text-align: center;
}

label {
    display: inline-block; 
    width: 130px;
    margin-right: 10px;
    margin-bottom: 10px;
}

input[type="number"], input[type="text"], input[type="password"] {
    border-radius: 25px;
    border: 2px solid #4E270A;

    height: 20px;
    margin-bottom: 10px;
    padding: 0 10px;
}

article p{
    text-align: justify;
    text-indent: 20px;
    line-height: 1.6;
}

.inventory-list {
    margin: 20px 0;
    padding: 12px 16px;
}

.inventory-option {
    display: block;
    width: auto;
    margin: 8px 0;
}

.inventory-option input {
    margin-right: 8px;
}

#inventory-count {
    margin-bottom: 0;
}

.center{
    text-align: center;
}

.error-message {
    color: red;
    text-align: center;
    margin-bottom: 10px;
}

.login-container {
    display: flex;
    justify-content: center; /* Centre les colonnes horizontalement (ou space-around / space-between) */
    gap: 40px;               /* Espace entre les deux colonnes */
    flex-wrap: wrap;         /* Permet aux colonnes de passer l'une sous l'autre sur les petits écrans (mobile) */
}

/* Style de chaque colonne individuelle */
.login-column {
    flex: 1;                 /* Permet aux colonnes de prendre une largeur égale */
    min-width: 280px;        /* Évite qu'elles ne deviennent trop étroites sur mobile */
    max-width: 400px;        /* Limite la largeur maximale pour garder un beau formulaire */
    padding: 20px;
    background: rgba(255, 255, 255, 0.8); /* Optionnel : si vous voulez le mettre sur votre fond parchemin */
    border-radius: 8px;
}

.btn-parchemin {
    /* Transformation du lien en bloc interactif */
    display: inline-block;
    padding: 12px 24px;
    
    /* Couleurs de style médiéval / marron */
    background-color: #8B4513; /* Marron cuir / bois */
    background-image: linear-gradient(to bottom, #A0522D, #65350F); /* Dégradé pour le relief */
    color: #FDF8EF; /* Texte couleur parchemin clair */
    
    /* Typographie et bordures */
    font-family: 'Georgia', serif;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none; /* Enlève le soulignement moche */
    border-radius: 25px; /* Arrondit fortement les bords (effet pilule) */
    border: 2px solid #4E270A; /* Bordure sombre pour un meilleur contraste */
    margin:auto;
    
    /* Effet 3D initial (ombre portée sous le bouton) */
    box-shadow: 0 6px 0 #361A06, /* Épaisseur 3D du bouton */
                0 10px 15px rgba(0, 0, 0, 0.4); /* Ombre portée globale */
                
    /* Transition fluide pour les animations */
    transition: all 0.1s ease;
    text-align: center;
}

.choix-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 24px 0;
}

.choix-list .btn-parchemin {
    flex: 1 1 220px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.choix-condition {
    font-size: 0.75em;
    font-weight: normal;
}

.choix-list .choix-indisponible {
    color: #d3c9b8;
    background: #5b5148;
    border-color: #3d352f;
    box-shadow: 0 6px 0 #302923, 0 10px 15px rgba(0, 0, 0, 0.4);
    cursor: not-allowed;
}

.choix-list .choix-indisponible:hover,
.choix-list .choix-indisponible:active {
    background: #5b5148;
    background-image: none;
    transform: none;
}

.choix-admin-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.choix-admin-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.choix-admin-heading h2 {
    margin: 0;
}

.choix-admin-heading .btn-parchemin {
    margin: 0;
    padding: 4px 14px;
    cursor: pointer;
}

.choix-admin-item {
    box-sizing: border-box;
    flex: 1 1 220px;
    min-width: 0;
}

.choix-admin-item textarea {
    box-sizing: border-box;
    width: 100%;
}

.liste-pages {
    list-style: none;
    margin: 24px 0;
    padding: 0;
}

.liste-pages li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid #c5ab80;
}

.liste-pages li p {
    margin-bottom: 0;
}

.liste-pages .btn-parchemin {
    flex-shrink: 0;
}

.supprimer-choix {
    display: block;
    margin: 12px 0 0 auto;
}

/* Effet au survol de la souris */
.btn-parchemin:hover {
    background-color: #A0522D;
    background-image: linear-gradient(to bottom, #B8623B, #783F12);
}

/* Effet 3D au clic (le bouton s'enfonce) */
.btn-parchemin:active {
    transform: translateY(4px); /* Descend le bouton de 4 pixels */
    box-shadow: 0 2px 0 #361A06, /* Réduit l'épaisseur 3D */
                0 5px 8px rgba(0, 0, 0, 0.4); /* Réduit l'ombre */
}

@media (max-width: 1100px) {
    .page-layout {
        flex-direction: column;
        align-items: center;
    }

    .character-panel,
    .page-layout .parchment-box {
        width: 100%;
        max-width: 884px;
        flex-basis: auto;
    }

    .character-panel {
        order: -1;
    }
}

@media (max-width: 520px) {
    .liste-succes > li {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .notification-succes {
        animation: none;
    }

    .notification-succes.is-closing {
        transition: none;
    }
}
