/* Teechy v2 — système de design issu du prototype Claude Design. */

:root {
  --bg: #EDEBE6;
  --surface: #FFFDFA;
  --surface-2: #FBFAF7;
  --chip: #F3F1EC;
  --ink: #1A1815;
  --ink-soft: #57534C;
  --muted: #8A857C;
  --faint: #A7A199;
  --line: #E2DED6;
  --line-soft: #F1EEE9;
  --green: #3F6B54;
  --green-bg: #E6EFE8;
  --orange: #C2622F;
  --accent: #2F2FFA;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

h1, h2, h3, .brand { font-family: "Outfit", system-ui, sans-serif; letter-spacing: -0.02em; }
h1 { font-size: 30px; font-weight: 600; line-height: 1.1; margin: 0 0 8px; }
h2 { font-size: 20px; font-weight: 600; margin: 0 0 10px; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
p { margin: 0 0 12px; }
a { color: inherit; }

input, textarea, select, button { font-family: inherit; font-size: 14.5px; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=time], input[type=number], textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 13px;
  background: #fff;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { resize: vertical; min-height: 90px; }
label, .label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.hint { font-size: 12.5px; color: var(--muted); }
.field { margin-bottom: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 11px;
  padding: 11px 18px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
}
.btn:hover { opacity: .92; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.btn-subtle { background: var(--chip); color: var(--ink-soft); }
.btn-danger { background: transparent; color: var(--orange); border: 1px solid var(--line); }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: 13px; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: default; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.card-flat { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px 16px; }

.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 10px;
}
.badge-accent { color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, transparent); }
.badge-green { color: var(--green); background: var(--green-bg); }
.badge-muted { color: var(--muted); background: var(--chip); }
.badge-orange { color: var(--orange); background: #F8EFE9; }

.chip {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--chip);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--ink-soft);
}

.gauge { height: 7px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.gauge > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.gauge.full > i { background: var(--ink); }
.gauge.off > i { background: #C4BFB6; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 22px;
  background: var(--ink);
  color: #FAF9F7;
}
.topbar .brand { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 600; color: #FAF9F7; text-decoration: none; }
.topbar nav { display: flex; gap: 4px; background: #2C2823; border-radius: 10px; padding: 4px; flex-wrap: wrap; }
.topbar nav a {
  border-radius: 7px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #B5AFA6;
}
.topbar nav a.active { background: #FAF9F7; color: var(--ink); }
.topbar .spacer { margin-left: auto; }
.topbar .quiet { color: #B5AFA6; font-size: 12.5px; }

.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.public-header .brand { font-size: 19px; font-weight: 600; text-decoration: none; }

.container { max-width: 1080px; margin: 0 auto; padding: 28px 20px 70px; }
.container-narrow { max-width: 520px; margin: 0 auto; padding: 44px 20px 70px; }
.container-page { max-width: 780px; margin: 0 auto; padding: 0 0 70px; }

.flash { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90;
  background: var(--ink); color: #FAF9F7; border-radius: 12px; padding: 12px 20px; font-size: 14px;
  box-shadow: 0 16px 40px -18px rgba(26,24,21,.5); animation: popIn .25s ease both; max-width: 90vw; }
.flash-alert { background: #7C2D12; }

@keyframes popIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.muted { color: var(--muted); }
.soft { color: var(--ink-soft); }
.small { font-size: 13px; }
.tiny { font-size: 12.5px; }
.right { text-align: right; }
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; } .mb24 { margin-bottom: 24px; }

.list-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.list-row:first-child { border-radius: 14px 14px 0 0; }
.list-row:last-child { border-bottom: none; border-radius: 0 0 14px 14px; }
.list-box { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.list-box .list-row:first-child, .list-box .list-row:last-child { border-radius: 0; }

.cover {
  height: 210px;
  border-radius: 0 0 22px 22px;
  position: relative;
}
.portrait {
  width: 86px; height: 86px;
  border-radius: 999px;
  border: 4px solid var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: "Outfit", sans-serif; font-size: 28px; font-weight: 600;
  background: var(--accent);
  background-size: cover; background-position: center;
  margin-top: -46px;
}
.tabs { display: inline-flex; gap: 4px; background: var(--chip); border-radius: 10px; padding: 4px; }
.tabs a, .tabs button { border: none; background: transparent; color: var(--muted); border-radius: 7px; padding: 7px 13px; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.tabs .active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(26,24,21,.06); }

.swatch { width: 30px; height: 30px; border-radius: 999px; border: none; cursor: pointer; }
.swatch.picked { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }

.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar .cell { min-height: 84px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2); padding: 6px 8px; font-size: 12.5px; }
.calendar .cell.has { background: #fff; border-color: var(--line); }
.calendar .evt { display: block; border-radius: 7px; padding: 3px 7px; margin-top: 4px; font-size: 11.5px; font-weight: 600; text-decoration: none;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.calendar .evt.full { color: var(--ink-soft); background: #E7E4DE; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stat .n { font-family: "Outfit", sans-serif; font-size: 26px; font-weight: 600; }

.landing-hero { padding: 76px 24px 60px; max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
@media (max-width: 860px) { .landing-hero { grid-template-columns: 1fr; padding-top: 40px; } }
.landing-hero h1 { font-size: 52px; line-height: 1.04; letter-spacing: -0.03em; margin-bottom: 18px; }
@media (max-width: 560px) { .landing-hero h1 { font-size: 36px; } }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.footer { padding: 34px 24px; text-align: center; color: var(--muted); font-size: 13px; }
.code-inputs { display: flex; gap: 8px; justify-content: center; }
.code-inputs input { width: 46px; height: 56px; text-align: center; font-size: 22px; font-weight: 600; padding: 0; }

table.plain { width: 100%; border-collapse: collapse; }
table.plain th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.plain td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }

details.reveal summary { cursor: pointer; }
details.reveal summary:not(.btn) { font-weight: 600; font-size: 13.5px; color: var(--ink-soft); }

summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }

dialog.app-modal {
  border: none;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  padding: 26px 28px;
  max-width: 420px;
  width: calc(100vw - 48px);
  box-shadow: 0 30px 70px -30px rgba(26, 24, 21, .5);
}
dialog.app-modal::backdrop { background: rgba(26, 24, 21, .45); }
dialog.app-modal > p[data-message] { margin: 0 0 20px; font-size: 15.5px; line-height: 1.6; }
dialog.app-modal .actions { display: flex; gap: 10px; justify-content: flex-end; }


.drag-handle {
  color: var(--faint);
  cursor: grab;
  padding: 6px 2px;
  flex: none;
  display: inline-flex;
  align-items: center;
}
.drag-handle:hover { color: var(--ink-soft); }
.drag-handle:active { cursor: grabbing; }
