:root {
    --black: #000;
    --white: #fff;
    --border: #d6d6d6;
    --latest: #f2f2f2;
    --hover: #f7f7f7;
    --latest-hover: #e9e9e9;
    --content: 680px;
    --header-height: 128px;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    overflow: hidden;
    background: var(--white);
    color: var(--black);
    font: 17px/1.55 Arial, Helvetica, sans-serif;
}

button,
input,
select {
    font: inherit;
}

/* ACCESSIBILITÉ */

.filters label span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* HEADER */

.site-header {
    position: relative;
    z-index: 20;
    width: 100%;
    height: var(--header-height);
    padding: 8px 0;
    background: var(--white);
}

.header-inner {
    position: relative;
    width: min(calc(100% - 24px), var(--content));
    height: 112px;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 48px;
    grid-template-rows: 66px 46px;
    gap: 0;
    align-items: stretch;
    overflow: hidden;
    background:
        linear-gradient(var(--border), var(--border)) 0 66px / 100% 1px no-repeat,
        var(--white);
}

.brand {
    position: relative;
    grid-column: 1 / 3;
    grid-row: 1;
    padding: 0 22px 0 10px;
    display: flex;
    align-items: center;
    color: var(--black);
    font-size: 25px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.075em;
    text-decoration: underline;
}

.brand:hover{

    text-decoration: none;
}

/* .brand::before {
    position: absolute;
    top: 50%;
    left: 0px;
    width: 10px;
    height: 30px;
    background: var(--black);
    content: "";
    transform: translateY(-50%);
}
 */
.filters,
.filters-inner {
    display: contents;
}

.filters label {
    min-width: 0;
    margin: 0;
}

.filters-inner > label:nth-of-type(1) {
    position: relative;
    grid-column: 2 / 5;
    grid-row: 1;
    width: min(340px, calc(100% - 22px));
    height: 40px;
    margin-right: 22px;
    align-self: center;
    justify-self: end;
}

.filters-inner > label:nth-of-type(1)::after {
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
    width: 48px;
    height: 40px;
    background-color: var(--black);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px;
    content: "";
    pointer-events: none;
}

.filters input,
.filters select {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    background-color: var(--white);
    color: var(--black);
    border: 0;
    border-radius: 0;
    text-transform: uppercase;
}

.filters input {
    height: 40px;
    padding: 0 58px 0 16px;
    border: 1px solid var(--border);
    font-size: 15px;
    font-weight: 500;
}

.filters input::placeholder {
    color: #666;
    opacity: 1;
}

.filters select {
    height: 46px;
    padding: 0 32px 0 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.filters-inner > label:nth-of-type(2) {
    grid-column: 1;
    grid-row: 2;
}

.filters-inner > label:nth-of-type(3) {
    grid-column: 2;
    grid-row: 2;
}

.filters-inner > label:nth-of-type(4) {
    grid-column: 3;
    grid-row: 2;
}

#filters-reset {
    grid-column: 4;
    grid-row: 2;
    width: 48px;
    height: 46px;
    margin: 0;
    padding: 0 0 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    background: var(--white);
    color: var(--black);
    border: 0;
    border-radius: 0;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}

#filters-reset:hover,
#filters-reset:focus-visible {
    background: var(--black);
    color: var(--white);
}

/* FLUX */

.feed {
    position: relative;
    width: min(calc(100% - 24px), var(--content));
    height: calc(100dvh - var(--header-height));
    margin: 0 auto;
    padding: 25vh 0 30vh;
    display: flex;
    flex-direction: column;
    gap: 22px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.feed::-webkit-scrollbar,
.story.is-active::-webkit-scrollbar {
    display: none;
}

/* CARTES */

.story {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    padding: 28px 25px 27px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 25px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .07), 0 2px 8px rgba(0, 0, 0, .04);
    transition: opacity .36s ease, transform .36s ease, background-color .2s ease, border-color .2s ease, max-height .36s ease;
}

.story.is-hidden {
    display: none;
}

.story.is-active {
    z-index: 3;
    opacity: 1;
    transform: translateY(0);
    background: var(--latest);
    border-color: #c7c7c7;
    -webkit-mask-image: none;
    mask-image: none;
    pointer-events: auto;
}

.story.is-active:hover {
    background: var(--latest-hover);
}

