/*
 * Le Petit Quiz — Vistal-aligned flourish layer.
 *
 * theme.json carries colors/typography/spacing tokens. This file adds the
 * Vistal touches that aren't expressible in theme.json:
 *   - Pill button with circular arrow indicator
 *   - Footer giant wordmark "Vistal-style"
 *   - Section accents (■ bullet, yellow highlight inline)
 *   - Card surface treatment
 */

:root {
    --vistal-radius-card: 0.75rem;
    --vistal-radius-pill: 9999px;
    --vistal-shadow-card: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
    --vistal-yellow: var(--wp--preset--color--accent, #EDDC54);
    --vistal-black: var(--wp--preset--color--primary, #000);
    --vistal-grey-bg: var(--wp--preset--color--surface-2, #F2F2F2);
    --vistal-border: var(--wp--preset--color--border, #E5E5E5);
}

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

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--wp--preset--color--surface, #fff);
    color: var(--wp--preset--color--foreground, #0A0A0A);
    letter-spacing: -0.01em;
}

/* Headings — Vistal scale */
h1, .h1, .wp-block-post-title { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; }
h2, .h2 { font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }
h3, .h3 { font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -0.03em; font-weight: 700; }
h4, .h4 { font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.25; letter-spacing: -0.03em; font-weight: 600; }
h5, .h5 { font-size: clamp(1.25rem, 2.5vw, 2.25rem); line-height: 1.3; letter-spacing: -0.03em; font-weight: 600; }
h6, .h6 { font-size: 1.5rem; line-height: 1.35; letter-spacing: -0.03em; font-weight: 600; }

/* Inline yellow highlight (use <em class="hl"> for "tailored" / "consultation" style highlights) */
em.hl, .hl { font-style: normal; color: var(--vistal-yellow); }

/* Eyebrow with ■ bullet (use <span class="eyebrow">SERVICES</span>) */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wp--preset--color--foreground);
}
.eyebrow::before {
    content: "";
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    background: currentColor;
}

/* Pill buttons (Vistal-style) */
.wp-block-button__link,
.wp-element-button,
button.btn,
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--vistal-radius-pill);
    background: var(--vistal-black);
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    border: none;
    transition: transform 0.08s ease, background-color 0.15s ease, color 0.15s ease;
}
.wp-block-button__link:hover,
.wp-element-button:hover,
button.btn:hover,
.btn:hover {
    background: var(--vistal-yellow);
    color: var(--vistal-black);
}
.section-dark .wp-block-button__link:hover,
.section-dark .wp-element-button:hover,
.section-dark button.btn:hover,
.section-dark .btn:hover {
    color: var(--vistal-black);
}

/* "Get Started" pill with circular arrow */
.btn-arrow {
    padding-right: 0.375rem;
}
.btn-arrow::after {
    content: "→";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #fff;
    color: var(--vistal-black);
    font-size: 1rem;
    margin-left: 0.25rem;
}

/* Card surface */
.vistal-card,
.wp-block-post {
    background: #fff;
    border-radius: var(--vistal-radius-card);
    overflow: hidden;
}
.vistal-card-padded { padding: 1.5rem; }

