/* =========================
   LIFE - ECV3.1
========================= */

body {
    margin: 0;
    background: #050505;
}

.life {
    --mx-bg: #050505;
    --mx-bg2: #101010;
    --mx-red: #e01818;
    --mx-orange: #f47a00;
    --mx-white: #ffffff;
    --mx-muted: #a7a7a7;
    --mx-line: rgba(255,255,255,.16);
    --mx-wrap: 1140px;

    width: 100%;
    padding: 52px 0 80px;
    background: var(--mx-bg);
    color: var(--mx-white);
    font-family: Arial, Helvetica, sans-serif;
    overflow: hidden;
}

.life *,
.life *::before,
.life *::after {
    box-sizing: border-box;
}

.life a {
    color: inherit;
    text-decoration: none;
}

/* =========================
   SECTION
========================= */

.life .life-section {
    width: min(var(--mx-wrap), calc(100% - 48px));
    margin: 0 auto 48px;
}

.life .life-section:last-child {
    margin-bottom: 0;
}

/* =========================
   HEADER CATEGORY
========================= */

.life .life-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.life .life-section-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    line-height: 1;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.life .life-section-title::before {
    content: "";
    width: 14px;
    height: 5px;
    background: var(--mx-red);
    flex: 0 0 auto;
}

/* =========================
   CONTROLS
========================= */

.life .life-carousel-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.life .life-carousel-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--mx-line);
    background: #111;
    color: var(--mx-white);
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .22s ease;
}

.life .life-carousel-btn:hover {
    background: var(--mx-red);
    border-color: var(--mx-red);
}

.life .life-carousel-btn:disabled {
    opacity: .28;
    cursor: default;
}

/* =========================
   CAROUSEL
========================= */

.life .life-carousel {
    position: relative;
    overflow: hidden;
}

.life .life-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.life .life-track::-webkit-scrollbar {
    display: none;
}

.life .life-carousel::after {
    content: "";
    position: absolute;
    inset: 0 0 0 auto;
    width: 90px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(5,5,5,0), #050505);
}

/* =========================
   CARD
========================= */

.life .life-card {
    flex: 0 0 calc((100% - 42px) / 4);
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #111;
    border: 1px solid var(--mx-line);
    overflow: hidden;
    transition: .25s ease;
}

.life .life-card:hover {
    border-color: rgba(224,24,24,.75);
    transform: translateY(-4px);
}

.life .life-card-media {
    height: 180px;
    background: #fff;
    overflow: hidden;
}

.life .life-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(.85) contrast(1.05);
    transition: .28s ease;
}

.life .life-card:hover .life-card-media img {
    transform: scale(1.06);
    opacity: .92;
}

/* =========================
   BODY
========================= */

.life .life-card-body {
    padding: 18px 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.life .life-card-meta {
    color: var(--mx-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.life .life-card-title {
    margin: 0;
    color: var(--mx-white);
    font-size: 21px;
    line-height: 1.05;
    font-weight: 900;
    text-transform: uppercase;
    min-height: 46px;
}

.life .life-card-excerpt {
    margin: 0;
    color: #d8d8d8;
    font-size: 14px;
    line-height: 1.45;
    opacity: .9;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 61px;
}

/* =========================
   CREATE CARD
========================= */

.life .life-card-create {
    border: 1px dashed rgba(255,255,255,.28);
    background:
        linear-gradient(135deg, rgba(224,24,24,.16), rgba(255,255,255,.03)),
        #111;
}

.life .life-card-create:hover {
    border-color: var(--mx-red);
    background:
        linear-gradient(135deg, rgba(224,24,24,.28), rgba(255,255,255,.04)),
        #111;
}

.life .life-card-media-create {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #161616;
}

.life .life-card-create-icon {
    font-size: 76px;
    line-height: 1;
    color: var(--mx-red);
    font-weight: 200;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {
    .life .life-card {
        flex-basis: calc((100% - 28px) / 3);
    }
}

@media (max-width: 900px) {
    .life {
        padding: 38px 0 60px;
    }

    .life .life-section {
        width: calc(100% - 32px);
        margin-bottom: 38px;
    }

    .life .life-card {
        flex-basis: calc((100% - 14px) / 2);
    }

    .life .life-card-title {
        font-size: 19px;
    }
}

@media (max-width: 620px) {
    .life .life-section {
        width: calc(100% - 28px);
    }

    .life .life-section-head {
        align-items: flex-start;
    }

    .life .life-section-title {
        font-size: 18px;
    }

    .life .life-carousel-btn {
        width: 38px;
        height: 38px;
    }

    .life .life-card {
        flex-basis: 84%;
    }

    .life .life-card-media,
    .life .life-card-media-create {
        height: 170px;
    }

    .life .life-carousel::after {
        width: 48px;
    }
}

/* =========================
   FALLBACK IMAGE
========================= */

.life .life-card-media {
    position: relative;
    background:
        linear-gradient(135deg, rgba(224,24,24,.18), rgba(0,0,0,.55)),
        linear-gradient(45deg, #111 0%, #1a1a1a 100%);
}

.life .life-card-media::before {
    content: "MX LIFE";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 34px;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;

    color: rgba(255,255,255,.08);

    z-index: 1;
    pointer-events: none;
}

.life .life-card-media::after {
    content: "";
    position: absolute;
    inset: 0;

    background:
        repeating-linear-gradient(
            -45deg,
            rgba(255,255,255,.015) 0px,
            rgba(255,255,255,.015) 2px,
            transparent 2px,
            transparent 14px
        );

    z-index: 1;
    pointer-events: none;
}

.life .life-card-media img {
    position: relative;
    z-index: 2;
}

/* si image cassée ou vide */

.life .life-card-media img[src=""],
.life .life-card-media img:not([src]) {
    opacity: 0;
}

.life .life-card-media-fallback::before {
    content: "MX LIFE";
}