/* ==========================================================
   Mynouvie shared stylesheet
   Every page links this file. Page-specific CSS goes in a
   <style> block after it. Tokens live here and only here.
   ========================================================== */

/* 1. Fonts */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

/* 2. Tokens */
:root {
    --paper: #F5EFE3;
    --paper-2: #EDE5D4;
    --ink: #17150F;
    --ink-soft: #6B655A;
    --line: #DCD2BE;

    --jaune: #FFCD00;
    --bleu: #003CA6;
    --vert: #007852;
    --rose: #C04191;
    --orange: #F28E42;
    --ciel: #6EC4E8;
    --olive: #9F9825;
    --lilas: #E19BDF;

    --ok: #007852;
    --ok-soft: #E2F1EA;
    --no: #C8102E;
    --no-soft: #F9E3E6;

    /* Neutral default. Yellow is reserved for the primary action,
       so a component only gets an accent colour from an .accent-* class. */
    --accent: var(--ink);

    --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}

/* 3. Reset and base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    background: var(--paper);
    color: var(--ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

/* 4. Paper grain overlay */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* 5. Typography */
.h1,
.h2,
.h3 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    color: var(--ink);
}

.h1 {
    font-weight: 800;
    font-size: clamp(34px, 4.6vw, 54px);
    line-height: 1.0;
    margin-bottom: 14px;
}

.h2 {
    font-weight: 800;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.1;
    margin-bottom: 10px;
}

.h3 {
    font-weight: 600;
    font-size: 19px;
    line-height: 1.25;
    margin-bottom: 6px;
}

.lede {
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-soft);
    max-width: 62ch;
    margin-bottom: 20px;
}

.lede b,
.lede strong {
    color: var(--ink);
    font-weight: 600;
}

/* French artifacts: listings, letters, postings */
.mono {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 13.5px;
    line-height: 1.75;
    background: var(--paper-2);
    padding: 14px 16px;
    border-radius: 8px;
}

span.mono {
    font-size: 0.92em;
    padding: 1px 6px;
    border-radius: 4px;
}

/* 6. Buttons */
.btn,
.btn-ink,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 15px;
    line-height: 1.2;
    padding: 14px 28px;
    border-radius: 100px;
    border: 2px solid var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover,
.btn-ink:hover,
.btn-ghost:hover {
    transform: translateY(-2px);
}

.btn:active,
.btn-ink:active,
.btn-ghost:active {
    transform: translateY(0);
}

/* Primary: the one yellow action on a screen. The only shadow in the system. */
.btn {
    background: var(--jaune);
    color: var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
}

.btn:hover {
    box-shadow: 3px 5px 0 var(--ink);
}

.btn:active {
    box-shadow: 1px 1px 0 var(--ink);
}

/* Secondary */
.btn-ink {
    background: var(--ink);
    color: var(--paper);
}

/* Ghost: same 2px border as the others so all three buttons share one height */
.btn-ghost {
    background: transparent;
    color: var(--ink);
}

.btn:disabled,
.btn-ink:disabled,
.btn-ghost:disabled {
    opacity: 0.4;
    cursor: default;
    transform: none;
}

.btn:disabled {
    box-shadow: 3px 3px 0 var(--ink);
}

/* Quiet underlined text link, for everything that is not a button */
.link-quiet {
    background: none;
    border: none;
    padding: 0;
    font-size: 13.5px;
    color: var(--ink-soft);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.link-quiet:hover {
    color: var(--ink);
}

/* 7. Cards */
.card {
    background: var(--paper-2);
    border: 1.5px solid var(--line);
    border-radius: 8px;
    padding: 22px;
}

/* Guidance: the one option the app marks "Start here", and the muted rest */
.start-here {
    border: 2px solid var(--ink);
}

.start-here-label {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--ink);
    color: var(--paper);
    padding: 2px 8px;
    border-radius: 100px;
    vertical-align: middle;
}

.muted {
    opacity: 0.7;
}

/* 8. Nav and wordmark */
.nav {
    max-width: 1080px;
    margin: 0 auto;
    padding: 18px 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 14px;
    font-weight: 500;
}

.nav-links a {
    text-decoration: none;
}

.nav-links a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Wordmark: plain ink, never yellow. Markup: <a class="wordmark">mynouvie.</a> */
.wordmark {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-decoration: none;
}

/* 9. Page container */
.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 5vw 80px;
    position: relative;
    z-index: 1;
}

/* 10. Accent utilities: set --accent for any component inside */
.accent-jaune  { --accent: var(--jaune); }
.accent-bleu   { --accent: var(--bleu); }
.accent-vert   { --accent: var(--vert); }
.accent-rose   { --accent: var(--rose); }
.accent-orange { --accent: var(--orange); }
.accent-ciel   { --accent: var(--ciel); }
.accent-olive  { --accent: var(--olive); }
.accent-lilas  { --accent: var(--lilas); }

/* Métro roundel, coloured by the current accent */
.roundel {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.roundel::after {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--paper);
}

/* 11. Feedback states: colour only, so they can sit on any element */
.good {
    background: var(--ok-soft);
    border-left: 4px solid var(--ok);
}

.bad {
    background: var(--no-soft);
    border-left: 4px solid var(--no);
}

/* 12. Tags and pills */
.tag {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pill {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 100px;
    border: 1.5px solid var(--ink);
    white-space: nowrap;
}

.pill.done {
    background: var(--ink);
    color: var(--paper);
}

/* 13. Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 40vh;
    color: var(--ink-soft);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.spin {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid var(--line);
    border-top-color: var(--jaune);
    animation: mn-spin 0.8s linear infinite;
}

@keyframes mn-spin {
    to { transform: rotate(360deg); }
}

/* Form fields, shared by signup, reader and career */
.input,
.textarea {
    width: 100%;
    background: var(--paper);
    border: 1.5px solid var(--ink);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
}

.textarea {
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.7;
    min-height: 110px;
    resize: vertical;
}

/* Focus without a shadow: shadows belong to the primary button only */
.input:focus-visible,
.textarea:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* 14. Responsive */
@media (max-width: 720px) {
    .h1 {
        font-size: 28px;
    }

    .wrap {
        padding: 20px 5vw 60px;
    }

    .nav-links {
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition: none !important;
    }

    /* Keep the loading indicator legible as "still working", just slower */
    .spin {
        animation-duration: 2s !important;
        animation-iteration-count: infinite !important;
    }
}