/* Alternating section backgrounds */
.section-grey { background: var(--vistal-grey-bg); }
.section-dark { background: #000; color: #fff; }
.section-dark a { color: #fff; }
.section-dark a:hover { color: var(--vistal-yellow); }
.section-yellow { background: var(--vistal-yellow); color: var(--vistal-black); }

/* FIX 8 — © in site title is set via WP blogname option ("Le Petit Quiz ©") */

/* Footer giant wordmark — removed in FIX 9 */
.footer-wordmark {
    display: none !important;
    background: var(--vistal-black);
    overflow: hidden;
    line-height: 0.8;
    padding: 1rem 0 0;
    text-align: center;
}
.footer-wordmark span {
    display: inline-block;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    color: var(--vistal-yellow);
    font-size: clamp(8rem, 30vw, 24rem);
    letter-spacing: -0.05em;
    line-height: 0.85;
}
.footer-wordmark sup {
    font-size: 0.25em;
    vertical-align: super;
    margin-left: -0.15em;
}

/* Site header — Vistal feel */
.ct-header-wrap {
    background: #fff;
}
.ct-header-wrap [data-id="menu"] ul li a {
    font-weight: 500;
    letter-spacing: -0.01em;
}
.ct-header-wrap [data-id="menu"] ul li a::before {
    content: "■";
    margin-right: 0.4rem;
    font-size: 0.5em;
    vertical-align: middle;
    color: var(--vistal-black);
}

/* Quiz block overrides for Vistal palette */
.ot-quiz__wrap {
    border: 1px solid var(--vistal-border);
    box-shadow: var(--vistal-shadow-card);
    border-radius: var(--vistal-radius-card);
}
.ot-quiz__btn--primary { background: var(--vistal-black); color: #fff; }
.ot-quiz__btn--primary:hover { background: var(--vistal-yellow); color: var(--vistal-black); }
.ot-quiz__btn--secondary { background: #fff; color: var(--vistal-black); border: 1px solid var(--vistal-black); }
.ot-quiz__bar-fill { background: var(--vistal-yellow); }
.ot-quiz__pct { color: var(--vistal-black); }

/* Form inputs — pill style to match buttons */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
textarea {
    border-radius: var(--vistal-radius-pill);
    border: 1px solid var(--vistal-border);
    padding: 0.875rem 1.25rem;
    font-family: inherit;
    font-size: 1rem;
}
textarea {
    border-radius: 1.25rem;
    min-height: 8rem;
}

/* Selection */
::selection { background: var(--vistal-yellow); color: var(--vistal-black); }

/* ============================================================
   CUSTOM FOOTER (Phase 6.5)
   ============================================================ */

/* Hide Blocksy's default footer — replaced by ot-footer via hook */
.ct-footer { display: none !important; }

.ot-footer {
    padding: 4rem 0 3rem;
}
.ot-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.ot-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}
.ot-footer__logo {
    font-size: 1.25rem;
    display: block;
    margin-bottom: 0.75rem;
    color: #fff;
    font-weight: 700;
}
.ot-footer__tagline {
    color: #bbb;
    max-width: 32ch;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
}
.ot-footer__heading {
    font-size: 0.75rem !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: #fff !important;
    margin: 0 0 1rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}
.ot-footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}
.ot-footer__list a {
    color: #bbb;
    text-decoration: none;
    font-size: 0.9375rem;
}
.ot-footer__list a:hover { color: var(--vistal-yellow); }
.ot-footer__contact {
    color: #bbb;
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    line-height: 1.7;
}
.ot-footer__contact a { color: #bbb; }
.ot-footer__contact a:hover { color: var(--vistal-yellow); }
.ot-footer__copy {
    color: #666;
    font-size: 0.8125rem;
    margin: 0;
}

/* ============================================================
   HOMEPAGE + PAGE SECTION LAYOUTS (Phase 6.5)
   ============================================================ */

/* Reusable responsive grid classes */
.ot-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.ot-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.ot-grid-2 {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 4rem;
}
.ot-hero__grid {
    display: grid;
    grid-template-columns: 6fr 5fr;
    gap: 3rem;
    align-items: center;
}

/* Section containers */
.ot-section-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.ot-section-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.ot-section-medium {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Quiz card (used on homepage + archive) */
.ot-card {
    background: #fff;
    border-radius: var(--vistal-radius-card);
    border: 1px solid var(--vistal-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ot-card__img {
    aspect-ratio: 4 / 3;
    background: var(--vistal-grey-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #aaa;
    overflow: hidden;
}
.ot-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ot-card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.ot-card__cat {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--vistal-yellow);
    background: #000;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.ot-card__date { color: #aaa; font-size: 0.8125rem; margin: 0 0 0.4rem; }
.ot-card__title { font-size: 1.0625rem; margin: 0 0 auto; line-height: 1.35; font-weight: 600; }
.ot-card__title a { color: inherit; text-decoration: none; }
.ot-card__title a:hover { color: var(--vistal-yellow); }
.ot-card__play { margin-top: 1rem; font-size: 0.9375rem; font-weight: 600; color: #000; text-decoration: none; }
.ot-card__play:hover { color: var(--vistal-yellow); }

/* Dark-bg category card */
.ot-cat-card {
    background: #111;
    border-radius: var(--vistal-radius-card);
    border: 1px solid #222;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color 0.15s;
}
.ot-cat-card:hover { border-color: var(--vistal-yellow); }
.ot-cat-card__img {
    aspect-ratio: 4 / 3;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #555;
    overflow: hidden;
}
.ot-cat-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ot-cat-card__body { padding: 1.5rem; }
.ot-cat-card__title { color: #fff; margin: 0 0 0.5rem; font-size: 1.25rem; }
.ot-cat-card__desc { color: #999; margin: 0 0 1rem; font-size: 0.9375rem; line-height: 1.5; }
.ot-cat-card__link { color: var(--vistal-yellow); font-weight: 600; font-size: 0.9375rem; }

/* Step card (How it works) */
.ot-step-card {
    background: #fff;
    border-radius: var(--vistal-radius-card);
    padding: 2rem;
    box-shadow: var(--vistal-shadow-card);
}
.ot-step-num {
    font-size: 3rem;
    font-weight: 800;
    color: var(--vistal-yellow);
    line-height: 1;
    margin-bottom: 1rem;
}
.ot-step-title { font-size: 1.375rem; margin: 0 0 0.75rem; }
.ot-step-desc { color: #555; line-height: 1.6; margin: 0; }

/* FAQ / details styling */
.ot-faq-item {
    border-bottom: 1px solid var(--vistal-border);
    padding: 1.25rem 0;
}
.ot-faq-item:last-child { border-bottom: none; }
.ot-faq-item summary {
    font-weight: 600;
    font-size: 1.0625rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.ot-faq-item summary::-webkit-details-marker { display: none; }
.ot-faq-item summary::after { content: "+"; font-size: 1.375rem; flex-shrink: 0; }
.ot-faq-item[open] summary::after { content: "−"; }
.ot-faq-item p { margin: 1rem 0 0; color: #555; line-height: 1.6; }

/* Article single header treatment */
.ot-article-header { padding: 1.5rem 0; }
.ot-article-header nav { font-size: 0.875rem; color: #aaa; margin-bottom: 1rem; }
.ot-article-header nav a { color: #aaa; text-decoration: none; }
.ot-article-header nav a:hover { color: #000; }
.ot-article-meta { color: #aaa; font-size: 0.875rem; margin: 0.5rem 0 0; }

/* Article end CTA */
.ot-article-cta {
    margin-top: 3rem;
    border-radius: var(--vistal-radius-card);
    padding: 2.5rem 2rem;
    text-align: center;
}
.ot-article-cta__title { font-size: 1.125rem; font-weight: 600; margin: 0 0 0.5rem; }
.ot-article-cta__sub { color: #555; margin: 0 0 1.5rem; }
.ot-article-cta__links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Outline button variant */
.btn-outline {
    background: transparent !important;
    color: #000 !important;
    border: 1.5px solid #000 !important;
}
.btn-outline:hover { background: #000 !important; color: #fff !important; }

/* ============================================================
   MOBILE / TABLET RESPONSIVE (Phase 6.5)
   ============================================================ */

@media (max-width: 1023px) {
    .ot-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .ot-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 767px) {
    .ot-grid-4,
    .ot-grid-3,
    .ot-grid-2,
    .ot-hero__grid { grid-template-columns: 1fr; }

    .ot-footer__grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .ot-footer { padding: 3rem 0 2rem; }

    .ot-hero__grid > div:last-child { display: none; } /* hide hero image placeholder on mobile */
}


/* ============================================================
   ARTICLE BYLINE — hide author meta
   ============================================================ */
.entry-meta .meta-author,
[data-prefix="single_blog_post"] .meta-author,
.ct-meta-element-author { display: none !important; }

/* ============================================================
   DEFAULT PAGE/POST TITLE — hide Blocksy's auto-injected hero band
   Our FSE templates + post template render their own custom hero
   and article H1, so this default block duplicates and breaks layout.
   ============================================================ */
.hero-section,
.entry-header > .page-title,
header.entry-header { display: none !important; }

/* ============================================================
   SINGLE POST FEATURED IMAGE — inserted via the_content filter
   Place at top of the article, full width, rounded corners.
   ============================================================ */
.ot-single-featured-wrap {
    margin: 0 0 2rem 0;
    overflow: hidden;
    border-radius: 1rem;
}
.ot-single-featured-wrap .ot-single-featured {
    display: block;
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
}
@media (max-width: 689.98px) {
    .ot-single-featured-wrap { border-radius: 0.5rem; margin-bottom: 1.5rem; }
    .ot-single-featured-wrap .ot-single-featured { max-height: 280px; }
}

/* ============================================================
   CONTACT PAGE — two-column grid (FIX 4+5)
   ============================================================ */
.ot-contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}
@media (max-width: 767px) {
    .ot-contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ============================================================
   BLOG ARCHIVE — force 2-column grid (FIX 3)
   Blocksy compiles its grid CSS into a cached inline style.
   Override here with higher specificity to enforce 2 columns.
   ============================================================ */
html [data-prefix="blog"] .entries,
html [data-prefix="categories"] .entries {
    --grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ============================================================
   BLOG ARCHIVE CARDS — tighten title size + line-height
   Blocksy default = 20px/700/1.3 which is chunky for 2-3-line French titles
   in a 3-column grid. Drop to 17px desktop, 16px tablet, 15px mobile.
   ============================================================ */
[data-prefix="blog"] .entry-card .entry-title,
[data-prefix="categories"] .entry-card .entry-title,
[data-prefix="author"] .entry-card .entry-title,
[data-prefix="search"] .entry-card .entry-title {
    --theme-font-size: 17px;
    --theme-line-height: 1.25;
    --theme-font-weight: 600;
}
@media (max-width: 999.98px) {
    [data-prefix="blog"] .entry-card .entry-title,
    [data-prefix="categories"] .entry-card .entry-title,
    [data-prefix="author"] .entry-card .entry-title,
    [data-prefix="search"] .entry-card .entry-title { --theme-font-size: 16px; }
}
@media (max-width: 689.98px) {
    [data-prefix="blog"] .entry-card .entry-title,
    [data-prefix="categories"] .entry-card .entry-title,
    [data-prefix="author"] .entry-card .entry-title,
    [data-prefix="search"] .entry-card .entry-title { --theme-font-size: 15px; }
}
