/* Styles pour la fiche de personnage - Époque d'Aristote */

/* Réinitialisation des styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Times New Roman", Times, serif;
}

body {
    background-color: #f4f1ea;
    color: #2c1d0f;
    padding: 20px;
    font-size: 16px;
}

/* Conteneur principal */
.fiche-container {
    max-width: 850px;
    margin: 0 auto;
    background: #fbf7ee url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="150" height="150" opacity="0.05"><path d="M75,0 L150,75 L75,150 L0,75 Z" fill="none" stroke="%23500" stroke-width="1"/></svg>');
    border: 3px double #7d4b1d;
    padding: 25px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* En-tête de la fiche */
.fiche-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #7d4b1d;
    padding-bottom: 15px;
}

h1 {
    font-size: 2.2em;
    color: #4b2c12;
    margin-bottom: 15px;
    font-variant: small-caps;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

h2 {
    font-size: 1.3em;
    color: #4b2c12;
    margin-bottom: 10px;
    font-variant: small-caps;
}

/* Informations du personnage */
.personnage-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 0 auto;
    max-width: 80%;
}

.info-group {
    display: flex;
    align-items: center;
}

.info-group label {
    width: 100px;
    text-align: right;
    padding-right: 10px;
    font-weight: bold;
}

.info-group input {
    flex: 1;
    padding: 5px;
    border: 1px solid #b89c7a;
    background-color: #fffbf6;
    font-size: 0.95em;
}

/* Grille des éléments */
.elements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto auto auto;
    gap: 20px;
    margin-bottom: 25px;
}

/* Styles communs des éléments */
/* Styles pour chaque élément */
.element {
    border: 2px solid;
    padding: 15px;
    border-radius: 8px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: relative;
    min-height: 220px;
}

/* Style spécifique pour l'Éther */
.ether {
    border-color: #8a56c9;
    background-color: rgba(240, 230, 255, 0.5);
    grid-column: 1 / span 2;
    min-height: 150px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.element-header {
    text-align: center;
    margin-bottom: 15px;
    border-bottom: 1px solid;
    padding-bottom: 5px;
    position: relative;
}

/* Styles spécifiques pour chaque élément */
.feu {
    border-color: #d74b4b;
    background-color: rgba(255, 230, 230, 0.5);
}

.feu h2 {
    color: #a92b2b;
}

.air {
    border-color: #6b82d7;
    background-color: rgba(230, 230, 255, 0.5);
}

.air h2 {
    color: #3a4d9e;
}

.terre {
    border-color: #5eaa5e;
    background-color: rgba(230, 255, 230, 0.5);
}

.terre h2 {
    color: #2d7a2d;
}

.eau {
    border-color: #4ea2c7;
    background-color: rgba(230, 240, 255, 0.5);
}

.eau h2 {
    color: #297392;
}

.ether h2 {
    color: #6a3b9e;
}

/* Conteneur des points */
.points-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* Style des points */
.point {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.point.checked {
    background-color: currentColor;
}

.point.checked::after {
    content: "✓";
    color: white;
    position: absolute;
    font-size: 0.85em;
}

.point.used {
    opacity: 0.4;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" opacity="0.8"><path d="M7,7 L23,23 M23,7 L7,23" stroke="%23000" stroke-width="2"/></svg>');
}

/* Sections complémentaires */
.sections-complementaires {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.sections-complementaires h2 {
    font-size: 1.1em;
    border-bottom: 1px solid #b89c7a;
    padding-bottom: 5px;
    margin-bottom: 8px;
}

.sections-complementaires textarea {
    width: 100%;
    height: 120px;
    border: 1px solid #b89c7a;
    background-color: #fffbf6;
    padding: 8px;
    font-size: 0.9em;
    resize: vertical;
}

/* Boutons d'action */
.actions {
    text-align: center;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 2px solid #7d4b1d;
}

button {
    padding: 8px 16px;
    margin: 0 5px 10px;
    background-color: #7d4b1d;
    color: white;
    border: 1px solid #502b0a;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s ease;
    font-family: inherit;
    border-radius: 3px;
}

button:hover {
    background-color: #965d24;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

/* Modal d'importation */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fbf7ee;
    margin: 15% auto;
    padding: 20px;
    border: 2px solid #7d4b1d;
    width: 80%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.close {
    color: #7d4b1d;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #502b0a;
}

#import-data {
    width: 100%;
    border: 1px solid #b89c7a;
    padding: 10px;
    margin: 15px 0;
    font-family: monospace;
}

/* Effet de surbrillance au survol des points */
.point:hover {
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

/* Styles pour les tooltips */
.element-tooltip {
    position: absolute;
    visibility: hidden;
    opacity: 0;
    background-color: #fff;
    color: #333;
    text-align: left;
    border-radius: 5px;
    padding: 10px;
    width: 300px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    border: 2px solid;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 100;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85em;
    margin-top: 5px;
    pointer-events: none;
}

.element-header:hover .element-tooltip {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.element-tooltip p {
    margin: 5px 0;
    line-height: 1.4;
}

/* Styles pour les compétences */
.competences-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.competence, .competence-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9em;
}

.competence label, .competence-total label {
    flex: 1;
    font-weight: bold;
}

.competence input[type="number"] {
    width: 60px;
    text-align: center;
    padding: 3px;
    border: 1px solid #b89c7a;
    background-color: #fffbf6;
    border-radius: 3px;
}

.ether-description {
    text-align: center;
    font-style: italic;
    margin-top: 15px;
    font-size: 0.9em;
    color: #6a3b9e;
}

.competence-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #b89c7a;
    margin-bottom: 10px;
}

.ether-points {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.competence-total input {
    width: 60px;
    text-align: center;
    padding: 3px;
    border: 1px solid #b89c7a;
    background-color: #f0e8d8;
    font-weight: bold;
    border-radius: 3px;
    color: #4b2c12;
    cursor: pointer;
}

.feu .element-tooltip {
    border-color: #d74b4b;
    background-color: rgba(255, 245, 245, 0.98);
}

.air .element-tooltip {
    border-color: #6b82d7;
    background-color: rgba(245, 245, 255, 0.98);
}

.terre .element-tooltip {
    border-color: #5eaa5e;
    background-color: rgba(245, 255, 245, 0.98);
}

.eau .element-tooltip {
    border-color: #4ea2c7;
    background-color: rgba(245, 250, 255, 0.98);
}

.ether .element-tooltip {
    border-color: #8a56c9;
    background-color: rgba(245, 240, 255, 0.98);
}

/* Responsive */
@media (max-width: 768px) {
    .fiche-container {
        padding: 15px;
    }
    
    .personnage-info {
        grid-template-columns: 1fr;
    }
    
    .elements-grid {
        grid-template-columns: 1fr;
    }
    
    .ether {
        grid-column: 1;
    }
    
    .sections-complementaires {
        grid-template-columns: 1fr;
    }
    
    button {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .competences-container {
        gap: 5px;
    }
    
    .competence, .competence-total {
        font-size: 0.85em;
    }
    
    .competence input[type="number"], .competence-total input {
        width: 50px;
    }
}