/* Potagr : feuille de styles partagée
   Direction : le sachet de graines. Papier kraft, encres d'imprimeur, rangs semés.
   Voir BRAND.md pour la logique de la palette. */

:root {
  /* clair : papier kraft imprimé */
  --ground:    #E7DCC1;
  --surface:   #F2EAD7;
  --sunken:    #D8CBAA;
  --ink:       #2A2118;
  --ink-2:     #6B5A44;
  --line:      #C6B593;
  --line-2:    #A8926B;
  --accent:    #2F6B24;
  --accent-in: #F2EAD7;
  --cold:      #2E6A6B;
  --warn:      #A83224;
  --warn-bg:   #EBCFB6;

  --grain: rgba(42, 33, 24, 0.028);

  --display: "Superclarendon", "Rockwell", "Bookman Old Style", "Georgia", serif;
  --body: "Avenir Next", "Optima", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;

  --s--1: 0.79rem;
  --s-0:  1rem;
  --s-1:  1.2rem;
  --s-2:  1.5rem;
  --s-3:  2rem;
  --s-4:  2.75rem;
  --s-5:  clamp(2rem, 3.7vw, 3.1rem);

  --measure: 62ch;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* sombre : la terre */
    --ground:    #15110C;
    --surface:   #211A12;
    --sunken:    #0E0B07;
    --ink:       #EDE2C9;
    --ink-2:     #A08F72;
    --line:      #3A2F21;
    --line-2:    #524331;
    --accent:    #8CC63F;
    --accent-in: #14100A;
    --cold:      #6BA8A0;
    --warn:      #E0705C;
    --warn-bg:   #33190F;
    --grain: rgba(237, 226, 201, 0.03);
  }
}

:root[data-theme="dark"] {
  --ground:    #15110C;
  --surface:   #211A12;
  --sunken:    #0E0B07;
  --ink:       #EDE2C9;
  --ink-2:     #A08F72;
  --line:      #3A2F21;
  --line-2:    #524331;
  --accent:    #8CC63F;
  --accent-in: #14100A;
  --cold:      #6BA8A0;
  --warn:      #E0705C;
  --warn-bg:   #33190F;
  --grain: rgba(237, 226, 201, 0.03);
}

:root[data-theme="light"] {
  --ground:    #E7DCC1;
  --surface:   #F2EAD7;
  --sunken:    #D8CBAA;
  --ink:       #2A2118;
  --ink-2:     #6B5A44;
  --line:      #C6B593;
  --line-2:    #A8926B;
  --accent:    #2F6B24;
  --accent-in: #F2EAD7;
  --cold:      #2E6A6B;
  --warn:      #A83224;
  --warn-bg:   #EBCFB6;
  --grain: rgba(42, 33, 24, 0.045);
}

body {
  background-color: var(--ground);
  /* grain du papier : trame fine, jamais franche */
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, var(--grain) 3px 4px),
    repeating-linear-gradient(90deg, transparent 0 5px, var(--grain) 5px 6px);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--s-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--pad);
}

h1, h2, h3, .u-display {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
  line-height: 1.08;
}

.u-mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.u-label {
  font-family: var(--mono);
  font-size: var(--s--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

a { color: inherit; }

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

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.5rem;
  border-bottom: 2px solid var(--ink);
}

.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--s-2);
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.logo b { color: var(--accent); font-weight: inherit; }

.nav {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.nav a {
  font-family: var(--mono);
  font-size: var(--s--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- sections : séparées par un rang semé ---------- */

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px dashed var(--line-2);
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vw, 2.75rem);
}

.section--flush { border-top: 0; }

.section__head {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: var(--measure);
}

.section__head h2 { font-size: var(--s-4); margin: 0; }

.section__head p {
  margin: 0;
  color: var(--ink-2);
  font-size: var(--s-1);
}

/* ---------- boutons ---------- */

.btn {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--s-0);
  letter-spacing: 0.01em;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--accent);
  color: var(--accent-in);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow: 3px 3px 0 var(--ink);
  transition: translate 0.1s ease, box-shadow 0.1s ease;
}

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

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

/* ---------- prose ---------- */

.prose {
  max-width: var(--measure);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.prose p { margin: 0; }
.prose h2 { font-size: var(--s-3); margin: 1rem 0 0; }
.prose h3 { font-size: var(--s-1); margin: 0.75rem 0 0; }

.prose a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.prose strong { font-weight: 700; }

.prose ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; }

/* ---------- footer ---------- */

.foot {
  border-top: 2px solid var(--ink);
  padding-block: 2rem 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: start;
}

.foot__col { display: flex; flex-direction: column; gap: 0.45rem; }

.foot__col a {
  font-family: var(--mono);
  font-size: var(--s--1);
  color: var(--ink-2);
  text-decoration: none;
}

.foot__col a:hover { color: var(--accent); }

/* ---------- signature auteur ---------- */

.byline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line-2);
  background: var(--surface);
  text-decoration: none;
  max-width: 34rem;
}

.byline:hover { border-color: var(--accent); }

.byline img {
  inline-size: 42px;
  block-size: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--sunken);
}

