/* _shared/css/base.css — reset, body, nav, sections, footer, contact form,
   fade-in animation, and base responsive rules shared across all three sites.
   Component-specific styles (hero variants, service cards, pricing tables, etc.)
   live inline in each site's index.php. */

/* --- RESET --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 17px;
}

body {
    font-family: var(--font-sans);
    color: var(--color-ink);
    background-color: var(--color-surface);
    line-height: 1.65;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

/* --- NAV --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 250, 248, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow 0.3s ease;
}

nav.scrolled {
    box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.9rem var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--color-ink);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    list-style: none;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-ink-light);
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.01em;
}

.nav-links a:hover {
    color: var(--color-accent);
}

.nav-cta {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-white) !important;
    background: var(--color-accent);
    padding: 0.45rem 1.1rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.nav-cta:hover {
    background: var(--color-accent-light) !important;
    color: var(--color-white) !important;
}

/* Language switcher (FR | EN) inside the nav */
.nav-lang {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--color-ink-muted);
}

.nav-lang a {
    color: var(--color-ink-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-lang a:hover { color: var(--color-accent); }

.nav-lang-active {
    color: var(--color-ink);
    font-weight: 500;
}

.nav-lang-sep {
    color: var(--color-border);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-ink);
    margin: 5px 0;
    transition: 0.3s;
}

/* --- SECTIONS --- */
section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Headings use sans-serif for a clean Swiss-style typographic rhythm.
   Sites that previously used Instrument Serif for headings will inherit this
   unless they explicitly override. */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
}

.section-label {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

.section-title {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    margin-bottom: var(--space-lg);
    color: var(--color-ink);
    letter-spacing: -0.02em;
}

/* --- CONTACT FORM (shared markup, dexo/specta/synaps wrap it differently) --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-row {
    display: flex;
    gap: var(--space-sm);
}

.form-row > * {
    flex: 1;
}

.contact-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-ink-light);
    margin-bottom: 0.3rem;
    letter-spacing: 0.02em;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-family: var(--font-sans);
    font-size: 0.92rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-white);
    color: var(--color-ink);
    transition: border-color 0.2s;
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-accent);
}

.contact-form textarea {
    resize: vertical;
    min-height: 110px;
}

.form-submit {
    align-self: flex-start;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-white);
    background: var(--color-accent);
    border: none;
    padding: 0.75rem 1.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.form-submit:hover {
    background: var(--color-accent-light);
    transform: translateY(-1px);
}

.form-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

#form-status {
    font-size: 0.9rem;
    margin-top: 0.8rem;
}

/* --- FOOTER --- */
footer {
    border-top: 1px solid var(--color-border);
    padding: var(--space-md);
    text-align: center;
}

footer p {
    font-size: 0.8rem;
    color: var(--color-ink-muted);
    max-width: var(--max-width);
    margin: 0 auto;
    line-height: 1.6;
}

footer a {
    color: var(--color-ink-muted);
    text-decoration: none;
}

footer a:hover {
    color: var(--color-accent);
}

/* --- ANIMATIONS --- */
/* VISIBLE AT REST (Jon, 30 Sept). `.fade-in` used to park content at
 * opacity 0 until an IntersectionObserver added `.visible`, so anything the
 * observer had not reached -- a screenshot, a thumbnail, a crawler, a reader
 * without scripts -- saw a near-empty page below the fold. Content now renders
 * visible and stays put. The class and the observers in site.js and the
 * Specta pages are left in place and are harmless: `.visible` changes nothing. */
.fade-in,
.fade-in.visible {
    opacity: 1;
    transform: none;
}

/* ===========================================================================
   SHARED COMPONENTS — identical across all sites; only the accent colour
   (var(--color-accent*), set per site via body.site-*) changes.
   Site-unique sections live in _shared/css/<site>.css.
   ========================================================================= */

/* --- HERO --- */
.hero { padding-top: calc(var(--space-xl) + 3.5rem); padding-bottom: var(--space-xl); }
.hero-label { display: inline-block; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent); margin-bottom: var(--space-sm); }
.hero h1 { font-family: var(--font-sans); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.15; color: var(--color-ink); margin-bottom: var(--space-md); max-width: 720px; letter-spacing: -0.01em; }
.hero h1 em { font-style: italic; color: var(--color-accent); }
.hero-text { font-size: 1.08rem; color: var(--color-ink-light); max-width: 580px; margin-bottom: var(--space-md); line-height: 1.7; }
.hero-cta { display: inline-block; font-size: 0.92rem; font-weight: 500; color: var(--color-white); background: var(--color-accent); padding: 0.8rem 1.8rem; border-radius: 8px; text-decoration: none; transition: background 0.2s, transform 0.15s; }
.hero-cta:hover { background: var(--color-accent-light); transform: translateY(-1px); }

