/* ==========================================================================
   Or Nord — direction « magazine de voyage » : photo d'abord, serif éditorial,
   ivoire / encre / or. Tokens en tête, puis du plus général au plus spécifique.
   ========================================================================== */

:root {
    --ivory: #f6f1e9;
    --paper: #fbf8f3;
    --ink: #1c1915;
    --ink-soft: #3d3831;
    --muted: #857b6e;
    --line: #e3dace;
    --gold: #a8834f;
    --gold-soft: #d8c3a0;
    --night: #141c19;
    --danger: #a4302a;

    --serif: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
    --sans: 'Jost', 'Futura', 'Avenir Next', system-ui, sans-serif;

    --wrap: 1240px;
    --gutter: clamp(20px, 4vw, 48px);
    --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.05; letter-spacing: -.01em; margin: 0; }
::selection { background: var(--gold-soft); color: var(--ink); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.kicker {
    margin: 0 0 14px;
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold);
}
.kicker--light { color: #e8d6b6; }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    text-decoration: none;
    padding-bottom: 6px;
    border-bottom: 1px solid currentColor;
    transition: gap .3s var(--ease);
}
.link-arrow::after { content: '→'; font-size: 1rem; letter-spacing: 0; }
.link-arrow:hover { gap: 20px; }
.link-arrow--light { color: #fff; }

.stars { color: var(--gold); letter-spacing: 3px; font-size: .8rem; }
.stars .off { color: var(--line); }

/* ── En-tête ─────────────────────────────────────────────────────────────── */
.site-header { position: relative; z-index: 10; border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 26px; }

.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo span { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1; }
.logo__star { width: 20px; height: 20px; fill: var(--gold); transition: transform .8s var(--ease); }
.logo:hover .logo__star { transform: rotate(90deg); }

.site-nav { display: flex; gap: clamp(18px, 3vw, 40px); }
.site-nav a { font-size: .75rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; padding-block: 6px; background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .35s var(--ease); }
.site-nav a:hover { background-size: 100% 1px; }
.site-nav__admin { color: var(--gold); }

/* Sur une page à photo pleine largeur, l'en-tête se pose dessus en blanc. */
.has-hero .site-header { position: absolute; inset: 0 0 auto; border-bottom-color: rgba(255, 255, 255, .18); color: #fff; }
.has-hero .site-nav__admin { color: var(--gold-soft); }

/* ── Hero (accueil « à la une » et couverture d'article) ─────────────────── */
.hero {
    position: relative;
    min-height: min(92vh, 900px);
    display: flex;
    align-items: flex-end;
    color: #fff;
    background: var(--night);
    overflow: hidden;
    isolation: isolate;
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: hero-in 2.4s var(--ease) both; }
.hero__shade {
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, rgba(10, 12, 11, .5) 0%, rgba(10, 12, 11, 0) 65%),
        linear-gradient(180deg, rgba(10, 12, 11, .45) 0%, rgba(10, 12, 11, 0) 26%, rgba(10, 12, 11, .15) 48%, rgba(10, 12, 11, .82) 100%);
}
.hero .kicker, .hero__meta { text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }
.hero__content { width: 100%; padding-block: 140px clamp(48px, 9vh, 96px); animation: rise 1.2s .2s var(--ease) both; }
.hero__title { font-size: clamp(2.8rem, 7.4vw, 6.4rem); max-width: 15ch; margin-bottom: 24px; text-wrap: balance; }
.hero__excerpt { max-width: 52ch; margin: 0 0 36px; font-size: 1.1rem; line-height: 1.6; color: rgba(255, 255, 255, .86); }
.hero__meta { margin: 0; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.hero--post { min-height: min(84vh, 820px); }
.hero--post .hero__title { max-width: 18ch; font-size: clamp(2.6rem, 6.4vw, 5.6rem); }

@keyframes hero-in { from { transform: scale(1.08); opacity: .4; } to { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Sections & filtres ─────────────────────────────────────────────────── */
.section { padding-block: clamp(64px, 10vw, 120px); }
.has-hero .section { padding-top: clamp(56px, 8vw, 96px); }
body:not(.has-hero) .section { padding-top: clamp(48px, 7vw, 88px); }

.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 40px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 56px); padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.section__title { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }

.filters { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.tabs { display: flex; gap: 24px; flex-wrap: wrap; }
.tabs a { font-size: .75rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding-block: 6px; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { color: var(--ink); border-bottom-color: var(--gold); }
.filters select {
    width: auto;
    appearance: none;
    padding: 8px 34px 8px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23857b6e'/%3E%3C/svg%3E") right 4px center no-repeat;
    font: 500 .75rem/1.4 var(--sans);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
}
.filters select:focus { outline: none; border-bottom-color: var(--gold); }

/* ── Cartes ─────────────────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(40px, 5vw, 64px) clamp(20px, 3vw, 40px); }
.card__link { display: block; text-decoration: none; }
.card__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ivory); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card__link:hover .card__media img { transform: scale(1.05); }
.card__placeholder { height: 100%; display: grid; place-items: center; background: radial-gradient(120% 90% at 30% 20%, #2a3530 0%, var(--night) 70%); }
.card__placeholder span { font-family: var(--serif); font-size: 7rem; font-style: italic; color: var(--gold-soft); opacity: .8; }
.card__type { position: absolute; top: 16px; left: 16px; padding: 6px 12px; font-size: .64rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; background: rgba(251, 248, 243, .92); color: var(--ink); backdrop-filter: blur(6px); }
.card__body { padding-top: 22px; }
.card__body .kicker { margin-bottom: 10px; }
.card__title { font-size: clamp(1.55rem, 2.2vw, 1.9rem); line-height: 1.12; margin-bottom: 12px; text-wrap: balance; background: linear-gradient(var(--ink), var(--ink)) left 96% / 0 1px no-repeat; transition: background-size .5s var(--ease); display: inline; }
.card__link:hover .card__title { background-size: 100% 1px; }
.card__body .stars { display: block; margin-top: 12px; }

.empty { text-align: center; padding-block: 80px; color: var(--muted); }
.empty__title { font-family: var(--serif); font-size: 2rem; font-style: italic; color: var(--ink); margin: 0 0 8px; }

/* Pagination (balisage par défaut de KnpPaginator) */
.pager { margin-top: 80px; display: flex; justify-content: center; }
.pager:not(:has(.pagination)) { display: none; }
.pagination { display: flex; gap: 4px; align-items: center; }
.pagination a, .pagination .current { display: grid; place-items: center; min-width: 44px; height: 44px; padding-inline: 10px; font-family: var(--serif); font-size: 1.2rem; text-decoration: none; color: var(--muted); border-bottom: 1px solid transparent; }
.pagination a:hover { color: var(--ink); }
.pagination .current { color: var(--ink); border-bottom-color: var(--gold); }

/* ── Article ────────────────────────────────────────────────────────────── */
.post { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(40px, 7vw, 110px); padding-block: clamp(56px, 8vw, 104px); }

.fiche { align-self: start; position: sticky; top: 32px; padding-top: 28px; border-top: 1px solid var(--ink); }
.fiche__label { margin: 0 0 10px; font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.fiche__name { margin: 0 0 24px; font-family: var(--serif); font-size: 1.7rem; line-height: 1.15; }
.fiche dl { margin: 0; }
.fiche dl div { display: flex; justify-content: space-between; gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.fiche dt { color: var(--muted); }
.fiche dd { margin: 0; text-align: right; }
.fiche__score { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 24px; }
.fiche__note { font-family: var(--serif); font-size: 3.6rem; line-height: 1; }
.fiche__note small { font-size: 1.3rem; color: var(--muted); }

.post__body { max-width: 680px; }
.lede { margin: 0 0 48px; font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-style: italic; line-height: 1.4; color: var(--ink-soft); }

.prose { font-size: 1.08rem; line-height: 1.85; color: var(--ink-soft); }
.prose > * { margin-block: 0; }
.prose > * + * { margin-top: 1.4em; }
.prose > p:first-child::first-letter { float: left; font-family: var(--serif); font-size: 5.4em; line-height: .82; padding: .06em .12em 0 0; color: var(--gold); }
.prose > h2 { margin-top: 1.7em; font-size: clamp(1.9rem, 3vw, 2.4rem); color: var(--ink); }
.prose > h3 { margin-top: 1.6em; font-size: 1.5rem; color: var(--ink); }
.prose > :is(h2, h3) + * { margin-top: .7em; }
.prose a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose img { width: 100%; margin-block: 2.4em; }
.prose ul { padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 28px; }
.prose li + li { margin-top: .5em; }
.prose li::before { content: ''; position: absolute; left: 4px; top: .8em; width: 12px; height: 1px; background: var(--gold); }
.prose > blockquote {
    margin-block: 2.2em;
    padding: 1.4em 0;
    border-block: 1px solid var(--line);
    font-family: var(--serif);
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    font-style: italic;
    line-height: 1.3;
    color: var(--ink);
    text-align: center;
    text-wrap: balance;
}
.prose blockquote p { margin: 0; }
.prose hr { border: 0; text-align: center; margin-block: 3em; }
.prose hr::after { content: '✦  ✦  ✦'; color: var(--gold); letter-spacing: .4em; }

.related { background: var(--ivory); padding-block: clamp(64px, 9vw, 112px); }

/* ── Pied de page ───────────────────────────────────────────────────────── */
.site-footer { background: var(--night); color: rgba(255, 255, 255, .72); padding-top: clamp(64px, 8vw, 96px); }
.site-footer__inner { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; padding-bottom: 64px; }
.site-footer__logo { margin: 0 0 16px; font-family: var(--serif); font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; line-height: 1; color: #fff; }
.site-footer__tagline { margin: 0; max-width: 38ch; line-height: 1.7; }
.site-footer__nav { display: grid; grid-template-columns: repeat(2, auto); gap: 14px 56px; align-content: start; }
.site-footer__nav a { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; }
.site-footer__nav a:hover { color: var(--gold-soft); }
.site-footer__legal { padding-bottom: 24px; font-size: .8rem; color: rgba(255, 255, 255, .45); }
.site-footer__legal::before { content: ''; display: block; height: 1px; margin-bottom: 24px; background: rgba(255, 255, 255, .1); }

/* ── Messages flash ─────────────────────────────────────────────────────── */
.flashes { padding-top: 24px; }
.has-hero .flashes { position: absolute; top: 96px; left: 0; right: 0; z-index: 11; }
.flash { padding: 14px 20px; background: #e6efe6; color: #2e5c36; font-size: .92rem; border-left: 2px solid #2e5c36; }
.flash--error { background: #f6e5e2; color: var(--danger); border-left-color: var(--danger); }

/* ── Formulaires & admin ────────────────────────────────────────────────── */
.admin { padding-block: 56px 96px; }
.panel { background: #fff; border: 1px solid var(--line); padding: clamp(24px, 4vw, 40px); }
.narrow { max-width: 440px; margin: 72px auto 96px; }
.narrow h1 { font-size: 2.6rem; margin-bottom: 24px; }
label { display: block; font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 20px 0 8px; }
input[type=text], input[type=password], input[type=date], input[type=file], select, textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 0; font: inherit; color: var(--ink); background: var(--paper);
}
.panel select { appearance: auto; }
textarea { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .9rem; line-height: 1.6; }
input:focus, .panel select:focus, textarea:focus { outline: none; border-color: var(--gold); background: #fff; }
.help-text, .form-text { font-size: .82rem; color: var(--muted); margin-top: 6px; }
form ul { color: var(--danger); font-size: .88rem; padding-left: 18px; margin: 6px 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 24px; }
input[type=checkbox] { width: 18px; height: 18px; margin: 0 10px 0 0; accent-color: var(--ink); }
.article-form div:has(> input[type=checkbox]) { display: flex; align-items: center; margin-top: 24px; }
.article-form div:has(> input[type=checkbox]) label { margin: 0; color: var(--ink); }
.cover-preview { max-width: 320px; margin-top: 20px; }

.btn { display: inline-block; margin-top: 28px; padding: 14px 28px; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--paper); font: 500 .75rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: transparent; color: var(--ink); }
.btn--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: var(--danger); color: #fff; }
.danger-zone { margin-top: 24px; }

.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.admin-head h1 { font-size: clamp(2.2rem, 4vw, 3rem); }
.admin-head .btn { margin: 0; }
.admin-head > a:not(.btn) { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.table td a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.table tr:last-child td { border-bottom: 0; }
.table .empty { padding: 40px; }
.status { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; padding: 4px 10px; background: var(--ivory); color: var(--muted); }
.status--on { background: #e6efe6; color: #2e5c36; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .post { grid-template-columns: 1fr; }
    .fiche { position: static; max-width: 680px; }
}

@media (max-width: 640px) {
    .site-header__inner { padding-block: 20px; }
    .logo span { font-size: 1.35rem; }
    .site-nav { gap: 16px; }
    .site-nav a { font-size: .66rem; letter-spacing: .14em; }
    .site-nav a:not(.site-nav__admin):nth-child(n+3) { display: none; }
    .grid { grid-template-columns: 1fr; }
    .card__media { aspect-ratio: 4 / 4.4; }
    .hero { min-height: 86vh; }
    .hero__content { padding-top: 120px; }
    .filters { width: 100%; justify-content: space-between; }
    .tabs { gap: 16px; }
    .site-footer__nav { grid-template-columns: 1fr 1fr; gap: 14px 24px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
