* { box-sizing: border-box; }

body { margin: 0; color: #1d2939; background: #f2f4f7; font-family: Arial, Helvetica, sans-serif; }

button,
input { font: inherit; }

.admin-page { width: 100%; max-width: 1200px; min-height: 100vh; margin: 0 auto; background: #ffffff; }

.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 24px 30px; color: #ffffff; background: #06276e; }
.admin-header h1 { margin: 0 0 5px; font-size: 25px; }
.admin-header p { margin: 0; opacity: 0.8; }
.admin-header nav { display: flex; gap: 18px; }
.admin-header a { color: #ffffff; }

.admin-content { padding: 30px; }

.admin-intro { margin-bottom: 25px; }
.admin-intro h2 { margin-top: 0; color: #06276e; }

.admin-success,
.admin-error { margin-bottom: 22px; padding: 14px 16px; border-radius: 6px; }

.admin-success { color: #256029; background: #edf7ed; border: 1px solid #a9d5ad; }
.admin-error { color: #912018; background: #fef3f2; border: 1px solid #fecdca; }

.synonyms-table { overflow: hidden; border: 1px solid #d0d5dd; border-radius: 7px; border-collapse: collapse; font-size: 12px; line-height: 1.2; }

.synonyms-header,
.synonyms-row { display: grid; grid-template-columns: minmax(180px, 0.8fr) minmax(300px, 2fr) 70px 105px; align-items: center; gap: 12px; padding: 3px 5px; }

.synonyms-header { color: #344054; background: #f2f4f7; font-size: 13px; font-weight: bold; }
.synonyms-row { border-top: 1px solid #e4e7ec; }

.synonyms-table th,
.synonyms-table td { padding: 3px 6px; vertical-align: middle; }

.synonyms-row input[type="text"] { width: 100%; height: 24px; min-height: 24px; padding: 2px 5px; border: 1px solid #98a2b3; border-radius: 5px; box-sizing: border-box; font-size: 12px; line-height: 1.2; }

.synonyms-row input[type="text"]:focus { border-color: #0a51c7; outline: 0; box-shadow: 0 0 0 3px rgba(10, 81, 199, 0.1); }

.synonyms-table input[type="number"],
.synonyms-table select { height: 24px; min-height: 24px; padding: 2px 5px; box-sizing: border-box; font-size: 12px; line-height: 1.2; }

.enabled-field { display: flex; justify-content: center; }
.enabled-field input { width: 18px; height: 18px; }

.synonyms-table input[type="checkbox"] { margin: 0; transform: scale(0.9); }

.delete-row { min-height: 24px; padding: 3px 7px; color: #b42318; background: #ffffff; border: 1px solid #f0a9a5; border-radius: 5px; cursor: pointer; font-size: 11px; line-height: 1.1; }
.delete-row:hover { background: #fef3f2; }

.synonyms-table button,
.synonyms-table input[type="submit"] { min-height: 24px; padding: 3px 7px; font-size: 11px; line-height: 1.1; }

.synonyms-table p,
.synonyms-table ul { margin-top: 2px; margin-bottom: 2px; }

.admin-actions { display: flex; justify-content: space-between; gap: 20px; margin-top: 22px; }

.button-primary,
.button-secondary { padding: 10px 18px; border-radius: 6px; cursor: pointer; font-weight: bold; }

.button-primary { color: #ffffff; background: #0a51c7; border: 1px solid #0a51c7; }
.button-secondary { color: #344054; background: #ffffff; border: 1px solid #98a2b3; }

.admin-login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }

.admin-login { width: 100%; max-width: 420px; padding: 32px; background: #ffffff; border: 1px solid #d0d5dd; border-radius: 10px; box-shadow: 0 12px 35px rgba(16, 24, 40, 0.12); }

.admin-login h1 { margin: 0 0 7px; color: #06276e; }
.admin-login p { margin: 0 0 25px; color: #667085; }
.admin-login label { display: block; margin-bottom: 8px; font-weight: bold; }
.admin-login input { width: 100%; margin-bottom: 17px; padding: 11px 13px; border: 1px solid #98a2b3; border-radius: 6px; }
.admin-login button { width: 100%; padding: 11px; color: #ffffff; background: #0a51c7; border: 0; border-radius: 6px; cursor: pointer; font-weight: bold; }

.synonyms-admin table { border-collapse: collapse; font-size: 12px; line-height: 1.2; }

.synonyms-admin th,
.synonyms-admin td { padding: 3px 5px; }

.synonyms-admin input,
.synonyms-admin select,
.synonyms-admin button { min-height: 24px; padding: 2px 5px; font-size: 12px; }

@media (max-width: 750px) {
    .admin-header { align-items: flex-start; flex-direction: column; }
    .synonyms-header { display: none; }
    .synonyms-row { grid-template-columns: 1fr; }
    .enabled-field { justify-content: flex-start; }
	
	.weights-header {
        display: none;
    }

    .weights-row {
        grid-template-columns: 1fr;
    }
	
	.variants-header {
        display: none;
    }

    .variants-row {
        grid-template-columns: 1fr;
    }
}








.weights-table {
    overflow: hidden;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.2;
}

.weights-header,
.weights-row {
    display: grid;
    grid-template-columns:
        minmax(250px, 1fr)
        120px
        105px;
    align-items: center;
    gap: 12px;
    padding: 3px 5px;
}

.weights-header {
    color: #344054;
    background: #f2f4f7;
    font-size: 13px;
    font-weight: bold;
}

.weights-row {
    border-top: 1px solid #e4e7ec;
}

.weights-row input[type="text"],
.weights-row input[type="number"] {
    width: 100%;
    height: 24px;
    min-height: 24px;
    padding: 2px 5px;
    border: 1px solid #98a2b3;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 12px;
    line-height: 1.2;
}

.weights-row input:focus {
    border-color: #0a51c7;
    outline: 0;
    box-shadow:
        0 0 0 3px
        rgba(10, 81, 199, 0.1);
}







@media (max-width: 750px) {
    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .synonyms-header,
    .weights-header {
        display: none;
    }

    .synonyms-row,
    .weights-row {
        grid-template-columns: 1fr;
    }

    .enabled-field {
        justify-content: flex-start;
    }
}









.variants-table {
    overflow: hidden;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
}

.variants-header,
.variants-row {
    display: grid;
    grid-template-columns:
        minmax(180px, 0.7fr)
        minmax(300px, 1.5fr)
        105px;
    align-items: center;
    gap: 12px;
    padding: 5px;
}

.variants-header {
    color: #344054;
    background: #f2f4f7;
    font-size: 13px;
    font-weight: bold;
}

.variants-row {
    border-top: 1px solid #e4e7ec;
}

.variants-row input {
    width: 100%;
    min-height: 28px;
    padding: 3px 6px;
    border: 1px solid #98a2b3;
    border-radius: 5px;
    box-sizing: border-box;
}
/* Administration du lexique central */
.admin-page-wide { max-width: 1600px; }
.admin-index { margin-bottom: 26px; padding: 18px; background: #f8fafc; border: 1px solid #d0d5dd; border-radius: 7px; }
.admin-index h2 { margin: 0 0 8px; color: #06276e; }
.admin-index p { margin: 8px 0; }
.admin-index button { padding: 8px 13px; color: #fff; background: #0a51c7; border: 1px solid #0a51c7; border-radius: 5px; cursor: pointer; }
.lexicon-intro { margin-bottom: 15px; }
.lexicon-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.lexicon-toolbar input { width: min(480px, 100%); padding: 9px 11px; border: 1px solid #98a2b3; border-radius: 6px; }
.lexicon-toolbar span { color: #667085; font-size: 13px; }
.lexicon-table { overflow: hidden; border: 1px solid #d0d5dd; border-radius: 7px; font-size: 12px; line-height: 1.2; }
.lexicon-header,
.lexicon-row { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(220px, 1.2fr) minmax(260px, 1.5fr) 85px 55px 90px; align-items: center; gap: 8px; padding: 4px 5px; }
.lexicon-header { color: #344054; background: #f2f4f7; font-size: 13px; font-weight: bold; }
.lexicon-row { border-top: 1px solid #e4e7ec; }
.lexicon-row input[type="text"],
.lexicon-row input[type="number"] { width: 100%; height: 27px; min-height: 27px; padding: 3px 6px; border: 1px solid #98a2b3; border-radius: 5px; font-size: 12px; }
.lexicon-row input:focus { border-color: #0a51c7; outline: 0; box-shadow: 0 0 0 3px rgba(10, 81, 199, .1); }

@media (max-width: 980px) {
    .lexicon-header { display: none; }
    .lexicon-row { grid-template-columns: 1fr; padding: 10px; }
    .lexicon-toolbar { align-items: stretch; flex-direction: column; }
}
