/*
Theme Name: CryptoFinder
Description: Vitrine éditoriale CryptoFinder pour la présentation agence.
Version: 1.0.3
Requires PHP: 8.1
Text Domain: cryptofinder
*/
@font-face {
    font-family: "Instrument Sans";
    src: url("assets/instrument-sans.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}
:root {
    color-scheme: dark;
    --black: #101010;
    --bg: #191919;
    --surface: #222;
    --ink: #faf7ef;
    --muted: #bdbab1;
    --line: #ffffff1c;
    --gold: #ffcc48;
    --card-hover-shadow: inset 0 0 46px #ffcc4826, 0 8px 26px #ffcc4826;
    --wrap: 1140px;
    --gutter: clamp(18px, 5vw, 48px);
    --header-height: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.6 "Instrument Sans", system-ui, sans-serif; }
body.cf-nav-open { overflow: hidden; }
a { color: inherit; text-decoration-thickness: .09em; text-underline-offset: .2em; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
a, button { -webkit-tap-highlight-color: transparent; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
figure { max-width: 100%; margin-inline: 0; }
button, input { font: inherit; }
h1, h2, h3 { line-height: 1.12; text-wrap: balance; }
p { margin-block: 0 1em; }
.cf-wrap { width: min(var(--wrap), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.cf-site-main { min-height: 52vh; }
.cf-skip {
    position: fixed;
    left: var(--gutter);
    top: calc(var(--wp-admin--admin-bar--height, 0px) + 10px);
    transform: translateY(-200%);
    z-index: 10001;
    padding: 9px 14px;
    border-radius: 8px;
    background: var(--gold);
    color: var(--black);
}
.cf-skip:focus { transform: none; color: var(--black); }
.cf-site-header {
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0px);
    z-index: 30;
    border-bottom: 1px solid var(--line);
    background: var(--black);
}
.cf-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(12px, 3vw, 34px);
    min-height: var(--header-height);
}
.cf-brand { display: flex; align-items: center; color: var(--ink); font-weight: 700; text-decoration: none; }
.cf-brand-img { display: block; width: 149px; height: auto; }
.cf-navigation > ul {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 2px clamp(7px, 1.35vw, 22px);
    margin: 0;
    padding: 0;
    list-style: none;
}
.cf-navigation li { position: relative; }
.cf-navigation a {
    display: flex;
    align-items: center;
    min-height: 46px;
    font-size: .89rem;
    font-weight: 650;
    text-decoration: none;
}
.cf-navigation .current-menu-item > a,
.cf-navigation .current_page_item > a,
.cf-navigation .current-menu-ancestor > a { color: var(--gold); }
.cf-navigation .sub-menu,
.cf-navigation .children {
    padding: 0 16px;
    margin: 0;
    list-style: none;
}
.cf-nav-toggle, .cf-nav-shade { display: none; }
.cf-header-account {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    white-space: nowrap;
    font-weight: 650;
    font-size: .88rem;
    text-decoration: none;
}
.cf-hero { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(145deg, #333 0%, #151515 78%); }
.cf-hero-media {
    position: absolute;
    z-index: -1;
    inset: 0 0 0 auto;
    width: 68%;
    height: 100%;
    object-fit: cover;
    object-position: 53% 46%;
    opacity: .65;
    filter: saturate(.35) brightness(.77);
    mask-image: linear-gradient(90deg, transparent 2%, #000 52%);
}
.cf-hero-inner { padding-block: clamp(62px, 7vw, 100px) clamp(68px, 8vw, 115px); }
.cf-hero h1 {
    max-width: 650px;
    margin: 0 0 20px;
    font-size: clamp(2.27rem, 4.4vw, 3.5rem);
    letter-spacing: -.047em;
}
.cf-hero h1 span { display: block; }
.cf-hero p { max-width: 460px; margin-bottom: 26px; color: #e7e2d7; }
.cf-hero-links { display: flex; flex-wrap: wrap; gap: 10px; }
.cf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    padding: 8px 17px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: #f7efdb;
    color: #1c180f;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
}
.cf-button:hover { background: white; color: #110e06; }
.cf-button-primary { background: var(--gold); }
.cf-button-primary:hover { background: #ffdd79; }
.cf-pillars { padding-block: clamp(30px, 5vw, 54px); background: linear-gradient(105deg, #323232, #2b2b2b); }
.cf-pillar-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 2vw, 20px);
}
.cf-pillar {
    padding: clamp(18px, 3.2vw, 39px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #191919;
    text-align: center;
}
.cf-pillar h2 { margin: 16px 0 10px; font-size: clamp(1.15rem, 2.2vw, 1.4rem); }
.cf-pillar p { margin: 0; color: var(--muted); }
.cf-pillar-icon {
    display: grid;
    width: 44px;
    height: 44px;
    margin-inline: auto;
    place-items: center;
    border-radius: 11px;
    background: #2b2820;
    color: var(--gold);
    font-size: 1.55rem;
    line-height: 1;
}
.cf-section { padding-block: clamp(38px, 7vw, 82px); }
.cf-section-title { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 24px; }
.cf-section-title h2 { margin: 0; font-size: clamp(1.65rem, 4vw, 2.4rem); letter-spacing: -.028em; }
.cf-section-title a { color: var(--gold); }
.cf-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.5vw, 26px); }
.cf-post-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
}
.cf-post-card-link {
    display: block;
    flex: 1;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.cf-post-card-link:focus-visible { outline-offset: -3px; }
.cf-card-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cf-card-copy { padding: 19px 20px 22px; overflow-wrap: anywhere; }
.cf-card-copy time { color: var(--muted); font-size: .84rem; }
.cf-card-copy h2, .cf-card-copy h3 { margin: 7px 0 8px; font-size: 1.28rem; }
.cf-post-card-link:is(:hover, :focus-visible) :is(h2, h3) { color: var(--gold); }
.cf-card-copy p { margin: 0; color: var(--muted); }
.cf-reader { width: min(760px, calc(100% - var(--gutter) * 2)); }
.cf-page-title {
    margin: 0 0 22px;
    font-size: clamp(2.05rem, 5vw, 3.7rem);
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
}
.cf-entry-thumbnail { display: block; width: 100%; height: auto; margin: 24px 0; border-radius: 16px; }
.cf-entry-content { overflow-wrap: anywhere; }
.cf-entry-content a { color: var(--gold); }
.cf-entry-content .wp-block-button__link { color: var(--ink); }
.cf-entry-content h2, .cf-entry-content h3 { margin-top: 1.45em; }
.cf-entry-content table { max-width: 100%; border-collapse: collapse; }
.cf-entry-content :is(th, td) { border: 1px solid var(--line); padding: 8px; }
.cf-entry-content :is(pre, .wp-block-table) { overflow-x: auto; }
.cf-archive-nav { margin-top: 28px; }
.cf-archive-nav .page-numbers { display: inline-block; padding: 5px 11px; }
.cf-archive-nav .current { color: var(--gold); }
.cf-market-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    list-style: none;
}
.cf-market-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
:is(.cf-pillar, .cf-post-card, .cf-market-list li) {
    transition: border-color .2s ease, box-shadow .2s ease;
}
.cf-pillar, .cf-market-list li { cursor: default; }
.cf-post-card:has(:focus-visible) {
    border-color: var(--gold);
    box-shadow: var(--card-hover-shadow);
}
@media (hover: hover) {
    :is(.cf-pillar, .cf-post-card, .cf-market-list li):hover {
        border-color: var(--gold);
        box-shadow: var(--card-hover-shadow);
    }
}
.cf-market-list li strong, .cf-market-list li div span { display: block; }
.cf-market-list li div span { color: var(--muted); font-size: .87rem; }
.cf-market-symbol { color: var(--gold); font-weight: 700; }
.cf-footer { padding-block: 24px; border-top: 1px solid var(--line); background: var(--black); }
.cf-footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 28px; }
.cf-footer-inner a { color: var(--muted); font-size: .9rem; }
.cf-footer-inner a:hover { color: var(--gold); }
@media (min-width: 981px) {
    .cf-navigation .sub-menu, .cf-navigation .children {
        display: none;
        position: absolute;
        top: 100%;
        inset-inline-end: 0;
        min-width: 180px;
        background: #1c1c1c;
        border: 1px solid var(--line);
        border-radius: 8px;
    }
    .cf-navigation .sub-menu .sub-menu, .cf-navigation .children .children { top: 0; inset-inline-end: 100%; }
    .cf-navigation li:hover > :is(.sub-menu, .children),
    .cf-navigation li:focus-within > :is(.sub-menu, .children) { display: block; }
}
@media (max-width: 980px) {
    :root { --header-height: 70px; }
    .cf-header-inner { flex-wrap: wrap; }
    .cf-header-inner > .cf-navigation { order: 3; width: 100%; }
    .cf-navigation > ul { justify-content: flex-start; }
    .cf-nav-ready .cf-header-inner { flex-wrap: nowrap; }
    .cf-nav-ready .cf-nav-toggle {
        position: relative;
        display: block;
        margin-inline-start: auto;
        flex: 0 0 46px;
        width: 46px;
        height: 46px;
        padding: 0;
        border: 1px solid #ffffff33;
        border-radius: 50%;
        background: #ffffff0d;
        cursor: pointer;
    }
    .cf-nav-toggle span {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 21px;
        height: 2px;
        margin-left: -10.5px;
        border-radius: 2px;
        background: var(--gold);
        transition: transform .34s cubic-bezier(.2,.8,.2,1), opacity .18s ease;
    }
    .cf-nav-toggle span:nth-child(1) { transform: translateY(-7px); }
    .cf-nav-toggle span:nth-child(2) { transform: translateY(-1px); }
    .cf-nav-toggle span:nth-child(3) { transform: translateY(5px); }
    .cf-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(-1px) rotate(45deg); }
    .cf-nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-1px) scaleX(0); opacity: 0; }
    .cf-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-1px) rotate(-45deg); }
    .cf-nav-shade {
        display: block;
        position: fixed;
        z-index: 20;
        inset: 0;
        visibility: hidden;
        opacity: 0;
        background: #05050582;
        backdrop-filter: blur(10px);
        transition: opacity .3s ease, visibility .3s;
    }
    .cf-nav-open .cf-nav-shade { visibility: visible; opacity: 1; }
    .cf-nav-ready .cf-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100dvh - var(--header-height) - var(--wp-admin--admin-bar--height, 0px));
        padding: 8px var(--gutter) 22px;
        overflow-y: auto;
        overscroll-behavior: contain;
        border: 1px solid var(--line);
        border-radius: 0 0 22px 22px;
        background: #181818f7;
        box-shadow: 0 23px 50px #0007;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-14px) scaleY(.97);
        transform-origin: top;
        transition: opacity .28s ease, transform .38s cubic-bezier(.2,.8,.2,1), visibility .38s;
    }
    .cf-nav-open .cf-navigation { visibility: visible; opacity: 1; pointer-events: auto; transform: none; }
    .cf-nav-ready .cf-navigation > ul { display: block; }
    .cf-nav-ready .cf-navigation a { min-height: 48px; border-bottom: 1px solid var(--line); }
    .cf-nav-ready .cf-navigation .sub-menu a, .cf-nav-ready .cf-navigation .children a { color: var(--muted); }
    .cf-nav-ready .cf-navigation .current-menu-item > a { color: var(--gold); }
    .cf-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .cf-brand-img { width: clamp(100px, 30vw, 130px); }
    .cf-header-account { padding-inline: 8px; }
    .cf-header-inner { gap: 8px; }
    .cf-hero-media { width: 100%; opacity: .43; mask-image: linear-gradient(100deg, transparent 0%, #000 78%); }
    .cf-hero h1 { max-width: 13ch; }
    .cf-pillar-list, .cf-post-grid, .cf-market-list { grid-template-columns: minmax(0, 1fr); }
    .cf-pillar { text-align: start; }
    .cf-pillar-icon { margin-inline: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .cf-nav-toggle span, .cf-nav-ready .cf-navigation, .cf-nav-shade,
    .cf-pillar, .cf-post-card, .cf-market-list li { transition: none; }
}
