/* Phase de la Lune et calendrier lunaire */
.o-phase-lune {
  --pl-ciel: #0d1326; --pl-ombre: #2a3247; --pl-clair: #f3ecd2; --pl-mer: #b9b096; --pl-bord: #48526b; --pl-or: #f2b24b;
  display: grid; gap: 22px; min-width: 0;
}
.o-phase-lune [hidden] { display: none !important; }
.o-phase-lune h2 { margin: 0; font-size: 1.1rem; }
.o-phase-lune .pl-bloc { display: grid; gap: 12px; min-width: 0; padding-top: 18px; border-top: 1px solid var(--bord); }
.o-phase-lune .pl-discret { margin: 0; color: var(--texte-2); font-size: .9rem; }

/* Réglages */
.o-phase-lune .pl-reglages { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.o-phase-lune .pl-champ { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; color: var(--texte-2); min-width: 0; }
.o-phase-lune .pl-champ input {
  min-height: 42px; padding: 8px 12px; border: 1px solid var(--bord); border-radius: var(--rayon-petit);
  background: var(--surface); color: var(--texte); font: inherit; font-size: 1rem; color-scheme: light dark;
}
.o-phase-lune .pl-reglages > .btn { min-height: 42px; }
.o-phase-lune .pl-hemi { display: flex; flex-direction: column; gap: 4px; }
.o-phase-lune .pl-libelle { font-size: .88rem; color: var(--texte-2); }
.o-phase-lune .pl-bascule { display: inline-flex; }
.o-phase-lune .pl-bascule .btn { min-height: 42px; border-radius: 0; }
.o-phase-lune .pl-bascule .btn:first-child { border-radius: var(--rayon-petit) 0 0 var(--rayon-petit); }
.o-phase-lune .pl-bascule .btn:last-child { border-radius: 0 var(--rayon-petit) var(--rayon-petit) 0; margin-left: -1px; }
.o-phase-lune .pl-bascule .btn[aria-pressed="true"] { background: var(--marque); border-color: var(--marque); color: var(--sur-marque); }
.o-phase-lune input:focus-visible, .o-phase-lune button:focus-visible { outline: 3px solid var(--marque); outline-offset: 1px; }

/* Lune et résultat */
.o-phase-lune .pl-resultat { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 20px 28px; align-items: center; }
.o-phase-lune .pl-ciel { margin: 0; padding: 18px; border-radius: var(--rayon); background: radial-gradient(circle at 50% 45%, #1b2547, var(--pl-ciel) 70%); }
.o-phase-lune .pl-lune { display: block; width: 100%; height: auto; max-width: 224px; margin: 0 auto; }
.o-phase-lune .pl-ombre { fill: var(--pl-ombre); }
.o-phase-lune .pl-clair { fill: var(--pl-clair); }
.o-phase-lune .pl-mers circle { fill: var(--pl-mer); opacity: .45; }
.o-phase-lune .pl-bord { fill: none; stroke: var(--pl-bord); stroke-width: 1; }
.o-phase-lune .pl-infos { display: grid; gap: 6px; min-width: 0; }
.o-phase-lune .pl-date { color: var(--texte-2); font-size: .95rem; }
.o-phase-lune .pl-nom { font-size: 1.7rem; line-height: 1.2; }
.o-phase-lune .pl-evenement { color: var(--texte-2); }
.o-phase-lune .pl-badge { justify-self: start; padding: 2px 10px; border-radius: 999px; background: var(--pl-or); color: #3a2600; font-weight: 600; font-size: .9rem; }
.o-phase-lune .pl-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.o-phase-lune .pl-carte { display: grid; align-content: start; gap: 2px; padding: 10px 12px; border-radius: var(--rayon-petit); background: var(--surface-2); min-width: 0; }
.o-phase-lune .pl-carte > span { font-size: .82rem; color: var(--texte-2); }
.o-phase-lune .pl-carte strong { font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.o-phase-lune .pl-carte small { font-size: .82rem; color: var(--texte-2); overflow-wrap: anywhere; }

/* Tableaux */
.o-phase-lune .pl-tableau { overflow-x: auto; }
.o-phase-lune table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.o-phase-lune th, .o-phase-lune td { padding: 8px 10px; border-bottom: 1px solid var(--bord); text-align: left; vertical-align: middle; }
.o-phase-lune thead th { font-size: .85rem; color: var(--texte-2); font-weight: 600; }
.o-phase-lune tbody th { font-weight: 600; white-space: nowrap; }
.o-phase-lune tbody th .pl-icone { width: 22px; height: 22px; vertical-align: -6px; }
.o-phase-lune tr.pl-super td:last-child { font-weight: 600; }

/* Calendrier */
.o-phase-lune .pl-cal-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.o-phase-lune .pl-cal-tete h2 { text-align: center; flex: 1; }
.o-phase-lune .pl-cal-tete .btn { min-width: 44px; min-height: 40px; font-size: 1.3rem; line-height: 1; }
.o-phase-lune .pl-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.o-phase-lune .pl-js { text-align: center; font-size: .8rem; color: var(--texte-2); padding-bottom: 2px; text-transform: capitalize; }
.o-phase-lune .pl-jour {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; min-height: 76px; padding: 5px 2px;
  border: 1px solid var(--bord); border-radius: var(--rayon-petit); background: var(--surface); color: var(--texte); font: inherit; cursor: pointer;
}
.o-phase-lune .pl-jour:hover { border-color: var(--marque); }
.o-phase-lune .pl-num { font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.o-phase-lune .pl-icone { width: 24px; height: 24px; flex: none; }
.o-phase-lune .pl-ev { display: grid; justify-items: center; line-height: 1.1; font-size: .7rem; }
.o-phase-lune .pl-ev b { color: var(--marque); }
.o-phase-lune .pl-ev small { font-size: .66rem; color: var(--texte-2); white-space: nowrap; }
.o-phase-lune .pl-principale { background: var(--surface-2); }
.o-phase-lune .pl-aujourdhui { border-color: var(--marque); border-width: 2px; }
.o-phase-lune .pl-jour[aria-current="date"] { background: var(--marque); border-color: var(--marque); color: var(--sur-marque); }
.o-phase-lune .pl-jour[aria-current="date"] .pl-ev b, .o-phase-lune .pl-jour[aria-current="date"] .pl-ev small { color: var(--sur-marque); }

@media (max-width: 640px) {
  .o-phase-lune .pl-resultat { grid-template-columns: minmax(0, 1fr); }
  .o-phase-lune .pl-ciel { max-width: 240px; justify-self: center; width: 100%; }
  .o-phase-lune .pl-nom { font-size: 1.45rem; }
  .o-phase-lune .pl-cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .o-phase-lune .pl-jour { min-height: 66px; padding: 4px 1px; }
  .o-phase-lune .pl-icone { width: 20px; height: 20px; }
  .o-phase-lune .pl-ev small { font-size: .6rem; }
  .o-phase-lune th, .o-phase-lune td { padding: 7px 6px; font-size: .88rem; }
}
.o-phase-lune [data-pl-prochaines] td:last-child { white-space: nowrap; color: var(--texte-2); }
