/* ============================================================================
   Veille — editorial "revue de presse" layout (com_content article + RSS)
   Self-contained + scoped to .veille-page so it renders identically for
   guests (public.css) and logged-in students (app.css). Matches the homepage:
   Bricolage Grotesque + Hanken Grotesk, cream/ink palette, blue accent.
   ========================================================================== */

.veille-page {
    --v-cream:   #fbfaf7;
    --v-paper:   #ffffff;
    --v-ink:     #0e1320;
    --v-muted:   #5b6472;
    --v-line:    #e7e3da;
    --v-dark:    #0d1424;
    --v-blue:    #2563eb;
    --v-blue-d:  #1d4ed8;
    --v-live:    #e0483d;
    --v-radius:  18px;
    --v-shadow:  0 1px 2px rgba(14, 19, 32, .04);
    --v-shadow-h:0 26px 52px -26px rgba(14, 19, 32, .32);
    --v-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
    --v-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;

    background: var(--v-cream);
    color: var(--v-ink);
    font-family: var(--v-body);
    -webkit-font-smoothing: antialiased;
    overflow: clip;
}

.veille-page * { box-sizing: border-box; }
.veille-page a { text-decoration: none; color: inherit; }

.veille-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 48px);
}

/* ----- Hero ------------------------------------------------------------- */
.veille-hero {
    position: relative;
    padding: clamp(46px, 7vw, 96px) 0 clamp(30px, 4vw, 48px);
    border-bottom: 1px solid var(--v-line);
}
/* subtle ruled-paper grid in the hero background */
.veille-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--v-line) 1px, transparent 1px);
    background-size: 100% 34px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.35), transparent 70%);
            mask-image: linear-gradient(180deg, rgba(0,0,0,.35), transparent 70%);
    opacity: .5;
    pointer-events: none;
}
.veille-hero > * { position: relative; }

.veille-kicker {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--v-blue);
    margin-bottom: 1.15rem;
}
.veille-kicker .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--v-live);
    box-shadow: 0 0 0 0 rgba(224, 72, 61, .55);
    animation: v-pulse 2.4s infinite;
}
@keyframes v-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(224, 72, 61, .5); }
    70%  { box-shadow: 0 0 0 9px rgba(224, 72, 61, 0); }
    100% { box-shadow: 0 0 0 0 rgba(224, 72, 61, 0); }
}

.veille-title {
    font-family: var(--v-display);
    font-weight: 600;
    font-size: clamp(2.3rem, 5.6vw, 4.1rem);
    line-height: 1.01;
    letter-spacing: -.024em;
    margin: 0;
    max-width: 20ch;
    text-wrap: balance;
}
.veille-lead {
    margin: 1.35rem 0 0;
    max-width: 60ch;
    font-size: clamp(1.04rem, 1.6vw, 1.26rem);
    line-height: 1.62;
    color: var(--v-muted);
}
.veille-lead p { margin: 0; }

/* ----- Article body ----------------------------------------------------- */
.veille-article {
    padding: clamp(36px, 5vw, 64px) 0;
    border-bottom: 1px solid var(--v-line);
}
.veille-body {
    max-width: 68ch;
    font-size: 1.06rem;
    line-height: 1.72;
    color: #232a37;
}
.veille-body h2 {
    font-family: var(--v-display);
    font-weight: 600;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    line-height: 1.12;
    letter-spacing: -.015em;
    margin: 2.6rem 0 1rem;
    color: var(--v-ink);
}
.veille-body h2:first-child { margin-top: 0; }
.veille-body p { margin: 0 0 1.15rem; }
.veille-body ul,
.veille-body ol { margin: 0 0 1.3rem; padding-left: 1.3rem; }
.veille-body li { margin: 0 0 .55rem; }
.veille-body li::marker { color: var(--v-blue); font-weight: 700; }
.veille-body strong { color: var(--v-ink); font-weight: 700; }
.veille-body a { color: var(--v-blue); font-weight: 600; box-shadow: inset 0 -1px 0 rgba(37,99,235,.3); }
.veille-body a:hover { box-shadow: inset 0 -2px 0 var(--v-blue); }
.veille-body blockquote {
    margin: 2rem 0;
    padding: 1.1rem 0 1.1rem 1.6rem;
    border-left: 3px solid var(--v-blue);
    font-family: var(--v-display);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    line-height: 1.4;
    font-weight: 500;
    color: var(--v-ink);
}
.veille-body blockquote p { margin: 0; }

