/* -------------------------------------------------------------------------
   Envol — design tokens (see ressources/design maquettes)
   ------------------------------------------------------------------------- */
:root {
    color-scheme: light;

    --rouge: #E2001A;
    --rouge-sombre: #B00014;
    --encre: #211D1D;
    --encre-douce: #6B6462;
    --blanc: #FFFFFF;
    --lin: #F1F0EE;
    --vert: #1E7A46;

    --font-display: 'Archivo', 'Arial Black', sans-serif;
    --font-body: 'Public Sans', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--blanc);
    color: var(--encre);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
}

a { color: var(--rouge); }
a:hover { color: var(--rouge-sombre); }

h1, h2, h3 {
    font-family: var(--font-display);
    font-stretch: 120%;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .01em;
    line-height: 1.1;
    margin: 0 0 .5rem;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.25rem; }

.mono { font-family: var(--font-mono); font-size: .9375rem; }
.muted { color: var(--encre-douce); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------------------
   Fil rouge : couture pointillée verticale, brodée d'une croix par étape
   ------------------------------------------------------------------------- */
.fil-rouge {
    position: relative;
    padding-left: 2rem;
}
.fil-rouge::before {
    content: '';
    position: absolute;
    left: .5rem;
    top: 0;
    bottom: 0;
    border-left: 2px dashed var(--rouge);
}
.fil-rouge .croix {
    position: absolute;
    left: .5rem;
    transform: translateX(-50%);
    width: 1.25rem;
    height: 1.25rem;
    background: var(--blanc);
    color: var(--rouge);
    font-weight: 800;
    line-height: 1.25rem;
    text-align: center;
}

/* -------------------------------------------------------------------------
   Buttons, forms, tables, flashes
   ------------------------------------------------------------------------- */
.btn {
    font: inherit;
    font-weight: 600;
    padding: .5rem 1rem;
    border-radius: 2px;
    border: 2px solid var(--rouge);
    cursor: pointer;
}
.btn-primary { background: var(--rouge); color: var(--blanc); }
.btn-primary:hover { background: var(--rouge-sombre); border-color: var(--rouge-sombre); }
.btn-ghost { background: transparent; color: var(--rouge); }
.btn-ghost:hover { background: var(--lin); }

input[type="email"], input[type="text"] {
    font: inherit;
    padding: .5rem .75rem;
    border: 1px solid transparent;
    border-radius: 2px;
    background: var(--lin);
    min-width: 18rem;
}
input:focus { outline: 2px solid var(--rouge); outline-offset: 1px; }

.inline-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.table th, .table td { text-align: left; padding: .625rem .5rem; border-bottom: 1px solid var(--lin); }
.table th { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--encre-douce); font-weight: 500; }

.flash { padding: .75rem 1rem; border-left: 3px solid var(--vert); background: var(--lin); margin: 1rem 0; }
.flash-error { border-left-color: var(--rouge); }

.empty { padding: 2rem; text-align: center; color: var(--encre-douce); background: var(--lin); }

/* -------------------------------------------------------------------------
   Sandbox
   ------------------------------------------------------------------------- */
.sandbox { max-width: 64rem; margin: 0 auto; padding: 1.5rem; }
.sandbox-header { display: flex; align-items: baseline; gap: 1rem; border-bottom: 2px solid var(--rouge); padding-bottom: .75rem; margin-bottom: 1.5rem; }
.sandbox-brand { font-family: var(--font-display); font-stretch: 120%; font-weight: 800; text-transform: uppercase; font-size: 1.25rem; text-decoration: none; color: var(--rouge); }
.sandbox-tag { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--encre-douce); }
.sandbox-nav { margin-left: auto; display: flex; gap: 1rem; }
.sandbox-actions { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0; }

.email { border: 1px solid var(--lin); border-top: 3px solid var(--rouge); margin: 1.5rem 0; }
.email-header { padding: 1rem 1rem .5rem; }
.email-header h2 { text-transform: none; font-family: var(--font-body); font-weight: 600; font-size: 1.125rem; }
.email-body { display: block; width: 100%; height: 28rem; border: 0; border-top: 1px solid var(--lin); background: var(--blanc); }
.email-text { margin: 0; padding: 1rem; border-top: 1px solid var(--lin); white-space: pre-wrap; font-family: var(--font-mono); font-size: .9375rem; }
.email-attachments { margin: 0; padding: .75rem 1rem; border-top: 1px solid var(--lin); list-style: none; }

/* -------------------------------------------------------------------------
   Home
   ------------------------------------------------------------------------- */
.home { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.home-card { max-width: 32rem; }
.home-card h1 { font-size: clamp(3rem, 12vw, 5rem); color: var(--rouge); }
.home-card .lead { font-size: 1.125rem; }
.home-meta { margin-top: 2rem; font-family: var(--font-mono); font-size: .8125rem; color: var(--encre-douce); }
.home-meta dt { display: inline; }
.home-meta dd { display: inline; margin: 0 0 0 .25rem; color: var(--encre); }
.home-meta div { margin-bottom: .25rem; }
.status-ok { color: var(--vert); font-weight: 600; }
