/* Emploi legal pages — shared stylesheet */

:root {
    --brand: #F95B04;
    --brand-dark: #BB4403;
    --text: #1a1a1a;
    --text-muted: #555;
    --text-light: #777;
    --bg: #ffffff;
    --bg-alt: #fafafa;
    --border: #e5e5e5;
    --link: #F95B04;
    --max-w: 780px;
}

* { box-sizing: border-box; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
}

/* Header */

/* Ink, not brand orange — the landing masthead's own background. The drawn
   wordmark carries its own two colours, and the top of the E is the same
   orange as the brand field: on an orange bar it disappears and only the cyan
   half reads. Since these pages now set that same wordmark, they need the
   same ground under it. Values are landing.css's --ink and --bone, copied
   rather than imported because the legal pages do not load landing.css. */
header.site-header {
    background: #0E0906;
    color: #F5EFEA;
    padding: 20px 24px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

header.site-header .inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* The mark is attached here rather than in the markup on purpose.
   terms.html, privacy.html and deletion.html are byte-pinned — their sha256 is
   asserted by tests/byte-identity.test.mjs — so the logo reaches all four legal
   pages through the stylesheet they already share, and not one byte of those
   documents changes. All four carry the same `<a class="logo">Emploi</a>`.

   That anchor's text is the accessible name and stays in the tree; font-size:0
   collapses it visually so the drawn wordmark — the same
   /assets/emploi-wordmark.svg the landing masthead sets, at the same
   clamp(76px, 8vw, 92px) width — is what is seen. `img-src 'self'` covers it,
   since a CSS background is governed by img-src and this one is same-origin.
   Height is the artwork's 838.7 × 406 aspect at that width, floored at the
   44px tap target. */
header.site-header a.logo {
    display: block;
    width: clamp(76px, 8vw, 92px);
    min-height: 44px;
    aspect-ratio: 838.7 / 406;
    flex: none;
    background: url('/assets/emploi-wordmark.svg') left center / contain no-repeat;
    color: transparent;
    font-size: 0;
    text-decoration: none;
}

header.site-header nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #F5EFEA;
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    opacity: 0.82;
    font-weight: 500;
}

header.site-header nav a:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Main */

main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 40px 24px 80px;
}

h1 {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 40px 0 12px;
    letter-spacing: -0.3px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 24px 0 8px;
}

p {
    margin: 0 0 14px;
    color: var(--text);
}

ul, ol {
    margin: 0 0 14px;
    padding-left: 24px;
}

li {
    margin-bottom: 6px;
}

a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--brand-dark);
}

strong {
    font-weight: 700;
}

/* Document meta block */

.doc-meta {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0 32px;
    font-size: 14px;
    color: var(--text-muted);
}

.doc-meta p {
    margin: 4px 0;
}

.doc-meta strong {
    color: var(--text);
}

/* Tables */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 14.5px;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

th, td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    /* Long unbroken tokens in these cells — package ids, email addresses,
       statute names — otherwise set the column's min-content width and push
       the table past the viewport. */
    overflow-wrap: break-word;
}

th {
    background: var(--bg-alt);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
}

tr:last-child td {
    border-bottom: none;
}

/* Privacy carries seven multi-column tables whose min-content width is ~428px.
   On a 375px phone that made the *document* scroll sideways, which is why the
   sticky header — only ever viewport-wide — left a white band on the right.
   The tables must not be narrower than they are readable, so give the scroll
   to the table instead of to the page.

   `display: block` is how a table becomes its own scroll container without a
   wrapper element: the byte-pinned documents cannot be given one. Its rows are
   re-wrapped in an anonymous table box that keeps the real column layout.
   `overflow: hidden` above (there only to clip the corner radius) would
   swallow the scroll, so it is replaced rather than added to. */
@media (max-width: 760px) {
    table {
        display: block;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* Footer */

footer.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    text-align: center;
    color: var(--text-light);
    font-size: 13.5px;
    background: var(--bg-alt);
}

footer.site-footer a {
    color: var(--text-muted);
    margin: 0 8px;
    text-decoration: none;
}

footer.site-footer a:hover {
    color: var(--brand);
    text-decoration: underline;
}

/* Landing page */

.landing main {
    padding-top: 60px;
    padding-bottom: 60px;
    text-align: center;
}

.landing h1 {
    font-size: 48px;
    margin-bottom: 16px;
}

.landing .tagline {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 48px;
}

.doc-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

@media (max-width: 768px) {
    .doc-cards { grid-template-columns: 1fr; max-width: 480px; }
    .landing h1 { font-size: 36px; }
    h1 { font-size: 28px; }
}

.doc-card {
    display: block;
    padding: 28px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.12);
    border-color: var(--brand);
}

.doc-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: var(--brand);
}

.doc-card p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

/* Legal-doc emphasis block (callouts) */

.callout {
    background: #fff8f4;
    border-left: 4px solid var(--brand);
    padding: 14px 18px;
    margin: 20px 0;
    border-radius: 0 6px 6px 0;
    font-size: 14.5px;
}

