/* --- Style Général --- */
body {
    background-color: #0c0a1a;
    background-image: url('https://avantis.world/perso/IMG/forge.jpg'); /* Fond de forge */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #e0e0e0;
    font-family: sans-serif;
    margin: 0;
}

#overlay {
    background-color: rgba(0, 0, 0, 0.7);
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 5vh 2vw;
    box-sizing: border-box;
}

#generator-container {
    width: 90%;
    max-width: 800px;
    text-align: center;
}

header h1 {
    color: #aaffee;
    font-family: serif;
    font-weight: normal;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.narrator {
    font-style: italic;
    font-size: 1.2em;
    color: #ccc;
    min-height: 1.5em;
}

/* --- Contrôles de Génération --- */
#controls-section {
    background-color: rgba(10, 10, 20, 0.8);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #c8a379;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin-top: 30px;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1;
    min-width: 200px;
}

.control-group label {
    font-size: 0.9em;
    margin-bottom: 5px;
    color: #e0c5a8;
}

.control-group select {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    background-color: rgba(0,0,0,0.5);
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 5px;
}

#generate-btn {
    background-color: #c8a379;
    color: #1a1a2e;
    border: none;
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#generate-btn:hover {
    background-color: #e0c5a8;
}

/* --- Fiche de l'Arme --- */
.hidden {
    display: none !important;
}

#sheet-section {
    margin-top: 30px;
}

#weapon-sheet {
    background-color: #f4f0e8;
    color: #333;
    border: 2px solid #5a4a3a;
    border-radius: 5px;
    padding: 25px;
    text-align: left;
    font-family: serif;
}

.sheet-header {
    text-align: center;
    border-bottom: 2px solid #9c8b7b;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

#weapon-name {
    margin: 0;
    font-size: 2em;
    color: #5a4a3a;
}

.header-details {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    font-style: italic;
    color: #7c6b5b;
}

#properties-list .property-item {
    margin-bottom: 15px;
}

#properties-list h4 {
    color: #5a4a3a;
    border-bottom: 1px solid #c9bfae;
    padding-bottom: 5px;
    margin: 0 0 5px 0;
    font-size: 1.1em;
}

#properties-list p {
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

/* --- Styles pour les nouvelles fonctionnalités --- */
.control-group-checkbox {
    display: flex;
    align-items: center;
    align-self: flex-end;
    gap: 10px;
    padding-bottom: 12px; /* Pour aligner avec le bouton */
}

#weapon-name {
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    border: none;
    border-bottom: 2px dotted #c9bfae;
    text-align: center;
    font-family: serif;
    font-size: 2em;
    color: #5a4a3a;
    margin-bottom: 10px;
    padding-bottom: 5px;
}
#weapon-name:focus {
    outline: none;
    border-bottom-color: #5a4a3a;
}

/* --- Modale de la Forge --- */
#property-selector-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: #1a1a2e; padding: 30px; border-radius: 10px; border: 1px solid #c8a379; max-width: 800px; width: 90%; }
#property-selector-list { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; max-height: 400px; overflow-y: auto; margin: 20px 0; text-align: left; }
.property-choice { display: flex; align-items: center; justify-content: space-between; background-color: rgba(0,0,0,0.2); padding: 8px; border-radius: 4px; }
.property-choice label { cursor: pointer; }
.points-control { display: flex; align-items: center; gap: 8px; }
.points-control .score { font-weight: bold; font-size: 1.2em; }
.points-control button { background: #333; color: white; border: 1px solid #555; width: 24px; height: 24px; cursor: pointer; border-radius: 50%; }
.modal-buttons { margin-top: 20px; display: flex; justify-content: flex-end; gap: 15px; }