/* Explain: Styles for the "À la une" carousel and the universe bottom sheet. */
/* MARKET HOME — "À la une" carousel + universe bottom sheet */

/* ---------- Espace pub ---------- */
.ads {
    border-radius: 28px;
    padding: 18px 22px 22px;
    overflow: hidden;
    animation: rise 0.9s cubic-bezier(0.2, 0.9, 0.2, 1) 0.95s both;
}
.ads-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.ads-label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}
.segs { display: flex; gap: 6px; width: min(200px, 50%); }
.seg { flex: 1; padding: 12px 0; margin: -12px 0; border: 0; background: none; cursor: pointer; }
.bar { display: block; height: 3px; border-radius: 3px; background: var(--track); overflow: hidden; }
.bar i {
    display: block;
    height: 100%;
    background: var(--fg);
    transform-origin: left;
    transform: scaleX(var(--p, 0));
}
.seg:focus-visible { outline: none; }
.seg:focus-visible .bar { outline: 2px solid var(--fg); outline-offset: 3px; }

.slides { display: grid; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.slide {
    grid-area: 1 / 1;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(12px, 3vw, 28px);
    padding: 14px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--fg);
    opacity: 0;
    visibility: hidden;
    translate: calc(var(--d, 1) * 28px) 0;
    transition: opacity 0.5s ease, translate 0.7s cubic-bezier(0.2, 0.9, 0.2, 1), visibility 0s linear 0.7s;
}
.slide.on { opacity: 1; visibility: visible; translate: 0 0; transition-delay: 0.12s, 0.12s, 0s; }
.slide.out { translate: calc(var(--d, 1) * -28px) 0; transition-delay: 0s, 0s, 0.7s; }
.slide::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -90px;
    bottom: -90px;
    right: -80px;
    width: 70%;
    background: radial-gradient(closest-side, var(--c1), transparent);
    opacity: 0.22;
    pointer-events: none;
}
.s-txt { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.s-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}
.s-eyebrow i {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c1);
    box-shadow: 0 0 12px var(--c1);
}
.s-title {
    margin: 8px 0 6px;
    font-weight: 700;
    font-size: clamp(1.12rem, 2.3vw, 1.45rem);
    line-height: 1.22;
    letter-spacing: -0.01em;
    text-wrap: balance;
    max-width: 30ch;
}
.s-sub { margin: 0; color: var(--muted); font-size: 0.93rem; max-width: 44ch; }
.s-cta {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 15px;
    border: 0;
    border-radius: 999px;
    background: var(--fg);
    color: var(--bg);
    font-weight: 600;
    font-size: 0.86rem;
}
.s-cta i { font-size: 13px; }
.s-art {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: clamp(74px, 11vw, 108px);
    aspect-ratio: 1;
    max-width: 100%;
}
.s-art .orb { width: 62%; height: 62%; border-radius: 30%; animation: float 5s ease-in-out infinite; }
.ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid color-mix(in srgb, var(--c1) 70%, transparent);
    animation: ping 3.4s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
}
.ring.r2 { animation-delay: 1.7s; }
@keyframes ping {
    0% { transform: scale(0.72); opacity: 0.9; }
    70%, 100% { transform: scale(1.12); opacity: 0; }
}

/* ---------- Fiche (bottom sheet) ---------- */
.sheet-layer {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    align-items: end;
    justify-items: center;
}
.scrim {
    position: absolute;
    inset: 0;
    background: var(--scrim);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.sheet {
    position: relative;
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-block: 14px calc(24px + env(safe-area-inset-bottom, 0px));
    padding-left: max(24px, env(safe-area-inset-left, 0px));
    padding-right: max(24px, env(safe-area-inset-right, 0px));
    border-radius: 32px 32px 0 0;
    background: var(--sheet);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
    box-shadow: 0 -20px 60px -20px var(--shadow), inset 0 1px 0 var(--stroke);
    transform: translateY(105%);
    transition: transform 0.55s cubic-bezier(0.2, 0.9, 0.15, 1);
}
.sheet-layer.show .scrim { opacity: 1; }
.sheet-layer.show .sheet { transform: none; }
.grabber {
    align-self: center;
    width: 40px;
    height: 5px;
    border-radius: 3px;
    background: var(--track);
    margin-bottom: 10px;
}
.x {
    position: absolute;
    top: 16px;
    right: max(16px, env(safe-area-inset-right, 0px));
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    display: grid;
    place-items: center;
    color: var(--fg);
    background: var(--glass-strong);
    box-shadow: inset 0 0 0 1px var(--stroke);
    cursor: pointer;
}
.x i { font-size: 16px; }
.x:focus-visible, .sheet-btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.sheet .orb { width: 64px; height: 64px; border-radius: 20px; }
.sheet .orb i { font-size: 24px; }
.kicker {
    margin: 8px 0 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}
.sheet h2 {
    margin: 0;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: -0.025em;
    line-height: 1.1;
}
.sheet-text { margin: 0; color: var(--muted); max-width: 46ch; }
.sheet-btn {
    margin-top: 16px;
    align-self: stretch;
    padding: 15px 18px;
    border: 0;
    border-radius: 18px;
    background: var(--fg);
    color: var(--bg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}

/* ---------- Ordinateur : la fiche devient une modale centrée ---------- */
@media (min-width: 720px) {
    .sheet-layer {
        align-items: center;
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }
    .sheet {
        border-radius: 32px;
        padding-block: 30px;
        opacity: 0;
        transform: translateY(30px) scale(0.94);
        transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.15, 1), opacity 0.35s ease;
    }
    .sheet-layer.show .sheet {
        opacity: 1;
        transform: none;
    }
    .grabber { display: none; }
}

/* ---------- Téléphone : bandeau pub plus compact ---------- */
@media (max-width: 719px) {
    .ads {
        padding: 16px 16px 18px;
        border-radius: 24px;
    }
}