.callout p:last-child { margin-bottom: 0; }

/* Print */

@media print {
    header.site-header, footer.site-footer { display: none; }
    main { max-width: 100%; padding: 20px; }
    a { color: #000; text-decoration: none; }
}

/* Deletion Page Styles */
.deletion-container {
    margin-top: 20px;
}

.deletion-intro {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

.deletion-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .deletion-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.deletion-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}

.deletion-card h2 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 16px;
    border-top: none;
    padding-top: 0;
    color: var(--text);
}

/* Steps list for Option 1 */
.step-list {
    list-style: none;
    padding-left: 0;
    margin: 20px 0 0 0;
}

.step-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.step-list li:last-child {
    margin-bottom: 0;
}

.step-badge {
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 14px;
    margin-top: 2px;
}

.step-text {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
}

.step-text strong {
    color: var(--text);
}

/* Form Styles for Option 2 */
.deletion-form {
    margin-top: 16px;
}

.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group .required {
    color: #e03131;
}

.form-control, 
.deletion-form input[type="text"], 
.deletion-form input[type="email"], 
.deletion-form input[type="tel"], 
.deletion-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.deletion-form input[type="text"]:focus, 
.deletion-form input[type="email"]:focus, 
.deletion-form input[type="tel"]:focus, 
.deletion-form select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.form-help {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    margin-top: 22px;
    margin-bottom: 22px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
    margin-top: 3px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label {
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--text-muted);
    font-weight: normal !important;
    cursor: pointer;
    user-select: none;
}

.btn-submit {
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    text-align: center;
    width: 100%;
}

.btn-submit:hover {
    background: var(--brand-dark);
}

.btn-submit:active {
    transform: scale(0.98);
}

/* Email Panel (Success state) */
.email-panel {
    margin-top: 24px;
    border: 1px dashed var(--brand);
    background: #fff8f4;
    border-radius: 8px;
    padding: 20px;
    animation: fadeInSlide 0.3s ease forwards;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.email-panel.hidden {
    display: none;
}

.panel-header h4 {
    margin: 0 0 6px;
    color: var(--brand-dark);
    font-size: 16px;
    font-weight: 700;
}

.panel-header p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.4;
}

.email-details {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px;
    font-size: 13.5px;
    margin-bottom: 16px;
}

.email-details p {
    margin: 4px 0;
    color: var(--text-muted);
}

.email-details strong {
    color: var(--text);
}

.email-body-preview {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-all;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    color: #333;
    font-size: 12px;
    line-height: 1.4;
    max-height: 150px;
    overflow-y: auto;
}

.panel-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

@media (max-width: 480px) {
    .panel-actions {
        flex-direction: column;
    }
}

.btn-send-email {
    flex: 1;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    transition: background 0.15s ease;
}

.btn-send-email:hover {
    background: var(--brand-dark);
    color: #fff;
}

.btn-copy {
    flex: 1;
    background: #fff;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-copy:hover {
    background: #f8f9fa;
    border-color: #ccc;
    color: var(--text);
}

.verification-note {
    font-size: 11.5px;
    color: var(--text-light);
    margin: 0;
    text-align: center;
}

.deletion-policy-info {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    padding-top: 30px;
}

.deletion-policy-info h2 {
    border-top: none;
    padding-top: 0;
    font-size: 20px;
    margin-bottom: 16px;
}

.deletion-policy-info ul {
    padding-left: 20px;
}

.deletion-policy-info li {
    font-size: 14.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.deletion-policy-info strong {
    color: var(--text);
}

/* ── Landing page ───────────────────────────────────────────────────────── */

.landing-main {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.hero {
    padding: 72px 0 56px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(32px, 6vw, 52px);
    line-height: 1.1;
    letter-spacing: -1px;
    margin: 0 0 16px;
}

.hero p.lede {
    font-size: clamp(17px, 2.4vw, 21px);
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
}

.beta-badge {
    display: inline-block;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.section {
    padding: 48px 0;
    border-top: 1px solid var(--border);
}

.section h2 {
    font-size: 26px;
    margin: 0 0 8px;
}

.section > p.section-lede {
    color: var(--text-muted);
    margin: 0 0 32px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
}

.steps li {
    counter-increment: step;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.steps li::before {
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 14px;
}

.steps li h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.steps li p {
    margin: 0;
    font-size: 15px;
    color: var(--text-muted);
}

.trust-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.trust-list li {
    padding-left: 28px;
    position: relative;
    color: var(--text-muted);
    font-size: 15px;
}

.trust-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--brand);
    font-weight: 700;
}

.beta-panel {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    padding: 24px 28px;
}

.beta-panel h2 { margin-top: 0; }
.beta-panel p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
    .hero { padding: 48px 0 36px; }
    .section { padding: 36px 0; }
}

/* Spacing that used to live in a style="" attribute on the landing page. The
   legal CSP is style-src 'self' with no unsafe-inline, so inline style
   attributes are refused — keep landing-page spacing in classes. */
.section-note {
    margin-top: 24px;
}