/* --- PROBLEM --- */
.problem { padding-top: var(--space-lg); padding-bottom: var(--space-xl); }
.problem-inner { background: var(--color-surface-warm); border-radius: 16px; padding: var(--space-lg); border: 1px solid var(--color-border); }
.problem-inner h2 { font-family: var(--font-sans); font-weight: 500; font-size: 1.6rem; margin-bottom: var(--space-md); color: var(--color-ink); }
.problem-inner p { color: var(--color-ink-light); font-size: 1.02rem; line-height: 1.75; }
.problem-inner p + p { margin-top: var(--space-sm); }
.problem-photo { float: right; width: 340px; margin: 0 0 var(--space-md) var(--space-lg); border-radius: 12px; overflow: hidden; }
.problem-photo img { width: 100%; height: auto; display: block; }
.problem-clearfix::after { content: ''; display: table; clear: both; }

/* --- STEP / CARD GRID (services, how-to, layers) --- */
.step-card, .layer-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: 14px; padding: var(--space-md); display: flex; flex-direction: column; }
.step-card h3, .layer-card h3 { font-family: var(--font-sans); font-weight: 400; font-size: 1.3rem; color: var(--color-ink); margin-bottom: 0.6rem; }
.step-card p, .layer-card p { font-size: 0.92rem; color: var(--color-ink-light); line-height: 1.65; }

/* Numbered step markers — identical across services, how-to, layers, approach */
.service-number, .step-num, .step-card .step-num, .layer-card .layer-num {
    font-family: var(--font-sans);
    font-size: 2rem;
    font-weight: 400;
    color: var(--color-accent);
    opacity: 0.45;
    line-height: 1;
    margin-bottom: var(--space-sm);
}

/* --- CONTACT (layout) --- */
.contact { padding-top: var(--space-lg); padding-bottom: var(--space-xl); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); margin-top: var(--space-md); }
.contact-text p { font-size: 1rem; color: var(--color-ink-light); line-height: 1.7; margin-bottom: var(--space-sm); }
.contact-address { margin-top: var(--space-md); padding: var(--space-sm) var(--space-md); background: var(--color-surface-warm); border-radius: 10px; border-left: 3px solid var(--color-accent); font-style: normal; }
.contact-entity { display: block; font-size: 0.72rem; font-weight: 600; color: var(--color-accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem; }
.contact-address p { font-size: 0.95rem; color: var(--color-ink); line-height: 1.55; margin-bottom: 0.5rem; }
.contact-address p:last-child { margin-bottom: 0; }
.contact-address a { color: var(--color-ink); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s, color 0.2s; }
.contact-address a:hover { color: var(--color-accent); border-bottom-color: var(--color-accent); }

/* --- PRICING (synaps + specta) --- */
.pricing { padding-top: var(--space-lg); padding-bottom: var(--space-xl); }
.pricing-base-note { font-size: 0.95rem; color: var(--color-ink-light); line-height: 1.6; margin-bottom: var(--space-md); max-width: 660px; }
.pricing-base-note strong { color: var(--color-accent); font-weight: 600; }

.billing-toggle { display: flex; align-items: center; gap: 0.75rem; margin-bottom: var(--space-lg); flex-wrap: wrap; }
.billing-toggle span { font-size: 0.88rem; color: var(--color-ink-light); font-weight: 500; }
.billing-toggle .toggle-switch { position: relative; display: inline-flex; width: 44px; height: 24px; cursor: pointer; }
.billing-toggle .toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track { position: absolute; inset: 0; background: var(--color-border); border-radius: 12px; transition: background 0.2s; }
.toggle-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: var(--color-white); border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle-switch input:checked ~ .toggle-track { background: var(--color-accent); }
.toggle-switch input:checked ~ .toggle-thumb { transform: translateX(20px); }
.billing-save-badge { font-size: 0.72rem; font-weight: 600; color: var(--color-accent); background: var(--color-accent-bg); padding: 0.2rem 0.55rem; border-radius: 20px; }

.tiers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); margin-bottom: var(--space-lg); }
.tier-card { background: var(--color-white); border: 1.5px solid var(--color-border); border-radius: 14px; padding: var(--space-md); display: flex; flex-direction: column; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; position: relative; }
.tier-card:hover { border-color: var(--color-accent); }
.tier-card.selected { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-bg); }
.tier-popular-badge { position: absolute; top: -1px; left: 50%; transform: translateX(-50%); background: var(--color-accent); color: var(--color-white); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.2rem 0.8rem; border-radius: 0 0 8px 8px; white-space: nowrap; }
.tier-name { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--color-accent); margin-bottom: 0.75rem; margin-top: 0.5rem; }
.tier-price { font-size: 2rem; font-weight: 600; color: var(--color-ink); line-height: 1; margin-bottom: 0.25rem; letter-spacing: -0.03em; }
.tier-price-currency { font-size: 1rem; font-weight: 400; vertical-align: super; margin-right: 2px; }
.tier-price-period { font-size: 0.82rem; color: var(--color-ink-muted); margin-bottom: 0.15rem; }
.tier-price-annual { display: none; }
.tier-desc { font-size: 0.86rem; color: var(--color-ink-light); line-height: 1.55; margin-bottom: var(--space-sm); min-height: 3.9rem; }
.tier-features { list-style: none; margin-bottom: var(--space-sm); flex-grow: 1; }
/* NOT display:flex. With the tick as ::before, every inline child of the item
   becomes its own flex item, so "Export PDF <strong>avec votre logo</strong>"
   laid out as three columns. The tick is positioned instead, which keeps the
   text one inline flow and cannot be undone by the next feature line somebody
   writes with a <strong> or a badge in it. */
