* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0a0118 0%, #1a0f2e 50%, #0a0118 100%);
    color: #fff;
    min-height: 100vh;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== Barre du haut : calendrier + onglets + horloge ===== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    background: rgba(20, 15, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px 25px;
    margin-bottom: 30px;
    position: relative;
}

.date-picker {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
}

.date-picker::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.tabs {
    display: flex;
    gap: 10px;
}

.tab-button {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.tab-button.active {
    background: linear-gradient(135deg, #d81e3a, #6b0f2e);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(216, 30, 58, 0.35);
}

.right-group {
    display: flex;
    align-items: center;
    gap: 15px;
    position: absolute;
    top: 50%;
    right: 25px;
    transform: translateY(-50%);
}

.clock {
    font-size: 1.7em;
    font-weight: 800;
    color: #ff3b3b;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
    .right-group {
        position: static;
        order: -1;
        justify-content: center;
        width: 100%;
    }
}

/* Barre utilisateur (connexion / role / deconnexion) */
.user-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.6);
}

.user-bar b {
    color: #fff;
}

.user-bar a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.user-bar a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.main-layout {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.top-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.content-card {
    background: rgba(30, 25, 50, 0.8);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.ephemeride-header {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 25px;
    color: #fff;
}

.ephemeride-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ephemeride-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ephemeride-label {
    font-size: 1.3em;
    font-weight: 600;
    color: #d81e3a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ephemeride-label::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #d81e3a, #6b0f2e);
    border-radius: 2px;
}

.ephemeride-text {
    font-size: 1.15em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    padding-left: 14px;
}

.ephemeride-text b {
    color: #ffd700;
    font-weight: 600;
}

.ephemeride-list {
    list-style: none;
    padding-left: 14px;
}

.ephemeride-list li {
    font-size: 1.05em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 10px;
    padding-left: 15px;
    position: relative;
}

.ephemeride-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #6b0f2e;
    font-weight: bold;
}

/* Section événements historiques (pleine largeur) */
.events-section {
    background: rgba(30, 25, 50, 0.8);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.events-header {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 25px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.events-header::before {
    content: '📜';
    font-size: 1.2em;
}

.events-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.events-list li {
    padding: 18px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border-left: 3px solid #6b0f2e;
    transition: all 0.3s ease;
    line-height: 1.6;
    font-size: 1.05em;
}

.events-list li:hover {
    background: rgba(107, 15, 46, 0.1);
    transform: translateX(5px);
    border-left-color: #d81e3a;
}

.event-date {
    display: inline;
    font-weight: 600;
    color: #ffd700;
    margin-right: 8px;
}

.event-age {
    display: inline;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 500;
    margin-right: 8px;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
}

.event-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.empty-message {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    padding-left: 14px;
}

.tab-button-admin {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.tab-button-admin:hover {
    background: rgba(255, 193, 7, 0.2);
}

.user-button {
    font-weight: 600;
}

.dropdown-menu-right {
    left: auto;
    right: 0;
}

/* Menu deroulant au survol du bouton Anniversaires */
.tab-with-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 8px;
    z-index: 10;
}

.dropdown-menu-inner {
    background: rgba(25, 18, 40, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 8px;
    min-width: 220px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.tab-with-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.95em;
}

.dropdown-menu a:hover {
    background: rgba(216, 30, 58, 0.15);
    color: #fff;
}

/* Grille d'affichage des anniversaires (onglet principal) */
.celeb-display-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.celeb-display-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.celeb-display-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.celeb-display-card b {
    display: block;
    font-size: 1.1em;
    color: #fff;
    margin-bottom: 4px;
}

.celeb-display-card span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.92em;
}

.celeb-note-display {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9em;
    font-style: italic;
    line-height: 1.4;
    text-align: left;
}

/* Placeholder onglet Anniversaires (en attente des données) */
.placeholder-box {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1em;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .content-card, .events-section {
        padding: 20px;
    }

    .ephemeride-header, .events-header {
        font-size: 1.4em;
    }

    .ephemeride-label {
        font-size: 1.1em;
    }

    .ephemeride-text, .ephemeride-list li {
        font-size: 1em;
    }

    .events-list li {
        font-size: 0.95em;
        padding: 15px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-card, .events-section {
    animation: fadeInUp 0.6s ease-out;
}
