.eqx-avent {
    --avent-pin: #0f2e22;
    --avent-pin-clair: #184231;
    --avent-magenta: #c44e8c;
    --avent-magenta-case: #c04a88;
    --avent-magenta-fonce: #a8336f;
    --avent-azur: #5fa0da;
    --avent-azur-texte: #071a2e;
    --avent-jaune: #ffd412;
    --avent-jaune-texte: #143326;
    --avent-case: 38px;
    --avent-ecart: 5px;

    position: relative;
    container-type: inline-size;
    margin: 0 0 24px;
    padding: 18px 16px 16px;
    border-radius: 16px;
    background: radial-gradient(circle at top, var(--avent-pin-clair) 0%, var(--avent-pin) 100%);
    color: #ffffff;
    overflow: hidden;
}

.eqx-avent__neige {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.eqx-avent__flocon {
    position: absolute;
    top: -8%;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1;
    user-select: none;
    animation: eqx-avent-neige linear infinite;
}

.eqx-avent__flocon--logo {
    aspect-ratio: 50 / 160;
    background-color: rgba(255, 255, 255, 0.6);
    -webkit-mask: url("../img/symbole-equinoxe.png") center / contain no-repeat;
    mask: url("../img/symbole-equinoxe.png") center / contain no-repeat;
}

@keyframes eqx-avent-neige {
    from { top: -8%; transform: rotate(0deg); }
    to { top: 104%; transform: rotate(360deg); }
}

.eqx-avent__contenu {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

@container (min-width: 600px) {
    .eqx-avent__contenu {
        flex-direction: row;
        justify-content: space-between;
        gap: 24px;
        padding: 0 8px;
        text-align: left;
    }
    .eqx-avent__entete { flex: 1 1 auto; max-width: 380px; }
    .eqx-avent__guirlande { justify-content: flex-start; }
}

.eqx-avent__guirlande {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.eqx-avent__guirlande span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: eqx-avent-scintille 1.8s infinite alternate;
}

.eqx-avent__guirlande span:nth-child(3n+1) { background: var(--avent-magenta); box-shadow: 0 0 8px var(--avent-magenta); }
.eqx-avent__guirlande span:nth-child(3n+2) { background: var(--avent-azur); box-shadow: 0 0 8px var(--avent-azur); animation-delay: 0.6s; }
.eqx-avent__guirlande span:nth-child(3n) { background: var(--avent-jaune); box-shadow: 0 0 8px var(--avent-jaune); animation-delay: 1.2s; }

@keyframes eqx-avent-scintille {
    from { opacity: 0.45; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1.15); }
}

.eqx-avent__pastille {
    display: inline-block;
    margin: 0 0 8px;
    padding: 3px 11px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--avent-jaune);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.em-content-area .eqx-avent .eqx-avent__titre {
    margin: 0 0 6px;
    color: #ffffff !important;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.eqx-avent__sous-titre {
    margin: 0;
    color: #d8e6df;
    font-size: 14px;
    line-height: 1.5;
}

.eqx-avent__apercu {
    display: inline-block;
    margin: 10px 0 0;
    padding: 3px 11px;
    border-radius: 999px;
    background: var(--avent-jaune);
    color: var(--avent-jaune-texte);
    font-size: 12px;
    font-weight: 700;
}

.eqx-avent__info {
    min-height: 1.4em;
    margin: 10px 0 0;
    color: var(--avent-jaune);
    font-size: 13px;
    font-weight: 700;
}

.eqx-avent__info:empty {
    min-height: 0;
    margin: 0;
}

.eqx-avent__sapin {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
}

.eqx-avent__etoile {
    font-size: 24px;
    line-height: 1;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 10px rgba(255, 212, 18, 0.85));
    animation: eqx-avent-etoile 2.2s infinite alternate;
}

@keyframes eqx-avent-etoile {
    from { transform: scale(0.95) rotate(-4deg); }
    to { transform: scale(1.08) rotate(4deg); }
}

.eqx-avent__lignes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--avent-ecart);
}

.eqx-avent__ligne {
    display: flex;
    justify-content: center;
    gap: var(--avent-ecart);
}

.eqx-avent__emplacement {
    display: contents;
}

