/* ==========================================================
   GESTION DES LEXIQUES
   ========================================================== */

.page-heading h1 {
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 5px;
}

.page-heading p {
    color: #6b756f;
    margin-bottom: 0;
}

.form-card,
.list-card {
    overflow: hidden;
}

.required {
    color: #c0392b;
    font-weight: 800;
}

.audio-box {
    height: 100%;
    padding: 18px;
    border: 1px solid #e2e7e4;
    border-radius: 16px;
    background: #fafcfb;
}

.required-audio-box {
    border-color: rgba(211, 171, 79, .55);
    background: linear-gradient(145deg, #fffdf7, #fafcfb);
}

.audio-title {
    font-weight: 800;
    color: var(--primary);
    font-size: 15px;
}

.audio-title i {
    color: var(--secondary);
    margin-right: 5px;
}

.audio-subtitle {
    color: #748078;
    font-size: 12px;
    margin-top: 4px;
}

.audio-controls {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.btn-record,
.btn-stop,
.btn-gold {
    border: none;
    font-weight: 700;
    border-radius: 10px;
    padding: 9px 14px;
}

.btn-record {
    background: var(--primary);
    color: white;
}

.btn-record:hover {
    background: var(--tertiary);
    color: white;
}

.btn-stop {
    background: #c0392b;
    color: white;
}

.btn-stop:hover {
    background: #a93226;
    color: white;
}

.btn-gold {
    background: var(--secondary);
    color: var(--primary);
}

.btn-gold:hover {
    background: #bf9638;
    color: var(--primary);
}

.recording-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 7px 10px;
    border-radius: 9px;
    background: #fff0ef;
    color: #b3372f;
    font-size: 12px;
    font-weight: 700;
}

.recording-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c0392b;
    box-shadow: 0 0 0 5px rgba(192, 57, 43, .10);
    animation: pulse-recording 1s infinite;
}

@keyframes pulse-recording {
    50% { opacity: .35; }
}

.audio-preview {
    width: 100%;
    height: 38px;
    margin-top: 12px;
}

.audio-required-hint {
    margin-top: 8px;
    color: #8a938d;
    font-size: 12px;
}

.audio-required-hint.ready {
    color: #28784d;
    font-weight: 700;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 8px;
    border-top: 1px solid #edf0ee;
}

.filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 12px;
    padding: 16px 18px 10px;
}

.search-wrapper {
    position: relative;
}

.search-wrapper > i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #89938d;
    z-index: 2;
}

.search-wrapper input {
    padding-left: 38px;
}

.legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 0 18px 12px;
    color: #69736d;
    font-size: 12px;
}

.list-columns,
.lexique-row {
    display: grid;
    grid-template-columns: 88px minmax(180px, 1.7fr) minmax(160px, 1.5fr) 145px 75px 52px;
    align-items: center;
    gap: 10px;
}

.list-columns {
    padding: 9px 14px;
    background: #f1f4f2;
    border-top: 1px solid #e3e8e5;
    border-bottom: 1px solid #e3e8e5;
    color: #77817b;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 10px;
    font-weight: 800;
}

.lexiques-list {
    padding: 0;
}

.lexique-row {
    min-height: 58px;
    padding: 7px 14px;
    border-bottom: 1px solid #edf0ee;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
    font-size: 12px;
}

.lexique-row:hover {
    background: #fbfcfb;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    white-space: nowrap;
}

.cell-title {
    color: var(--primary);
    font-weight: 800;
    line-height: 1.3;
}

.cell-translation {
    color: #303934;
    line-height: 1.3;
}

.muted-text,
.no-audio {
    color: #a2aaa5;
    font-style: italic;
}

.category-badge {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 7px;
    background: #edf2ef;
    color: var(--primary);
    font-weight: 700;
    font-size: 10px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-audio,
.btn-delete {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-audio {
    background: rgba(211, 171, 79, .17);
    color: #8a681f;
}

.btn-audio:hover {
    background: var(--secondary);
    color: var(--primary);
}

.btn-delete {
    background: #fff1ef;
    color: #c0392b;
}

.btn-delete:hover {
    background: #c0392b;
    color: #fff;
}

.list-tip {
    color: #77817b;
    font-size: 12px;
}

.loading-box,
.empty-box {
    padding: 35px 20px;
    text-align: center;
    color: #7c8680;
}

.loading-box .spinner-border {
    width: 24px;
    height: 24px;
    color: var(--secondary);
}

.loading-box p,
.empty-box p {
    margin: 8px 0 0;
    font-size: 12px;
}

.empty-box i {
    font-size: 28px;
    color: #c2cac5;
}

.modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
}

.modal-header {
    background: var(--primary);
    color: white;
    border: 0;
    padding: 18px 20px;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-header h5 {
    font-weight: 800;
    margin-bottom: 3px;
}

.modal-header small {
    color: rgba(255,255,255,.72);
}

.modal-footer {
    border-top: 1px solid #edf0ee;
}

.existing-audio-area {
    margin-top: 12px;
    padding: 11px;
    border-radius: 11px;
    background: #f0f4f1;
}

.existing-audio-label {
    display: block;
    color: #68736c;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 3px;
}

.existing-audio-area .audio-preview {
    margin-top: 3px;
}

@media (max-width: 900px) {
    .list-columns,
    .lexique-row {
        grid-template-columns: 76px minmax(150px, 1.4fr) minmax(140px, 1.3fr) 120px 55px 48px;
        gap: 7px;
    }

    .filters {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .list-columns {
        display: none;
    }

    .lexique-row {
        grid-template-columns: 62px 1fr 52px 44px;
        grid-template-areas:
            "status fr audio delete"
            "status ba audio delete"
            "status category audio delete";
        padding: 10px 12px;
        gap: 5px 8px;
    }

    .status-icons {
        grid-area: status;
        align-self: start;
        padding-top: 3px;
        flex-direction: column;
        align-items: center;
    }

    .cell-main {
        grid-area: fr;
    }

    .cell-translation {
        grid-area: ba;
        font-size: 11px;
    }

    .cell-category {
        grid-area: category;
    }

    .cell-audio {
        grid-area: audio;
    }

    .cell-action {
        grid-area: delete;
    }

    .category-badge {
        font-size: 9px;
    }

    .list-tip {
        display: none;
    }
}
