@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600&display=swap");

/* Guide des outils stixiva — mobile d’abord */
:root {
  --wine: #702f48;
  --wine-dark: #542036;
  --ink: #302b2d;
  --muted: #62575c;
  --paper: #fcfaf7;
  --line: #e2d9d4;
  --wash: #f5edf1;
  --tint: #f6f0eb;
  --focus: #bc6d21;
  --gutter: 16px;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--wine);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 10;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--wine);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- En-tête ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font: 600 1.5rem "Playfair Display", Georgia, serif;
  text-decoration: none;
}

.brand span {
  color: var(--wine);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav a:not(.cta) {
  display: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--wine);
}

.nav .cta {
  padding: 0 16px;
  border-radius: 999px;
  background: var(--wine);
  color: #fff;
  font-weight: 600;
}

.nav .cta:hover {
  background: var(--wine-dark);
  color: #fff;
}

/* ---------- Typographie ---------- */
h1,
h2,
h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 7vw, 3.2rem);
}

h2 {
  font-size: clamp(1.5rem, 5vw, 2rem);
}

h3 {
  margin: 28px 0 10px;
  font-size: 1.2rem;
}

p {
  margin: 0;
}

kbd {
  display: inline-block;
  min-width: 1.8em;
  padding: 1px 6px;
  border: 1px solid #d7cbd0;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--wash);
  color: var(--wine);
  font: 700 0.8rem "DM Sans", sans-serif;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
}

/* ---------- Intro ---------- */
.intro {
  display: grid;
  gap: 14px;
  padding-block: 36px 28px;
}

.eyebrow {
  color: var(--wine);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro-copy {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- Mise en page ---------- */
.layout {
  display: grid;
  gap: 24px;
  padding-bottom: 48px;
}

.toc {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.toc-title {
  margin-bottom: 6px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wine);
}

.toc ol {
  margin: 0;
  padding-left: 1.4em;
}

.toc a {
  display: inline-block;
  padding: 6px 0;
  color: var(--ink);
  text-decoration: none;
}

.toc a:hover {
  color: var(--wine);
  text-decoration: underline;
}

.content {
  min-width: 0;
}

.doc-section {
  padding-block: 28px;
  border-top: 1px solid var(--line);
}

.doc-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.section-lead {
  margin-top: 6px;
  color: var(--muted);
}

/* ---------- Listes d’outils ---------- */
.tools {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.tools > div {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.tools > div:first-child {
  border-top: 0;
}

.tools dt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-weight: 700;
}

.tools dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.bullets {
  margin: 10px 0 0;
  padding-left: 1.2em;
  color: var(--ink);
}

.bullets li + li {
  margin-top: 6px;
}

.note,
.tip {
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--wine);
  border-radius: 0 8px 8px 0;
  background: var(--wash);
  font-size: 0.95rem;
}

.tip {
  border-left-color: #c28834;
  background: #fbf1e3;
}

.shot {
  margin: 18px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.shot img {
  width: 100%;
  aspect-ratio: 1440 / 1000;
  object-fit: cover;
}

/* ---------- Tableaux de raccourcis ---------- */
.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  border-top: 0;
  background: var(--tint);
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td:first-child {
  width: 45%;
}

/* ---------- Nouveautés à venir ---------- */
.upcoming {
  margin-top: 12px;
  padding: 24px 18px;
  border: 1px dashed #c9a36c;
  border-radius: 14px;
  background: #fffaf2;
}

.upcoming-list {
  display: grid;
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.upcoming-list li {
  display: grid;
  gap: 2px;
}

.upcoming-list span:last-child {
  color: var(--muted);
  font-size: 0.95rem;
}

.soon {
  justify-self: start;
  padding: 1px 9px;
  border-radius: 999px;
  background: #fbf1e3;
  color: #7a4f12;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- Appel final & pied de page ---------- */
.end-cta {
  display: grid;
  gap: 18px;
  margin-top: 32px;
  padding: 24px 20px;
  border-radius: 14px;
  background: var(--wine-dark);
  color: #fff;
}

.end-cta h2 {
  color: #fff;
}

.end-cta p {
  margin-top: 6px;
  color: #f1e3e9;
}

.end-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: #fff;
  color: var(--wine-dark);
  font-weight: 700;
  text-decoration: none;
}

.end-cta a:focus-visible {
  outline-color: #f3c27a;
}

.footer {
  padding-block: 24px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer a {
  display: inline-block;
  padding-block: 10px;
}

/* ---------- Tablette ---------- */
@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }

  .nav a:not(.cta) {
    display: inline-flex;
  }

  .intro {
    padding-block: 56px 36px;
  }

  .toc ol {
    columns: 2;
    column-gap: 32px;
  }

  .end-cta {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 32px;
  }

  .upcoming {
    padding: 28px;
  }

  .upcoming-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Ordinateur : sommaire latéral collant ---------- */
@media (min-width: 1024px) {
  .layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
  }

  .toc {
    position: sticky;
    top: 16px;
  }

  .toc ol {
    columns: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
