/* ========================================
   CALENDRIER LUNAIRE - Styles principaux
   ======================================== */

#lune-calendar {
    max-width: 900px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
    transition: opacity 0.3s ease;
}

/* --- Navigation --- */
.lune-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 10px;
}

.lune-title {
    font-size: 1.4em;
    margin: 0;
    text-align: center;
}

.lune-btn {
    background: #2c3e50;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
}

.lune-btn:hover {
    background: #1a252f;
}

/* --- Légende --- */
.lune-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 0.9em;
}

.legend-montante {
    color: #27ae60;
    font-weight: bold;
}

.legend-descendante {
    color: #8e44ad;
    font-weight: bold;
}

/* --- Grille calendrier --- */
.lune-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 24px;
}

.lune-header {
    background: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 8px 4px;
    font-weight: bold;
    font-size: 0.85em;
    border-radius: 4px;
}

.lune-day {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 4px;
    text-align: center;
    font-size: 0.8em;
    min-height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: transform 0.1s;
}

.lune-day:hover {
    transform: scale(1.04);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 1;
    position: relative;
}

.lune-day.empty {
    background: transparent;
    border: none;
}

.lune-day.montante {
    background: #eafaf1;
    border-color: #27ae60;
}

.lune-day.descendante {
    background: #f5eef8;
    border-color: #8e44ad;
}

.lune-day.today {
    outline: 3px solid #e74c3c;
    font-weight: bold;
}

.day-number {
    font-size: 1.1em;
    font-weight: bold;
    color: #2c3e50;
}

.day-symbol {
    font-size: 1.4em;
    line-height: 1;
}

.day-direction {
    font-size: 1.1em;
    color: #555;
}

.day-direction {
    color: #27ae60;
}

.descendante .day-direction {
    color: #8e44ad;
}

.day-phase-name {
    font-size: 0.7em;
    color: #666;
    text-align: center;
    line-height: 1.2;
}

/* --- Tableau récapitulatif --- */
.lune-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    margin-top: 10px;
}

.lune-table th {
    background: #2c3e50;
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-weight: bold;
}

.lune-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.lune-table tr.row-montante td {
    background: #f4fcf7;
}

.lune-table tr.row-descendante td {
    background: #faf4fc;
}

.lune-table tr:hover td {
    filter: brightness(0.96);
}

/* --- Barre de phase --- */
.phase-bar {
    background: #ddd;
    border-radius: 4px;
    height: 8px;
    width: 80px;
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
    overflow: hidden;
}

.phase-fill {
    background: #f1c40f;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .lune-grid {
        gap: 2px;
    }

    .lune-day {
        min-height: 56px;
        padding: 4px 2px;
        font-size: 0.7em;
    }

    .day-symbol {
        font-size: 1.1em;
    }

    .lune-table {
        font-size: 0.78em;
    }

    .lune-table th,
    .lune-table td {
        padding: 6px 6px;
    }

    .lune-nav {
        flex-direction: column;
        text-align: center;
    }

    .phase-bar {
        width: 50px;
    }
}

/* --- Lune aujourd'hui --- */
.lune-aujourdhui {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f9f5ff;
    border: 1px solid #8e44ad;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 1em;
    color: #2c3e50;
}

.lune-auj-symbol {
    font-size: 2em;
    line-height: 1;
}

.lune-auj-texte {
    line-height: 1.5;
}