/* ============================================
   Taux de Change TND — Plugin WordPress
   Couleur principale : #4e7caf
   ============================================ */

:root {
    --tct-primary:       #4e7caf;
    --tct-primary-dark:  #3a6090;
    --tct-primary-light: #e8f0f8;
    --tct-bg:            #ffffff;
    --tct-bg-alt:        #f7fafd;
    --tct-border:        #dce8f3;
    --tct-text:          #1a2a3a;
    --tct-text-muted:    #6b8099;
    --tct-radius:        10px;
}

/* Wrapper principal */
#taux-change-tnd,
.tct-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 860px;
    margin: 0 auto 2rem;
    background: var(--tct-bg);
    border: 1px solid var(--tct-border);
    border-radius: var(--tct-radius);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(78, 124, 175, 0.08);
}

/* En-tête */
.tct-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px 16px;
    background: linear-gradient(135deg, var(--tct-primary) 0%, var(--tct-primary-dark) 100%);
    flex-wrap: wrap;
    gap: 12px;
}

.tct-title {
    margin: 0 0 4px 0 !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    letter-spacing: -0.01em;
}

.tct-date {
    margin: 0 !important;
    font-size: 12px !important;
    color: rgba(255,255,255,0.75) !important;
}

/* Barre de recherche */
.tct-search {
    padding: 8px 14px;
    font-size: 13px;
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 6px;
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    outline: none;
    min-width: 200px;
    transition: border-color 0.2s, background 0.2s;
}

.tct-search::placeholder {
    color: rgba(255,255,255,0.6);
}

.tct-search:focus {
    border-color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.25);
}

/* Conteneur tableau */
.tct-table-wrap {
    overflow-x: auto;
}

/* Tableau */
.tct-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tct-table thead tr {
    background: var(--tct-bg-alt);
    border-bottom: 2px solid var(--tct-border);
}

.tct-table th {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--tct-primary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
    border: none !important;
    background: none !important;
}

.tct-th-sigle,
.tct-td-sigle,
.tct-th-unite,
.tct-td-unite {
    text-align: center !important;
}

.tct-th-valeur,
.tct-td-valeur {
    text-align: right !important;
}

/* Lignes du tableau */
.tct-table tbody tr {
    border-bottom: 1px solid var(--tct-border);
    transition: background 0.15s;
}

.tct-table tbody tr:last-child {
    border-bottom: none;
}

.tct-table tbody tr:hover {
    background: var(--tct-primary-light);
}

.tct-table td {
    padding: 11px 16px;
    color: var(--tct-text);
    vertical-align: middle;
    border: none !important;
    background: none !important;
}

/* Drapeau */
.tct-flag {
    font-size: 20px;
    margin-right: 10px;
    vertical-align: middle;
    line-height: 1;
}

/* Badge sigle */
.tct-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    border-radius: 4px;
    background: var(--tct-primary-light);
    color: var(--tct-primary-dark);
    letter-spacing: 0.04em;
}

/* Valeur */
.tct-td-valeur strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--tct-primary-dark);
}

.tct-tnd {
    font-size: 11px;
    color: var(--tct-text-muted);
    margin-left: 3px;
}

/* Lignes paires */
.tct-table tbody tr:nth-child(even) {
    background: var(--tct-bg-alt);
}

.tct-table tbody tr:nth-child(even):hover {
    background: var(--tct-primary-light);
}

/* Message vide */
.tct-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--tct-text-muted);
    font-size: 14px;
    font-style: italic;
}

/* Pied de widget */
.tct-footer {
    margin: 0 !important;
    padding: 10px 20px;
    font-size: 11px !important;
    color: var(--tct-text-muted) !important;
    text-align: right;
    background: var(--tct-bg-alt);
    border-top: 1px solid var(--tct-border);
}

/* Responsive */
@media (max-width: 600px) {
    .tct-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tct-search {
        width: 100%;
        min-width: unset;
        box-sizing: border-box;
    }

    .tct-table th,
    .tct-table td {
        padding: 9px 10px;
        font-size: 13px;
    }

    .tct-flag {
        font-size: 16px;
        margin-right: 6px;
    }
}
