/* =============================================
   ENCARTS "Lune"
   Chargé uniquement sur la page d'accueil (index.php).

   NOMMAGE — les classes, le nom de ce fichier et le dossier
   d'images portent la marque ("lune") et non un préfixe
   publicitaire. Les bloqueurs de pub filtrent sur les noms :
   sélecteurs génériques (.ad, .ads, .ad-slot, .banner, .sponsor)
   et motifs d'URL (/ad/, /ads.css, /advert). Ne rien nommer
   ainsi suffit à ce que les encarts s'affichent normalement.
   Ne pas renommer en ad-* / ads-* / banner-* / sponsor-*.

   Les encarts restent dans le flux : aucun overlay, aucun
   sticky, aucune interception de clic.
   ============================================= */

.lune-slot {
    container-type: inline-size;
    display: block;
}

.lune-slot--wide {
    margin: 2.5rem 0 0.5rem;
}

/* Dans .page-list (flex column, gap 0.8rem) : pas de marge propre */
.lune-slot--inline {
    margin: 0;
}

.lune-kicker {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    padding-left: 0.15rem;
}

/* --- Carte --- */
.lune-panel {
    position: relative;
    display: block;
    overflow: hidden;
    isolation: isolate;
    background: #161210;
    border: 1px solid #2e2521;
    border-radius: var(--border-radius-lg);
    color: #f4ede1;
    text-decoration: none;
    font-family: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
    line-height: 1.5;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.lune-panel:hover,
.lune-panel:focus-visible {
    border-color: #6b4432;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color: #f4ede1;
}

.lune-panel:focus-visible {
    outline: 2px solid #d4744f;
    outline-offset: 3px;
}

/* --- Décors de fond --- */
.lune-glow {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.lune-panel--wide .lune-glow {
    background: radial-gradient(115% 150% at 84% 22%, rgba(180, 87, 58, 0.42) 0%, rgba(180, 87, 58, 0.12) 38%, rgba(22, 18, 16, 0) 66%);
}

.lune-panel--strip .lune-glow {
    background: radial-gradient(80% 220% at 97% 50%, rgba(180, 87, 58, 0.38) 0%, rgba(22, 18, 16, 0) 62%);
}

.lune-star {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    background: #f0e6d6;
    pointer-events: none;
    animation: lune-twinkle 3.4s ease-in-out infinite;
}

.lune-star--1 {
    left: 52%;
    top: 16%;
    width: 4px;
    height: 4px;
}

.lune-star--2 {
    left: 58%;
    bottom: 18%;
    width: 3px;
    height: 3px;
    animation-duration: 4.6s;
}

@keyframes lune-twinkle {
    0%, 100% { opacity: 0.25; }
    50%      { opacity: 0.9; }
}

@keyframes lune-drift {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-9px); }
}

/* --- Éléments communs --- */
.lune-body,
.lune-brand,
.lune-cta-row {
    position: relative;
    z-index: 2;
}

.lune-mark {
    display: block;
    border-radius: 11px;
    object-fit: cover;
    flex: none;
}

.lune-title {
    display: block;
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    color: #f4ede1;
    line-height: 1.05;
    text-wrap: pretty;
}

.lune-title em {
    font-style: italic;
    color: #d4744f;
}

.lune-desc {
    display: block;
    color: #a89b90;
}

.lune-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    border-radius: 999px;
    background: #b4573a;
    color: #fbf5ec;
    font-weight: 700;
    white-space: nowrap;
    transition: background var(--transition);
}

.lune-panel:hover .lune-cta,
.lune-panel:focus-visible .lune-cta {
    background: #c9633f;
}

/* =============================================
   GRAND ENCART (bas de page)
   Base = composition compacte (portrait en coin),
   élargie en composition horizontale via @container.
   ============================================= */

.lune-panel--wide {
    padding: 1.3rem;
}

.lune-panel--wide .lune-face {
    position: absolute;
    top: -20px;
    right: -24px;
    z-index: 1;
    width: 128px;
    height: 128px;
    pointer-events: none;
}

.lune-panel--wide .lune-face::before {
    content: '';
    position: absolute;
    inset: -14%;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 34%, rgba(212, 116, 79, 0.55) 0%, rgba(180, 87, 58, 0.18) 52%, rgba(22, 18, 16, 0) 74%);
}

.lune-panel--wide .lune-face img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(237, 228, 213, 0.22);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
}

.lune-panel--wide .lune-body {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.lune-panel--wide .lune-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    /* laisse la place au portrait en coin */
    padding-right: 92px;
}

.lune-panel--wide .lune-mark {
    width: 40px;
    height: 40px;
}

.lune-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.lune-brand-name {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.3rem;
    line-height: 1;
    color: #f0e6d6;
}

.lune-brand-role {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #a2958a;
    line-height: 1.4;
}

.lune-panel--wide .lune-title {
    font-size: clamp(1.9rem, 7vw, 2.6rem);
}

.lune-panel--wide .lune-desc {
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 470px;
}

.lune-panel--wide .lune-cta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.lune-panel--wide .lune-cta {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.lune-url {
    font-size: 0.9rem;
    color: #8a7f76;
}

@container (min-width: 620px) {
    .lune-panel--wide {
        display: flex;
        align-items: center;
        gap: 2rem;
        min-height: 320px;
        padding: clamp(1.8rem, 5cqi, 3.2rem);
    }

    .lune-panel--wide .lune-body {
        flex: 1 1 auto;
        min-width: 0;
        gap: 1.3rem;
    }

    .lune-panel--wide .lune-brand {
        padding-right: 0;
    }

    .lune-panel--wide .lune-mark {
        width: 44px;
        height: 44px;
    }

    .lune-panel--wide .lune-title {
        font-size: clamp(2.2rem, 7cqi, 3.9rem);
    }

    .lune-panel--wide .lune-face {
        position: relative;
        top: auto;
        right: auto;
        flex: none;
        width: clamp(170px, 30cqi, 320px);
        height: auto;
        aspect-ratio: 1;
        animation: lune-drift 10s ease-in-out infinite;
    }
}

/* =============================================
   BANDEAU (au fil de la liste)
   ============================================= */

.lune-panel--strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem;
}

.lune-panel--strip:hover {
    transform: translateX(4px);
}

.lune-panel--strip .lune-mark {
    position: relative;
    z-index: 2;
    width: 42px;
    height: 42px;
}

.lune-panel--strip .lune-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1 1 190px;
    min-width: 0;
}

.lune-panel--strip .lune-title {
    font-size: 1.25rem;
    line-height: 1.15;
}

.lune-panel--strip .lune-desc {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: #9a8d83;
}

.lune-panel--strip .lune-cta {
    position: relative;
    z-index: 2;
    padding: 0.6rem 1.2rem;
    font-size: 0.78rem;
}

.lune-panel--strip .lune-avatar {
    display: none;
    position: relative;
    z-index: 2;
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(237, 228, 213, 0.2);
}

@container (min-width: 560px) {
    .lune-panel--strip {
        flex-wrap: nowrap;
        gap: 1.1rem;
        padding: 0.9rem 1.15rem;
    }

    .lune-panel--strip .lune-avatar {
        display: block;
    }

    .lune-panel--strip .lune-title {
        font-size: clamp(1.25rem, 3.4cqi, 1.55rem);
    }
}

/* --- Confort de lecture --- */
@media (prefers-reduced-motion: reduce) {
    .lune-star,
    .lune-panel--wide .lune-face {
        animation: none;
    }

    .lune-panel,
    .lune-cta {
        transition: none;
    }

    .lune-panel--strip:hover {
        transform: none;
    }
}