.eqx-avent__tronc {
    width: 36px;
    height: 18px;
    margin-top: 5px;
    border-radius: 0 0 7px 7px;
    background: linear-gradient(180deg, #5c3a21, #3e2615);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.eqx-avent__case {
    --ruban: rgba(255, 255, 255, 0.16);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: var(--avent-case);
    height: var(--avent-case);
    padding: 0;
    border: 1.5px dashed rgba(255, 255, 255, 0.5);
    border-radius: 9px;
    background-image:
        linear-gradient(90deg, transparent calc(50% - 3px), var(--ruban) calc(50% - 3px), var(--ruban) calc(50% + 3px), transparent calc(50% + 3px)),
        linear-gradient(0deg, transparent calc(50% - 3px), var(--ruban) calc(50% - 3px), var(--ruban) calc(50% + 3px), transparent calc(50% + 3px));
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.32);
    font-family: inherit;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.eqx-avent__case--magenta {
    background-color: var(--avent-magenta-case);
    color: #ffffff;
}

.eqx-avent__case--azur {
    background-color: var(--avent-azur);
    color: var(--avent-azur-texte);
    border-color: rgba(7, 26, 46, 0.35);
}

.eqx-avent__case--jaune {
    --ruban: rgba(20, 51, 38, 0.08);
    background-color: var(--avent-jaune);
    color: var(--avent-jaune-texte);
    border-color: rgba(20, 51, 38, 0.35);
}

.eqx-avent__icone {
    font-size: 11px;
}

.eqx-avent__numero {
    font-size: 15px;
}

.eqx-avent__case.est-ouverte:hover {
    z-index: 1;
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 9px 18px rgba(0, 0, 0, 0.45);
}

.eqx-avent__case:focus-visible {
    z-index: 1;
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

.eqx-avent__case.est-fermee {
    filter: saturate(0.75) brightness(0.9);
    cursor: default;
}

.eqx-avent__case.est-fermee .eqx-avent__icone {
    font-size: 9px;
}

.eqx-avent__case.est-vue {
    border-style: solid;
}

.eqx-avent__case.est-vue::after {
    content: "✓";
    position: absolute;
    top: -5px;
    right: -5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--avent-pin);
    color: #ffffff;
    font-size: 9px;
}

.eqx-avent__case.est-du-jour {
    animation: eqx-avent-pulse 1.8s ease-in-out infinite;
}

@keyframes eqx-avent-pulse {
    0%, 100% { box-shadow: 0 5px 12px rgba(0, 0, 0, 0.32), 0 0 0 0 rgba(255, 255, 255, 0.75); }
    50% { box-shadow: 0 5px 12px rgba(0, 0, 0, 0.32), 0 0 0 7px rgba(255, 255, 255, 0); }
}

@container (max-width: 599px) {
    .em-content-area .eqx-avent .eqx-avent__titre { font-size: 18px; }
    .eqx-avent__guirlande { margin-bottom: 8px; }
    .eqx-avent__pastille { margin-bottom: 6px; }
    .eqx-avent__sous-titre { font-size: 13px; }
}

@container (max-width: 359px) {
    .eqx-avent__contenu { --avent-case: 34px; --avent-ecart: 4px; }
    .eqx-avent__numero { font-size: 14px; }
    .eqx-avent__icone { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .eqx-avent__flocon { display: none; }
    .eqx-avent__guirlande span,
    .eqx-avent__etoile { animation: none; }
    .eqx-avent__case { transition: none; }
    .eqx-avent__case.est-du-jour {
        animation: none;
        outline: 3px solid #ffffff;
        outline-offset: 2px;
    }
}

.eqx-avent__modale {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    text-align: left;
    overflow: auto;
}

.eqx-avent__modale::backdrop {
    background: rgba(10, 30, 18, 0.72);
}

.eqx-avent__modale-corps {
    position: relative;
    padding: 28px 28px 24px;
    font-size: 16px;
    line-height: 1.55;
}

.eqx-avent__modale--magenta {
    background: var(--avent-magenta-fonce);
    color: #ffffff;
    border-top: 10px solid var(--avent-magenta);
}

.eqx-avent__modale--azur {
    background: var(--avent-azur);
    color: var(--avent-azur-texte);
    border-top: 10px solid #4a8ccb;
}

.eqx-avent__modale--jaune {
    background: var(--avent-jaune);
    color: var(--avent-jaune-texte);
    border-top: 10px solid #f2c400;
}

.eqx-avent__modale-date {
    margin: 0 44px 4px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.em-content-area .eqx-avent .eqx-avent__modale-titre,
.em-content-area .eqx-avent .eqx-avent__modale-contenu h2,
.em-content-area .eqx-avent .eqx-avent__modale-contenu h3,
.em-content-area .eqx-avent .eqx-avent__modale-contenu h4 {
    color: inherit !important;
}

.eqx-avent__modale-titre {
    margin: 0 36px 16px 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.eqx-avent__modale-contenu > :first-child { margin-top: 0; }
.eqx-avent__modale-contenu > :last-child { margin-bottom: 0; }

.eqx-avent__modale-contenu p {
    margin: 0 0 12px;
    color: inherit;
}

.eqx-avent__modale-contenu h3,
.eqx-avent__modale-contenu h4 {
    margin: 22px 0 8px;
    font-size: 18px;
    font-weight: 800;
}

.eqx-avent__modale-contenu a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.eqx-avent__modale-contenu img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.eqx-avent__modale-contenu a.eqx-avent-bouton {
    display: inline-block;
    margin: 2px 0 6px;
    padding: 11px 20px;
    border-radius: 999px;
    font-size: 15px;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.eqx-avent__modale-contenu a.eqx-avent-bouton:hover {
    transform: translateY(-1px);
}

.eqx-avent__modale--magenta a.eqx-avent-bouton {
    background: #ffffff;
    color: var(--avent-magenta-fonce);
}

.eqx-avent__modale--azur a.eqx-avent-bouton {
    background: var(--avent-azur-texte);
    color: #ffffff;
}

.eqx-avent__modale--jaune a.eqx-avent-bouton {
    background: var(--avent-foret);
    color: var(--avent-jaune);
}

.eqx-avent__modale a:focus-visible,
.eqx-avent__fermer:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.eqx-avent__fermer {
    position: absolute;
    z-index: 1;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.14);
    color: inherit;
    font-size: 24px;
    line-height: 36px;
    cursor: pointer;
}

.eqx-avent__fermer:hover {
    background: rgba(0, 0, 0, 0.24);
}
