/* =========================
   CARDS SYSTEM
   Toutes les cartes UI
========================= */

/* =========================
   BASE CARDS
========================= */
.widget-card,
.info-card {
    background: var(--white);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* =========================
   HEADERS UNIFIÉS (WIDGETS)
========================= */
.widget-title,
.ephemerides-head {
    position: relative;
    overflow: hidden;
    background: var(--widget-gradient);
    color: var(--widget-title-text);
}

/* Trait rouge */
.widget-title::after,
.ephemerides-head::after {
    content: "";
    position: absolute;
    left: 18px;
    bottom: 0;
    width: 42px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-red) 0%, rgba(255,0,0,0.18) 100%);
    box-shadow: 0 0 14px rgba(255, 0, 0, 0.18);
}

/* =========================
   WIDGET ÉPHÉMÉRIDES
========================= */
.ephemerides-widget {
    padding: 18px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

/* Header */
.ephemerides-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 18px 18px 0 0;
    margin: -18px -18px 18px -18px;
}

/* Titre */
.ephemerides-title {
    margin: 0;
    font-family: "Manrope", "Inter", Arial, Helvetica, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--widget-title-text);
}

/* Horloge */
.ephemerides-clock {
    min-width: 92px;
    height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Manrope", "Inter", Arial, Helvetica, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--widget-title-text);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Mode dark (header clair) */
html[data-theme="dark"] .ephemerides-clock {
    background: rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.10);
    color: #111;
}

/* Liste */
.ephemerides-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Item */
.ephemerides-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

html[data-theme="light"] .ephemerides-item {
    background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
    border: 1px solid rgba(0,0,0,0.07);
}

/* Hover premium */
.ephemerides-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 0, 0, 0.12);
    box-shadow:
        0 10px 20px rgba(0,0,0,0.08),
        0 0 0 1px rgba(255, 0, 0, 0.04);
}

/* Icône */
.ephemerides-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    flex: 0 0 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

html[data-theme="light"] .ephemerides-icon {
    background: linear-gradient(180deg, #ffffff 0%, #edf1f6 100%);
    border: 1px solid rgba(0,0,0,0.08);
}

.ephemerides-icon svg {
    width: 21px;
    height: 21px;
}

/* Contenu */
.ephemerides-content {
    flex: 1;
}

.ephemerides-main {
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
}

.ephemerides-main strong {
    font-weight: 800;
}

.ephemerides-sub {
    margin-top: 4px;
    font-size: 0.96rem;
    color: var(--muted);
    font-weight: 500;
}

/* Point rouge */
.ephemerides-dot {
    margin: 0 8px;
    color: var(--accent-red);
}

/* =========================
   INFO CARDS (autres)
========================= */
.info-card {
    padding: 22px;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.09);
}

/* =========================
   NEWS GRID
========================= */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 20px;
}

.news-card {
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.2s ease;
}

.news-card:hover {
    transform: translateY(-4px);
}

.news-image {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.news-content {
    padding: 16px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 8px;
}

.btn-read {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.btn-read .dot {
    width: 8px;
    height: 8px;
    background: red;
    border-radius: 50%;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 640px) {
    .ephemerides-widget {
        padding: 16px;
    }

    .ephemerides-title {
        font-size: 1.5rem;
    }

    .ephemerides-clock {
        min-width: 84px;
        height: 40px;
        font-size: 0.92rem;
    }

    .ephemerides-item {
        padding: 12px;
    }

    .ephemerides-icon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .ephemerides-main {
        font-size: 1rem;
    }

    .ephemerides-sub {
        font-size: 0.9rem;
    }
}