.tier-features li { font-size: 0.82rem; color: var(--color-ink-light); padding: 0.28rem 0; border-bottom: 1px solid var(--color-surface-warm); line-height: 1.4; position: relative; padding-left: 1.1rem; }
.tier-features li:last-child { border-bottom: none; }
/* Tier lists are INCLUDE-ONLY: every line is something the tier has, so the
   tick carries no information a screen reader or a crawler needs. There is
   deliberately no .feat-no: a greyed line with a dash reads as "included"
   to anything that cannot see grey (dexo#53). A tier that lacks something
   says so by not listing it, or in prose. */
.tier-features li::before { content: '✓'; color: var(--color-accent); font-size: 0.75rem; font-weight: 600; position: absolute; left: 0; top: 0.34rem; }
/* Monthly and annual are BOTH in the HTML, and CSS decides which is visible
   (dexo#100). They used to be one figure written by JavaScript, so the only
   per-year number a crawler, an assistant or a no-JS reader ever saw was
   monthly x 12 -- a higher figure than the discounted annual price we
   advertise in llms.txt, with no way to reconcile the two.

   :has() on the section rather than a class on <body>: the checkbox is the
   state, so nothing has to keep a class in sync with it, and the toggle now
   works with JavaScript off. A browser without :has() shows the monthly
   figures and the switch does nothing -- the prices stay correct, which is
   the right way for this to degrade. */
.bill-a { display: none; }
.pricing:has(#billing-annual:checked) .bill-m { display: none; }
.pricing:has(#billing-annual:checked) .bill-a { display: inline; }

/* The implementation fee is charged on monthly and annual billing alike, so the fee row never changes colour with the switch (Specta decision 108, Synaps decision 109). */

.tier-impl { margin-top: var(--space-sm); padding-top: var(--space-sm); border-top: 1px dashed var(--color-border); }
.tier-impl-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 0.5rem; }
.tier-impl-label { font-size: 0.8rem; font-weight: 500; color: var(--color-ink); }
.tier-impl-value { font-size: 0.82rem; font-weight: 600; color: var(--color-ink); text-align: right; white-space: nowrap; } /* a fee never splits across lines; a narrow card moves it under its label whole */
.tier-impl-note { font-size: 0.72rem; color: var(--color-ink-muted); margin-top: 0.25rem; line-height: 1.35; }
.tier-impl.included { border-top-color: var(--color-accent); }
.tier-impl.included .tier-impl-label,
.tier-impl.included .tier-impl-value { color: var(--color-accent); }

.ai-badge { display: inline-block; font-size: 0.65rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.15rem 0.45rem; border-radius: 20px; background: var(--color-accent); color: var(--color-white); vertical-align: middle; margin-left: 0.2rem; }

/* --- RESPONSIVE (base rules; per-site overrides live in <site>.css) --- */
@media (max-width: 768px) {
    html { font-size: 16px; }

    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(250, 250, 248, 0.98);
        backdrop-filter: blur(12px);
        padding: var(--space-sm) var(--space-md) var(--space-md);
        border-bottom: 1px solid var(--color-border);
        gap: var(--space-sm);
        align-items: flex-start;
    }
    .nav-toggle { display: block; }

    .form-row {
        flex-direction: column;
    }

    /* Shared component responsive */
    .hero { padding-top: calc(var(--space-lg) + 3.5rem); padding-bottom: var(--space-lg); }
    .problem-inner { padding: var(--space-md); }
    .problem-photo { float: none; width: 100%; margin: 0 0 var(--space-md) 0; }
    .contact-grid { grid-template-columns: 1fr; }
    .tiers-grid { grid-template-columns: 1fr; }
    .billing-toggle { justify-content: center; }
}

.form-consent { font-size: .85rem; color: var(--color-ink-muted); margin-top: .75rem; }
.form-consent a { color: inherit; text-decoration: underline; }