/* ----- Feed section ----------------------------------------------------- */
.veille-feed { padding: clamp(40px, 6vw, 78px) 0 clamp(56px, 8vw, 104px); }

.veille-feed__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: clamp(26px, 4vw, 44px);
}
.veille-feed__heading {
    font-family: var(--v-display);
    font-weight: 600;
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    letter-spacing: -.02em;
    line-height: 1;
    margin: 0;
}
.veille-feed__source {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--v-muted);
    padding: .5rem .9rem;
    background: var(--v-paper);
    border: 1px solid var(--v-line);
    border-radius: 999px;
    box-shadow: var(--v-shadow);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.veille-feed__source .live {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--v-live); flex: none;
    animation: v-pulse 2.4s infinite;
}
.veille-feed__source a { color: var(--v-blue); }

/* magazine grid: featured first item spans two columns on wide screens */
.veille-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2vw, 26px);
}
@media (max-width: 900px) { .veille-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .veille-grid { grid-template-columns: 1fr; } }

.veille-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--v-paper);
    border: 1px solid var(--v-line);
    border-radius: var(--v-radius);
    overflow: hidden;
    box-shadow: var(--v-shadow);
    transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease, border-color .3s ease;
    opacity: 0;
    transform: translateY(14px);
    animation: v-rise .6s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes v-rise { to { opacity: 1; transform: none; } }
.veille-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--v-shadow-h);
    border-color: #d8d2c6;
}

/* featured (first) card */
.veille-card--lead { grid-column: span 2; grid-row: span 2; }
@media (max-width: 900px) { .veille-card--lead { grid-column: span 2; grid-row: auto; } }
@media (max-width: 600px) { .veille-card--lead { grid-column: span 1; } }

.veille-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--v-dark);
    overflow: hidden;
}
.veille-card--lead .veille-card__media { aspect-ratio: 16 / 8.4; }
.veille-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.veille-card:hover .veille-card__media img { transform: scale(1.05); }

/* fallback monogram when the feed item has no image */
.veille-card__mono {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    background:
        radial-gradient(120% 120% at 0% 0%, #1b2740 0%, var(--v-dark) 55%);
    color: #fff;
    font-family: var(--v-display);
    font-weight: 600;
    font-size: clamp(2.4rem, 6vw, 4rem);
    letter-spacing: -.03em;
}
.veille-card__mono::after {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
    background-size: 16px 16px;
}

.veille-card__num {
    position: absolute;
    top: 12px; left: 12px;
    z-index: 2;
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 999px;
    background: rgba(14,19,32,.62);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.veille-card__body {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: clamp(16px, 2vw, 22px);
    flex: 1;
}
.veille-card__date {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--v-blue);
    font-variant-numeric: tabular-nums;
}
.veille-card__title {
    font-family: var(--v-display);
    font-weight: 600;
    font-size: 1.08rem;
    line-height: 1.22;
    letter-spacing: -.012em;
    margin: 0;
    color: var(--v-ink);
    transition: color .2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.veille-card--lead .veille-card__title {
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    -webkit-line-clamp: 4;
}
.veille-card:hover .veille-card__title { color: var(--v-blue-d); }

.veille-card__desc {
    font-size: .92rem;
    line-height: 1.55;
    color: var(--v-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.veille-card--lead .veille-card__desc { -webkit-line-clamp: 4; font-size: .98rem; }

.veille-card__more {
    margin-top: auto;
    padding-top: .4rem;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .84rem;
    font-weight: 700;
    color: var(--v-ink);
    transition: gap .2s ease, color .2s ease;
}
.veille-card:hover .veille-card__more { color: var(--v-blue); gap: .75rem; }
.veille-card__more i { font-size: .78em; }

/* full-card click target */
.veille-card__link { position: absolute; inset: 0; z-index: 1; }

/* ----- Empty / error states --------------------------------------------- */
.veille-note {
    padding: 2rem;
    background: var(--v-paper);
    border: 1px dashed var(--v-line);
    border-radius: var(--v-radius);
    color: var(--v-muted);
    font-size: .98rem;
}

@media (prefers-reduced-motion: reduce) {
    .veille-card { animation: none; opacity: 1; transform: none; }
    .veille-kicker .dot, .veille-feed__source .live { animation: none; }
}
