/* =============================================
   GM.OR — Widget Cours des Métaux Précieux
   ============================================= */

/* --- COMPACT (Accueil) --- */
.cours-widget-bar {
    background: linear-gradient(135deg, #1a1d26 0%, #14171f 100%);
    border: 1px solid rgba(212, 175, 55, .20);
    border-radius: .75rem;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.cours-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cours-compact-item {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.cours-metal-label {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gold, #d4af37);
    background: rgba(212, 175, 55, .12);
    padding: .2rem .55rem;
    border-radius: .25rem;
}

.cours-metal-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.cours-metal-change {
    font-size: .78rem;
    font-weight: 600;
    padding: .15rem .4rem;
    border-radius: .2rem;
    font-variant-numeric: tabular-nums;
}
.cours-metal-change.up {
    color: #22c55e;
    background: rgba(34, 197, 94, .10);
}
.cours-metal-change.down {
    color: #ef4444;
    background: rgba(239, 68, 68, .10);
}

.cours-compact-sep {
    width: 1px;
    height: 1.5rem;
    background: rgba(255, 255, 255, .12);
}

.cours-compact-time {
    width: 100%;
    text-align: center;
    font-size: .7rem;
    color: rgba(255, 255, 255, .35);
    margin-top: .25rem;
}

/* --- DÉTAILLÉ (Pages service) --- */
.cours-widget-detail {
    background: linear-gradient(135deg, #1a1d26 0%, #14171f 100%);
    border: 1px solid rgba(212, 175, 55, .25);
    border-radius: .75rem;
    padding: 1.5rem;
    margin: 2rem 0 2.5rem;
}

.cours-detail-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    flex-wrap: wrap;
    gap: .5rem;
}

.cours-detail-main {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.cours-detail-label {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gold, #d4af37);
}

.cours-detail-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.cours-detail-price small {
    font-size: .7em;
    font-weight: 400;
    opacity: .6;
}

.cours-detail-oz {
    font-size: .85rem;
    color: rgba(255, 255, 255, .40);
    font-variant-numeric: tabular-nums;
}

/* Table des titres */
.cours-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: .75rem;
}
.cours-detail-table thead th {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .45);
    text-align: left;
    padding: .4rem .5rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.cours-detail-table thead th:last-child {
    text-align: right;
}
.cours-detail-table tbody td {
    padding: .55rem .5rem;
    font-size: .9rem;
    color: rgba(255, 255, 255, .75);
    border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.cours-detail-table tbody tr:last-child td {
    border-bottom: none;
}
.cours-price-cell {
    text-align: right;
    font-weight: 700;
    color: #fff !important;
    font-variant-numeric: tabular-nums;
}

.cours-detail-footer {
    font-size: .68rem;
    color: rgba(255, 255, 255, .30);
    text-align: center;
    padding-top: .5rem;
}

/* --- LOADING --- */
.cours-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 1rem;
    font-size: .85rem;
    color: rgba(255, 255, 255, .45);
}

.cours-loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(212, 175, 55, .25);
    border-top-color: var(--gold, #d4af37);
    border-radius: 50%;
    animation: cours-spin .8s linear infinite;
}

@keyframes cours-spin {
    to { transform: rotate(360deg); }
}

/* --- ERREUR --- */
.cours-error {
    text-align: center;
    padding: .75rem 1rem;
    font-size: .85rem;
    color: rgba(255, 255, 255, .50);
}
.cours-error a {
    color: var(--gold, #d4af37);
    text-decoration: none;
    font-weight: 600;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    .cours-compact {
        gap: .75rem;
    }
    .cours-compact-sep {
        display: none;
    }
    .cours-compact-item {
        width: 100%;
        justify-content: center;
    }
    .cours-detail-price {
        font-size: 1.3rem;
    }
    .cours-widget-detail {
        padding: 1rem;
    }
    .cours-detail-table tbody td,
    .cours-detail-table thead th {
        padding: .4rem .3rem;
        font-size: .82rem;
    }
}