:root {
  --bg: #f8f7f2;
  --bg-soft: #f2f1eb;
  --paper: #fcfcf8;
  --ink: #191917;
  --ink-2: #41413c;
  --ink-3: #696861;
  --ink-4: #8c8a82;
  --line: #d8d6ce;
  --line-soft: #e7e5de;
  --green: #2f7957;
  --amber: #b17b35;
  --indigo: #65709a;
  --rose: #a44e50;
  --sans: "Geist", "Inter", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

/* Encre manuscrite (lot K6d) : même Caveat vendorisée que la landing (subset latin,
   OFL à côté du woff2) — AUCUN CDN. Le bleu stylo est la voix manuscrite de la marque. */
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url("fonts/caveat-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --hand: "Caveat", "Segoe Script", "Bradley Hand", cursive;
  --ink-hand: oklch(43% 0.11 262);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { margin: 0; background: radial-gradient(circle at 15% 18%, rgba(255,255,255,.72), transparent 28%), var(--bg); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }

.auth-skip { position: fixed; z-index: 20; left: 16px; top: 12px; padding: 9px 12px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 700; transform: translateY(-160%); transition: transform 140ms ease; }
.auth-skip:focus { transform: none; }
.auth-nav { width: min(1180px, calc(100% - 48px)); min-height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line-soft); }
.auth-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; }
.auth-logo img { width: 28px; height: 28px; border-radius: 7px; }
.auth-logo strong, .auth-logo b { font-family: Arial, sans-serif; font-size: 17px; letter-spacing: -.035em; }
.auth-logo b { color: #6e7884; }
.auth-nav-actions { display: flex; align-items: center; gap: 14px; color: var(--ink-3); font-size: 12px; }
.auth-nav-actions > a:hover { color: var(--ink); }
.auth-languages { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-soft); }
.auth-languages button { border: 0; border-radius: 4px; padding: 4px 8px; background: transparent; color: var(--ink-4); font-family: var(--mono); font-size: 10px; }
.auth-languages button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line-soft); }