.story.is-before,
.story.is-after {
    z-index: 1;
    opacity: .68;
    pointer-events: none;
}

.story.is-before {
    max-height: 260px;
    margin-bottom: -4px;
    transform: translateY(-2px);
    -webkit-mask-image: linear-gradient(to top, transparent 0, rgba(0,0,0,.15) 35px, rgba(0,0,0,.45) 90px, rgba(0,0,0,.75) 165px, #000 235px);
    mask-image: linear-gradient(to top, transparent 0, rgba(0,0,0,.15) 35px, rgba(0,0,0,.45) 90px, rgba(0,0,0,.75) 165px, #000 235px);
}

.story.is-after {
    max-height: 280px;
    margin-top: -4px;
    transform: translateY(2px);
    -webkit-mask-image: linear-gradient(to bottom, #000 0, rgba(0,0,0,.75) 90px, rgba(0,0,0,.45) 180px, rgba(0,0,0,.15) 240px, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0, rgba(0,0,0,.75) 90px, rgba(0,0,0,.45) 180px, rgba(0,0,0,.15) 240px, transparent 100%);
}

/* CONTENU DES CARTES */

.story-meta {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--black);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.story-meta span:empty {
    display: none;
}

.story-meta span + span::before {
    margin-right: 7px;
    content: "·";
}

.story-meta .story-meta-break {
    display: block !important;
    flex: 0 0 100%;
    width: 100%;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.story-meta .story-meta-break::before,
.story-meta .story-meta-break + .story-time::before {
    display: none;
    content: none;
}

.story-category-link,
.story-trend a {
    color: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.story-category-link:hover,
.story-category-link:focus-visible,
.story-trend a:hover,
.story-trend a:focus-visible {
    opacity: .55;
}

.story-title {
    margin: 0 0 14px;
    color: var(--black);
    font-size: clamp(30px, 5vw, 42px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.045em;
}

.story-summary {
    margin: 0;
    color: var(--black);
    font-size: 19px;
    line-height: 1.55;
}

.story-why {
    margin: 17px 0 0;
    padding-left: 15px;
    color: var(--black);
    border-left: 2px solid var(--border);
    font-size: 18px;
    line-height: 1.55;
}

.story-sources {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.story-sources a {
    padding: 6px 11px;
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--border);
    border-radius: 15px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
}

.story-sources a:hover,
.story-sources a:focus-visible {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

.story-google-news {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.story-google-news a {
    display: inline-block;
    color: var(--black);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: underline;
}

.story-google-news a::after {
    margin-left: 10px;
    content: "↗";
}

/* PROGRESSION */

.story-progress {
    position: absolute;
    z-index: 6;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4px;
    overflow: hidden;
    background: transparent;
    border-radius: 0 0 25px 25px;
    pointer-events: none;
}

.story-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--black);
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

.story:not(.is-active) .story-progress {
    display: none;
}

/* NAVIGATION */

.story-navigation {
    position: fixed;
    z-index: 40;
    left: 50%;
    bottom: 30px;
    display: none;
    align-items: center;
    gap: 22px;
    transform: translateX(-50%);
}

.story-navigation.is-visible {
    display: flex;
}

.story-arrow {
    position: relative;
    width: 50px;
    height: 50px;
    padding: 0;
    background: rgba(255,255,255,.92);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 3px 12px rgba(0,0,0,.13);
    cursor: pointer;
}

.story-arrow::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    content: "";
    transform: translate(-50%, -50%);
}

.story-arrow-up::before {
    border-right: 8px solid transparent;
    border-bottom: 12px solid var(--black);
    border-left: 8px solid transparent;
}

.story-arrow-down::before {
    border-top: 12px solid var(--black);
    border-right: 8px solid transparent;
    border-left: 8px solid transparent;
}

.story-arrow:hover {
    background: var(--latest);
}

.story-arrow:active {
    transform: scale(.9);
}

.story-arrow[hidden] {
    display: none;
}

.story-play-pause {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--black);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.story-play-pause::before {
    display: none;
}

/* STATUT */

.feed-status {
    position: fixed;
    z-index: 10;
    top: 50%;
    left: 50%;
    width: min(calc(100% - 30px), var(--content));
    margin: 0;
    padding: 22px;
    background: var(--white);
    color: var(--black);
    text-align: center;
    transform: translate(-50%, -50%);
}

.feed-status[hidden] {
    display: none;
}

.noscript {
    width: min(100%, var(--content));
    margin: 0 auto;
    padding: 22px;
    text-align: center;
}

/* SMARTPHONE */

@media (max-width: 760px) {
    :root {
        --header-height: 76px;
    }

    body {
        font-size: 15px;
    }

    .site-header {
        height: var(--header-height);
        padding: 3px 0;
    }

    .header-inner {
        width: calc(100% - 10px);
        height: 70px;
        margin: 0 auto;
        grid-template-columns: repeat(3, minmax(0, 1fr)) 30px;
        grid-template-rows: 38px 32px;
        background: linear-gradient(var(--border), var(--border)) 0 38px / 100% 1px no-repeat, var(--white);
        border-radius: 12px;
    }

    .brand {
        grid-column: 1;
        grid-row: 1;
        padding: 0 4px 0 17px;
        font-size: 18px;
        white-space: nowrap;
    }

    .brand::before {
        left: 8px;
        width: 3px;
        height: 18px;
    }

    .filters-inner > label:nth-of-type(1) {
        grid-column: 2 / 5;
        grid-row: 1;
        width: calc(100% - 5px);
        height: 28px;
        margin-right: 5px;
    }

    .filters input {
        height: 28px;
        padding: 0 35px 0 8px;
        font-size: 10px;
    }

    .filters-inner > label:nth-of-type(1)::after {
        width: 32px;
        height: 28px;
        background-size: 15px;
    }

    .filters-inner > label:nth-of-type(2) {
        grid-column: 1;
        grid-row: 2;
    }

    .filters-inner > label:nth-of-type(3) {
        grid-column: 2;
        grid-row: 2;
    }

    .filters-inner > label:nth-of-type(4) {
        grid-column: 3;
        grid-row: 2;
    }

    .filters select {
        height: 32px;
        padding: 0 14px 0 5px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 5px center;
        background-size: 7px auto;
        border-right: 1px solid var(--border);
        font-size: 9px;
        appearance: none;
        -webkit-appearance: none;
    }

    #filters-reset {
        grid-column: 4;
        grid-row: 2;
        width: 30px;
        height: 32px;
        padding: 0 0 2px;
        font-size: 18px;
    }

    .feed {
        width: calc(100% - 10px);
        height: calc(100dvh - var(--header-height));
        min-height: 0;
        padding: 34px 0 43px;
        gap: 9px;
    }

    .story.is-active {
        width: 100%;
        max-height: calc(100dvh - var(--header-height) - 58px);
        padding: 12px 13px 16px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: none;
        border-radius: 15px;
    }

    .story-meta {
        margin-bottom: 4px;
        gap: 3px;
        font-size: 9px;
        line-height: 1.15;
    }

    .story-meta span + span::before {
        margin-right: 3px;
    }

    .story-title {
        margin-bottom: 6px;
        font-size: clamp(18px, 5.6vw, 25px);
        line-height: 1.02;
    }

    .story-summary {
        font-size: 13px;
        line-height: 1.28;
    }

    .story-why {
        margin-top: 7px;
        padding-left: 8px;
        font-size: 12px;
        line-height: 1.27;
    }

    .story-sources {
        margin-top: 7px;
        gap: 4px;
    }

    .story-sources a {
        padding: 3px 6px;
        font-size: 8px;
        line-height: 1.1;
    }

    .story-google-news {
        margin-top: 7px;
        padding-top: 6px;
    }

    .story-google-news a {
        font-size: 10px;
        line-height: 1.15;
    }

    .story.is-before {
        max-height: 48px;
    }

    .story.is-after {
        max-height: 58px;
    }

    .story-navigation {
        bottom: 5px;
        gap: 12px;
    }

    .story-arrow,
    .story-play-pause {
        width: 27px;
        height: 27px;
    }

    .story-progress {
        height: 3px;
        border-radius: 0 0 15px 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .feed {
        scroll-behavior: auto;
    }

    .story {
        transition: none;
    }
}


.story-arrow-start::before {
    top: 57%;

    border-right: 7px solid transparent;
    border-bottom: 10px solid var(--black);
    border-left: 7px solid transparent;
}

.story-arrow-start::after {
    position: absolute;

    top: 8px;
    left: 50%;

    width: 14px;
    height: 2px;

    background: var(--black);

    content: "";

    transform: translateX(-50%);
}