.byline__txt { display: flex; flex-direction: column; gap: 0.1rem; min-inline-size: 0; }

.byline__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--s-0);
  color: var(--ink);
}

.byline__role {
  font-family: var(--mono);
  font-size: var(--s--1);
  color: var(--ink-2);
  line-height: 1.4;
}

/* ---------- page auteur ---------- */

.author {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  align-items: start;
}

@media (min-width: 56rem) {
  .author { grid-template-columns: 15rem 1fr; }
}

.author__aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 2rem;
}

.author__photo {
  inline-size: 100%;
  max-inline-size: 15rem;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--line-2);
  background: var(--sunken);
  display: block;
}

.author__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }

.author__links li { border-bottom: 1px dashed var(--line-2); }

.author__links a {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  padding-block: 0.6rem;
  font-family: var(--mono);
  font-size: var(--s--1);
  color: var(--ink-2);
  text-decoration: none;
}

.author__links a:hover { color: var(--accent); }
.author__links a::after { content: "↗"; color: var(--line-2); }
.author__links a:hover::after { color: var(--accent); }

.author__main { display: flex; flex-direction: column; gap: 1.5rem; }
.author__main h1 { font-size: var(--s-4); margin: 0; }

.author__role {
  font-family: var(--mono);
  font-size: var(--s-0);
  color: var(--accent);
  margin: 0;
}

/* chiffres : faits vérifiables */

.creds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
}

.cred { background: var(--surface); padding: 1rem; display: flex; flex-direction: column; gap: 0.25rem; }

.cred__n {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--s-2);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.cred__l { font-family: var(--mono); font-size: var(--s--1); color: var(--ink-2); line-height: 1.4; }

/* périmètre d'autorité */

.scope {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
}

@media (min-width: 44rem) { .scope { grid-template-columns: 1fr 1fr; } }

.scope__col { background: var(--surface); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; }
.scope__col p { margin: 0; font-size: var(--s--1); color: var(--ink-2); line-height: 1.6; }

.scope__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: var(--s--1);
}

.scope__col li { display: flex; gap: 0.5rem; align-items: baseline; }
.scope__col li::before { content: "·"; color: var(--line-2); flex: none; }

.scope--yes .u-label { color: var(--accent); }
.scope--yes li::before { content: "✓"; color: var(--accent); }
.scope--no { background: var(--sunken); }
.scope--no .u-label { color: var(--ink-2); }

/* ---------- accueil : hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  padding-block: clamp(3rem, 8vw, 6rem);
  align-items: center;
}

@media (min-width: 60rem) {
  .hero { grid-template-columns: 1.05fr 0.95fr; }
}

.hero__lede { display: flex; flex-direction: column; gap: 1.5rem; align-items: start; }

.hero h1 { font-size: var(--s-5); margin: 0; }
.hero h1 em { font-style: normal; color: var(--accent); }

.hero p { margin: 0; max-width: 42ch; font-size: var(--s-1); color: var(--ink-2); }

/* ---------- accueil : le sachet ---------- */

.bulletin {
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--line-2);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* dentelure du haut : le sachet se déchire ici */
.bulletin::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -2px;
  block-size: 7px;
  background-image: radial-gradient(circle at 5px 0, var(--ground) 3.2px, transparent 3.4px);
  background-size: 10px 7px;
  background-repeat: repeat-x;
  pointer-events: none;
}

.bulletin__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.1rem 0.85rem;
  border-bottom: 2px solid var(--ink);
  background: var(--sunken);
}

.bulletin__coords {
  font-family: var(--mono);
  font-size: var(--s--1);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px dashed var(--line-2);
}

.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.7rem 0.2rem;
  border-right: 1px dashed var(--line-2);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.day:last-child { border-right: 0; }

.day__n { font-size: var(--s--1); color: var(--ink-2); letter-spacing: 0.04em; }
.day__t { font-size: var(--s-0); color: var(--ink); }

.day__bar { width: 3px; background: var(--cold); border-radius: 2px 2px 0 0; }

.day--peak { background: var(--warn-bg); }
.day--peak .day__t { color: var(--warn); font-weight: 700; }
.day--peak .day__bar { background: var(--warn); }

.day--today .day__n { color: var(--accent); font-weight: 700; }

.alert {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px dashed var(--line-2);
  background: var(--warn-bg);
  font-family: var(--mono);
  font-size: var(--s--1);
  color: var(--warn);
  line-height: 1.5;
  margin: 0;
}

.alert__dot {
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: var(--warn);
  flex: none;
  translate: 0 -1px;
}

@media (prefers-reduced-motion: no-preference) {
  .alert__dot { animation: pulse 2.4s ease-in-out infinite; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

.tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }

.task {
  display: flex;
  gap: 0.8rem;
  align-items: start;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px dashed var(--line-2);
}

.task:last-child { border-bottom: 0; }

.task__box {
  inline-size: 15px;
  block-size: 15px;
  border: 1.5px solid var(--line-2);
  border-radius: 2px;
  flex: none;
  margin-top: 0.3rem;
}

.task__body { display: flex; flex-direction: column; gap: 0.15rem; }
.task__t { font-size: var(--s-0); line-height: 1.35; }

.task__why { font-family: var(--mono); font-size: var(--s--1); color: var(--ink-2); }

.task--urgent .task__box { border-color: var(--warn); background: var(--warn-bg); }
.task--urgent .task__why { color: var(--warn); }

/* ---------- accueil : statique vs réactif ---------- */

.versus {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line-2);
  border: 2px solid var(--ink);
}