.auth-shell { width: min(1100px, calc(100% - 48px)); min-height: calc(100vh - 72px); margin: 0 auto; padding: clamp(54px, 8vh, 92px) 0 72px; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(360px, .76fr); align-items: center; gap: clamp(54px, 8vw, 98px); }
.auth-proof { min-width: 0; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--green); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.auth-eyebrow > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(47,121,87,.1); }
.auth-proof h1 { max-width: 650px; margin: 20px 0 18px; font-family: var(--serif); font-size: clamp(43px, 5vw, 64px); line-height: 1.01; letter-spacing: -.036em; text-wrap: balance; }
.auth-proof > p { max-width: 590px; margin: 0; color: var(--ink-3); font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.auth-benefits { display: grid; gap: 9px; margin: 27px 0 34px; padding: 0; list-style: none; }
.auth-benefits li { display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-size: 12.5px; }
.auth-benefits i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: #e5efe8; color: var(--green); font-size: 10px; font-style: normal; font-weight: 800; }

.auth-map { position: relative; width: min(620px, 100%); height: 250px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background:
  linear-gradient(rgba(196, 194, 184, 0.8) 1px, transparent 1px) 0 0 / 120px 120px,
  linear-gradient(90deg, rgba(196, 194, 184, 0.8) 1px, transparent 1px) 0 0 / 120px 120px,
  linear-gradient(rgba(211, 209, 201, 0.85) 1px, transparent 1px) 0 0 / 24px 24px,
  linear-gradient(90deg, rgba(211, 209, 201, 0.85) 1px, transparent 1px) 0 0 / 24px 24px,
  var(--bg-soft); box-shadow: 0 14px 44px rgba(25,25,23,.07); }
.auth-map-bar { position: absolute; z-index: 3; inset: 0 0 auto; height: 36px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--line-soft); background: rgba(252,252,248,.92); color: var(--ink-4); font-family: var(--mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.auth-map-bar span:last-child { color: var(--green); }
.auth-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-map path { fill: none; stroke: var(--indigo); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.auth-map path.amber { stroke: var(--amber); }
.auth-node { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 5px; min-height: 82px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); box-shadow: 0 5px 16px rgba(25,25,23,.06); }
.auth-node::before { content: ""; position: absolute; left: 0; inset-block: 0; width: 3px; border-radius: 7px 0 0 7px; background: var(--indigo); }
.auth-node small { color: var(--ink-4); font-family: var(--mono); font-size: 7px; letter-spacing: .08em; }
.auth-node strong { font-size: 10.5px; }
.auth-node span { color: var(--ink-4); font-size: 8.5px; }
.auth-node.main { left: 6%; top: 88px; width: 29%; }
.auth-node.one { left: 60%; top: 48px; width: 31%; }
.auth-node.two { left: 69%; top: 160px; width: 27%; }
.auth-node.two::before { background: var(--amber); }

.auth-card { width: 100%; max-width: 438px; justify-self: end; padding: 8px 30px 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 2px 4px rgba(25,25,23,.03), 0 24px 70px rgba(25,25,23,.1); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 -22px 28px; padding: 6px; border-bottom: 1px solid var(--line-soft); border-radius: 12px 12px 0 0; background: var(--bg-soft); }
.auth-tabs a { padding: 9px 10px; border-radius: 7px; color: var(--ink-4); font-size: 12.5px; font-weight: 600; text-align: center; }
.auth-tabs a[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(25,25,23,.08), 0 0 0 1px var(--line-soft); }
.auth-card-heading { margin-bottom: 23px; }
.auth-card-kicker { color: var(--green); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.auth-card h2 { margin: 11px 0 7px; font-family: var(--serif); font-size: 30px; line-height: 1.08; letter-spacing: -.025em; }
.auth-card-heading p { margin: 0; color: var(--ink-3); font-size: 13px; line-height: 1.55; }
#auth-form { display: grid; gap: 8px; }
#auth-form label { margin-top: 5px; color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
#auth-form input { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); padding: 0 12px; font-size: 14px; transition: border-color 120ms, box-shadow 120ms; }
#auth-form input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(25,25,23,.06); }
.auth-password-field { position: relative; }
.auth-password-field input { padding-right: 62px !important; }
.auth-password-field button { position: absolute; right: 7px; top: 7px; height: 32px; border: 0; border-radius: 5px; background: var(--bg-soft); color: var(--ink-3); padding: 0 9px; font-size: 10px; }
.auth-password-help { margin: 0 0 4px; color: var(--ink-4); font-size: 10px; }
.auth-submit { min-height: 47px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 7px; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: var(--bg); padding: 0 16px; font-size: 13.5px; font-weight: 700; transition: transform 140ms, background 120ms; }
.auth-submit:hover { background: var(--ink-2); transform: translateY(-1px); }
.auth-submit:disabled { cursor: wait; opacity: .65; transform: none; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 4px 0 0; color: var(--ink-4); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.auth-divider[hidden] { display: none; }
.auth-google { min-height: 47px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); padding: 0 16px; font-size: 13px; font-weight: 600; transition: border-color 120ms, background 120ms; }
.auth-google:hover { border-color: var(--ink-4); background: var(--bg-soft); }
.auth-google:disabled { cursor: wait; opacity: .65; }
.auth-google[hidden] { display: none; }
.auth-status { margin: 2px 0 0; color: var(--rose); font-size: 11px; line-height: 1.45; }
.auth-status[hidden] { display: none; }
.auth-switch { margin: 19px 0 0; color: var(--ink-4); font-size: 11.5px; text-align: center; }
.auth-switch a { color: var(--ink); font-weight: 700; border-bottom: 1px solid var(--line); }
.auth-environment { margin: 22px 0 -10px; padding: 10px 11px; border: 1px dashed var(--line); border-radius: 7px; color: var(--ink-4); font-size: 9.5px; line-height: 1.45; }
.auth-environment > span:first-child { display: block; margin-bottom: 2px; color: var(--ink-3); font-family: var(--mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
html.auth-configured .auth-environment { display: none; }
.auth-success { padding: 34px 4px 10px; text-align: center; }
.auth-success[hidden] { display: none; }
.auth-success-icon { width: 42px; height: 42px; display: grid; place-items: center; margin: 0 auto 15px; border: 1px solid #c6daca; border-radius: 50%; background: #eaf2eb; color: var(--green); font-weight: 800; }
.auth-success p { color: var(--ink-3); font-size: 12.5px; line-height: 1.6; }
.auth-success .auth-submit { margin-top: 22px; }

/* Marque manuscrite AU-DESSUS de la carte d'auth (verdict Réda K6d, 2ᵉ passe : « mets-le
   au-dessus, complètement visible, encre bleu foncé ») : « BlankSlot » Caveat, encre
   pleine, double souligné, ancré au bord HAUT de la carte — visible à toutes les largeurs. */
.auth-card { position: relative; }
.auth-hand-brand {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  font-family: var(--hand);
  font-weight: 600;
  font-size: 56px;
  line-height: 1;
  color: var(--ink-hand);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.auth-hand-brand svg { display: block; width: 90%; height: 14px; margin: -3px auto 0; overflow: visible; }
.auth-hand-brand path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: minmax(0, 620px); justify-content: center; padding-top: 48px; }
  /* Colonne unique : le mot manuscrit garde SA place au-dessus de la carte (sans cette
     marge il recouvrait la dernière ligne des bénéfices). */
  .auth-card { margin-top: 74px; }
  .auth-proof { text-align: center; }
  .auth-proof > p { margin-inline: auto; }
  .auth-benefits { width: fit-content; margin-inline: auto; text-align: left; }
  .auth-map { margin-inline: auto; }
  .auth-card { justify-self: center; }
}

@media (max-width: 600px) {
  .auth-nav { width: calc(100% - 28px); min-height: 62px; }
  .auth-nav-actions > a { display: none; }
  .auth-shell { width: 100%; padding: 36px 14px 42px; gap: 34px; }
  .auth-proof { padding-inline: 7px; }
  .auth-proof h1 { font-size: clamp(38px, 12vw, 50px); }
  .auth-proof > p { font-size: 15px; }
  .auth-map { display: none; }
  .auth-benefits { margin-bottom: 0; }
  .auth-card { padding-inline: 22px; border-radius: 13px; margin-top: 60px; }
  .auth-hand-brand { font-size: 44px; }
  .auth-tabs { margin-inline: -16px; }
}

@media (pointer: coarse) {
  /* Cibles tactiles ≥ ~44px sur écran tactile, sans changer le rendu pointeur fin. */
  .auth-languages button { min-width: 44px; min-height: 44px; padding: 0 12px; }
  #password-toggle { top: 1px; height: 44px; padding: 0 12px; }
  .auth-switch { padding: 6px 0; }
  .auth-switch a { display: inline-block; padding: 14px 6px; margin: -14px -6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