@media (min-width: 48rem) { .versus { grid-template-columns: 1fr 1fr; } }

.vs { background: var(--surface); padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }

.vs--old { background: var(--sunken); }

.vs__quote {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--s-2);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
}

.vs--old .vs__quote { color: var(--ink-2); }
.vs--new .vs__quote { color: var(--accent); }

.vs__note { margin: 0; font-size: var(--s--1); color: var(--ink-2); font-family: var(--mono); line-height: 1.55; }

/* ---------- accueil : capacités ---------- */

.caps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line-2);
  border: 2px solid var(--ink);
}

@media (min-width: 44rem) { .caps { grid-template-columns: 1fr 1fr; } }

.cap { background: var(--surface); padding: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }

.cap h3 { font-size: var(--s-2); margin: 0; }
.cap p { margin: 0; color: var(--ink-2); font-size: var(--s--1); line-height: 1.65; }
.cap .u-label { color: var(--accent); }

/* ---------- accueil : rotation ---------- */

.rot-scroll { overflow-x: auto; }

.rot {
  border-collapse: collapse;
  inline-size: 100%;
  min-inline-size: 34rem;
  font-family: var(--mono);
  font-size: var(--s--1);
  font-variant-numeric: tabular-nums;
}

.rot th, .rot td {
  border: 1px solid var(--line-2);
  padding: 0.7rem 0.8rem;
  text-align: left;
  white-space: nowrap;
}

.rot thead th {
  background: var(--ink);
  color: var(--ground);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-color: var(--ink);
}

.rot tbody th { background: var(--sunken); color: var(--ink); font-weight: 700; }
.rot td { background: var(--surface); }

.fam { display: inline-flex; align-items: center; gap: 0.45rem; }

.fam::before {
  content: "";
  inline-size: 8px;
  block-size: 8px;
  border-radius: 2px;
  background: var(--f, var(--ink-2));
}

/* encres du sachet : chaque famille a la couleur de son légume */
.fam--sol { --f: #A83224; }
.fam--leg { --f: var(--accent); }
.fam--bra { --f: var(--cold); }
.fam--rac { --f: #C4691A; }

/* ---------- accueil : pro ---------- */

.pro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: 5px 5px 0 var(--line-2);
}

@media (min-width: 52rem) { .pro { grid-template-columns: 1fr 1fr; align-items: center; } }

.pro h2 { font-size: var(--s-3); margin: 0 0 0.75rem; }
.pro p { margin: 0; color: var(--ink-2); }

.pro__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: var(--s--1);
}

.pro__list li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding-block: 0.5rem;
  border-bottom: 1px dashed var(--line-2);
}

.pro__list li::before {
  content: "";
  inline-size: 6px;
  block-size: 6px;
  background: var(--accent);
  flex: none;
  translate: 0 -2px;
}

/* ---------- accueil : inscription ---------- */

.signup { align-items: start; }

.form { display: flex; flex-wrap: wrap; gap: 0.6rem; inline-size: 100%; max-width: 32rem; }

.form input {
  flex: 1 1 14rem;
  min-inline-size: 0;
  font-family: var(--body);
  font-size: var(--s-0);
  padding: 0.8rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
}

.form input::placeholder { color: var(--ink-2); }

.form__note { font-family: var(--mono); font-size: var(--s--1); color: var(--ink-2); margin: 0; }

.said {
  font-family: var(--mono);
  font-size: var(--s--1);
  color: var(--accent);
  margin: 0;
  min-block-size: 1.2em;
}

/* ---------- apparition ---------- */

@media (prefers-reduced-motion: no-preference) {
  .anim {
    opacity: 0;
    translate: 0 12px;
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  }
  .anim--1 { animation-delay: 0.05s; }
  .anim--2 { animation-delay: 0.15s; }
  .anim--3 { animation-delay: 0.28s; }
}

@keyframes rise {
  to { opacity: 1; translate: 0 0; }
}

/* ---------- mentions légales ---------- */

.legal { padding-block: clamp(2rem, 5vw, 3.5rem); display: flex; flex-direction: column; gap: 2rem; }

.legal h1 { font-size: var(--s-4); margin: 0; }

.dl { border: 2px solid var(--ink); display: flex; flex-direction: column; max-width: 48rem; }

.dl__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px dashed var(--line-2);
}

@media (min-width: 40rem) {
  .dl__row { grid-template-columns: 14rem 1fr; gap: 1rem; align-items: baseline; }
}

.dl__row:last-child { border-bottom: 0; }
.dl__row:nth-child(odd) { background: var(--surface); }

.dl__k {
  font-family: var(--mono);
  font-size: var(--s--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.dl__v { font-size: var(--s-0); margin: 0; }
.dl__v a { color: var(--accent); }

