/* ==========================================================================
   Cours SEO & GEO : feuille de style principale
   Approche mobile-first. Les media queries élargissent la mise en page
   à partir de 640 px (tablette) puis 1024 px (ordinateur).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables et réglages de base
   -------------------------------------------------------------------------- */
:root {
  --rose: #c4007a;
  --violet: #7b2d8b;
  --rose-dark: #9a0060;
  --violet-dark: #5c1f69;
  --rose-soft: #fdeef6;
  --violet-soft: #f3eaf6;
  --ink: #231b2a;
  --ink-2: #5a5062;
  --muted: #6f6578;
  --bg: #ffffff;
  --bg-soft: #faf7fb;
  --line: #e9e1ec;
  --code-bg: #2a1f30;
  --code-ink: #f6eef8;
  --footer-bg: #2b1733;
  --footer-ink: #efe6f2;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(123, 45, 139, 0.10);
  --shadow-lg: 0 18px 44px rgba(123, 45, 139, 0.18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --container: 1140px;
  --gutter: 1.25rem;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: break-word;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

img,
svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--violet);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: color 0.2s;
}

a:hover {
  color: var(--rose);
}

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

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 {
  font-size: clamp(1.9rem, 1.35rem + 2.4vw, 3.1rem);
}

h2 {
  font-size: clamp(1.45rem, 1.2rem + 1.1vw, 2rem);
  margin-top: 0;
}

h3 {
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
  margin-top: 1.6em;
}

h4 {
  font-size: 1.05rem;
}

p,
ul,
ol,
table,
pre,
blockquote,
dl {
  margin: 0 0 1.1em;
}

ul,
ol {
  padding-left: 1.3em;
}

li + li {
  margin-top: 0.35em;
}

strong {
  color: var(--ink);
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--violet-soft);
  color: var(--violet-dark);
  padding: 0.1em 0.4em;
  border-radius: 5px;
}

pre {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.55;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* --------------------------------------------------------------------------
   2. Lien d'évitement et en-tête
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  background: var(--violet);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s, border-color 0.3s;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 6px 24px rgba(35, 27, 42, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 44px;
  height: 44px;
  transition: transform 0.4s var(--ease);
}

.brand:hover img {
  transform: rotate(-8deg) scale(1.06);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand__amp {
  color: var(--rose);
}

.brand__tag {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 500;
}

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.burger__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--violet);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.burger[aria-expanded="true"] .burger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger__bar:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] .burger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Navigation : panneau déroulant sur mobile */
.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(35, 27, 42, 0.12);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s var(--ease), opacity 0.25s, visibility 0s linear 0.3s;
}

.site-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0.5rem var(--gutter) 1rem;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.site-nav__list li + li {
  margin-top: 0;
}

.site-nav__list a {
  display: block;
  padding: 0.8rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.site-nav__list a:hover,
.site-nav__list a:focus-visible {
  background: var(--violet-soft);
  color: var(--violet-dark);
}

.site-nav__list a[aria-current] {
  color: var(--rose);
}

/* --------------------------------------------------------------------------
   3. Boutons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, color 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--rose);
  color: #fff;
}

.btn--primary:hover {
  background: var(--rose-dark);
  color: #fff;
}

.btn--secondary {
  background: #fff;
  color: var(--violet);
  border-color: var(--violet);
}

.btn--secondary:hover {
  background: var(--violet);
  color: #fff;
}

.btn--light {
  background: #fff;
  color: var(--violet-dark);
}

.btn--light:hover {
  background: var(--violet-soft);
  color: var(--violet-dark);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: #fff;
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   4. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--violet) 0%, var(--rose) 100%);
  padding: 3rem 0 3.2rem;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hero::before {
  width: 420px;
  height: 420px;
  right: -160px;
  top: -200px;
}

.hero::after {
  width: 260px;
  height: 260px;
  left: -120px;
  bottom: -160px;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.5rem;
}

.hero h1 {
  color: #fff;
  margin-bottom: 0.4em;
}

.hero .lead {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  max-width: 62ch;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.94);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.hero__art {
  display: none;
}

.hero--home {
  padding: 3.5rem 0 4rem;
}

/* --------------------------------------------------------------------------
   5. Fil d'Ariane
   -------------------------------------------------------------------------- */
.breadcrumb {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0.7rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.5rem;
}

.breadcrumb li + li {
  margin-top: 0;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--ink-2);
}

.breadcrumb [aria-current] {
  color: var(--rose);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   6. Mise en page des pages de contenu
   -------------------------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  padding-block: 2.5rem 3rem;
}

/* Évite qu'un tableau large n'élargisse la page sur mobile : le défilement
   horizontal reste confiné au conteneur .table-wrap. */
.content,
.sidebar {
  min-width: 0;
}

.content > section + section {
  margin-top: 2.6rem;
}

.content h2 {
  position: relative;
  padding-bottom: 0.45rem;
  margin-bottom: 1rem;
}

.content h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--rose), var(--violet));
}

.lead-in {
  font-size: 1.08rem;
  color: var(--ink-2);
}

.question {
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 1.05rem;
}

.question strong {
  color: var(--violet-dark);
}

/* Blocs d'activité, de notion et de livrable */
.block {
  padding: 1.4rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

.block > :last-child {
  margin-bottom: 0;
}

.block--activity {
  background: var(--bg-soft);
  border-left: 5px solid var(--rose);
}

.block--notion {
  border-left: 5px solid var(--violet);
}

.block--deliverable {
  background: linear-gradient(135deg, var(--violet-soft), var(--rose-soft));
  border: 0;
}

.block__kicker {
  display: inline-block;
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose);
}

.block--notion .block__kicker {
  color: var(--violet);
}

.block--deliverable .block__kicker {
  color: var(--violet-dark);
}

/* Objectifs : liste à puces en coche */
.objectives {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.objectives li {
  position: relative;
  padding-left: 2rem;
  margin: 0;
}

.objectives li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--rose) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10.5l3.2 3L15 7'/%3E%3C/svg%3E") center/70% no-repeat;
}

/* Encadrés */
.callout {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--violet-soft);
  border-left: 5px solid var(--violet);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout--warn {
  background: var(--rose-soft);
  border-left-color: var(--rose);
}

.callout--tip {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--violet);
}

/* Liste à cocher (persistance locale via JS) */
.checklist {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  padding: 0.65rem 0.8rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.checklist li:has(input:checked) {
  background: var(--violet-soft);
}

.checklist input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.2rem 0 0;
  accent-color: var(--rose);
  cursor: pointer;
}

.checklist label {
  cursor: pointer;
}

.checklist input:checked + label {
  text-decoration: line-through;
  color: var(--ink-2);
}

/* Tableaux */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.4em;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.table-wrap:focus-visible {
  outline-offset: 0;
}

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

.table-wrap table {
  margin: 0;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--violet-soft);
  color: var(--violet-dark);
  font-weight: 700;
}

tbody tr:nth-child(even) {
  background: var(--bg-soft);
}

tbody tr:last-child td {
  border-bottom: 0;
}

caption {
  text-align: left;
  font-weight: 600;
  padding: 0.6rem 0.9rem;
  color: var(--ink-2);
  caption-side: top;
}

td em,
.example {
  color: var(--muted);
}

/* Bloc de code avec bouton de copie */
.code-block {
  position: relative;
  margin-bottom: 1.4em;
}

.code-block pre {
  margin: 0;
  padding-top: 2.8rem;
}

.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.copy-btn:focus-visible {
  outline-color: #fff;
}

/* Arborescence (figure) */
.tree {
  font-family: var(--mono);
  font-size: 0.92rem;
  background: var(--bg-soft);
  color: var(--ink);
  border: 1px solid var(--line);
}

/* details */
details {
  margin: 1.2rem 0;
  padding: 0.3rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

details[open] {
  padding-bottom: 1rem;
}

summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--violet-dark);
  padding: 0.7rem 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--rose);
  border-bottom: 2px solid var(--rose);
  transform: rotate(-45deg);
  transition: transform 0.25s var(--ease);
  flex: none;
}

details[open] summary::before {
  transform: rotate(45deg);
}

/* Flux "Je cherche, je comprends..." */
.flow {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.2rem 0 1.6rem;
}

.flow li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: var(--violet-soft);
  color: var(--violet-dark);
  font-weight: 700;
  font-size: 0.95rem;
}

.flow li:not(:last-child)::after {
  content: "\2192";
  color: var(--rose);
}

.section--cta .flow li,
.hero .flow li {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero .flow li:not(:last-child)::after {
  color: #fff;
}

/* Cartes */
.grid {
  display: grid;
  gap: 1.25rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.4rem 1.3rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.card:hover,
.card:focus-within {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card > :last-child {
  margin-bottom: 0;
}

.card h2,
.card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.card h2::after {
  display: none;
}

.card p {
  margin: 0;
  color: var(--ink-2);
}

.card__num {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--violet), var(--rose));
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}

.card:hover .card__num,
.card:hover .card__icon {
  animation: bounce 0.6s var(--ease);
}

.card__step {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rose);
}

.card__link {
  font-weight: 700;
  text-decoration: none;
  margin-top: auto;
}

.card__link::after {
  content: "\2192";
  display: inline-block;
  margin-left: 0.35em;
  transition: transform 0.25s var(--ease);
}

.card:hover .card__link::after {
  transform: translateX(4px);
}

/* Lien couvrant toute la carte */
.card--link .card__link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card__icon {
  width: 46px;
  height: 46px;
  color: var(--violet);
}

@keyframes bounce {
  0% { transform: translateY(0); }
  35% { transform: translateY(-8px); }
  60% { transform: translateY(0); }
  80% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

/* Sections de la page d'accueil */
.section {
  padding-block: 3rem;
}

.section--soft {
  background: var(--bg-soft);
}

.section__head {
  max-width: 68ch;
  margin-bottom: 1.8rem;
}

.section__head h2 {
  margin-bottom: 0.4em;
}

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

.section--cta {
  background: linear-gradient(135deg, var(--violet-dark), var(--rose));
  color: #fff;
  text-align: center;
}

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

.section--cta p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 60ch;
  margin-inline: auto;
}

.section--cta .hero__actions {
  justify-content: center;
}

.stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  list-style: none;
  padding: 0;
  margin: 0;
}

.stats li {
  margin: 0;
  padding: 1.1rem 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.stats strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1.1;
  color: #fff;
}

.stats span {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Fiche auteur */
.author {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.3rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}

.author__avatar {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--violet), var(--rose));
  color: #fff;
  font-weight: 800;
  font-size: 1.3rem;
}

.author p {
  margin-bottom: 0.4em;
}

.author__links {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.92rem;
}

.author__links li {
  margin: 0;
}

/* Barre latérale */
.sidebar {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

.widget {
  padding: 1.2rem 1.2rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

.widget h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rose);
  margin-bottom: 0.8rem;
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget li + li {
  margin-top: 0.45rem;
}

.widget a {
  text-decoration: none;
  color: var(--ink-2);
  font-size: 0.95rem;
  display: block;
  padding-left: 0.9rem;
  position: relative;
}

.widget a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rose);
}

.widget a:hover {
  color: var(--rose);
  text-decoration: underline;
}

.widget--author {
  background: var(--bg-soft);
}

.widget--author p {
  margin: 0;
  font-size: 0.95rem;
}

.widget--author .author__links {
  font-size: 0.88rem;
}

.widget--author .author__links li + li {
  margin-top: 0;
}

.widget--author .author__links a {
  padding-left: 0;
  display: inline;
}

.widget--author .author__links a::before {
  display: none;
}

/* Pagination entre modules */
.pager {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding-block: 2rem;
}

.pager__grid {
  display: grid;
  gap: 1rem;
}

.pager a {
  display: block;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.pager a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.pager__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rose);
  margin-bottom: 0.2rem;
}

.pager__title {
  font-weight: 700;
}

.pager a.pager__next {
  text-align: right;
}

/* Sujets */
.subject {
  padding: 1.5rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

.content > .subject + .subject {
  margin-top: 1.5rem;
}

.subject__intro {
  color: var(--ink-2);
}

.queries {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.queries li {
  margin: 0;
  padding: 0.6rem 0.8rem;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}

.queries strong {
  color: var(--violet-dark);
}

/* Glossaire */
.glossary {
  display: grid;
  gap: 0.9rem;
}

.glossary div {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.glossary dt {
  font-weight: 800;
  color: var(--violet-dark);
  margin-bottom: 0.25rem;
}

.glossary dd {
  margin: 0;
  color: var(--ink-2);
}

.glossary div[hidden] {
  display: none;
}

.filter {
  margin-bottom: 1.5rem;
}

.filter label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.filter input {
  width: 100%;
  max-width: 480px;
  font: inherit;
  padding: 0.75rem 0.9rem;
  border: 1px solid #b9adbf;
  border-radius: var(--radius-sm);
}

.filter input:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(123, 45, 139, 0.2);
}

.filter__count {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.empty {
  padding: 1rem;
  background: var(--rose-soft);
  border-radius: var(--radius-sm);
}

/* Page contact */
.contact-grid {
  display: grid;
  gap: 2rem;
}

.contact-grid section + section {
  margin-top: 2.6rem;
}

.contact-email {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 1rem 1.2rem;
  background: var(--violet-soft);
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}

/* Page 404 */
.page-404 {
  text-align: center;
  padding-block: 4rem;
}

.page-404 h1 {
  font-size: clamp(3rem, 2rem + 6vw, 6rem);
  color: var(--violet);
  margin-bottom: 0.2em;
}

/* Animation d'apparition (ajoutée par JS, désactivée sans JS) */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   7. Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 3rem 0 1.5rem;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

/* Dans un paragraphe, un lien doit rester identifiable sans la couleur (WCAG 1.4.1) */
.site-footer p a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.site-footer a:hover {
  color: #ffd1ea;
  text-decoration: underline;
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
}

.site-footer__brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.6rem;
}

.site-footer h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffd1ea;
  margin-bottom: 0.8rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li + li {
  margin-top: 0.4rem;
}

.site-footer__nav {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}

.site-footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

.site-footer__bottom p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   8. Tablette (à partir de 640 px)
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  :root {
    --gutter: 1.75rem;
  }

  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .pager__grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__nav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }

  .glossary {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------------------------
   9. Ordinateur (à partir de 1024 px)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  :root {
    --gutter: 2rem;
  }

  .burger {
    display: none;
  }

  .site-nav {
    position: static;
    background: none;
    border: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: none;
  }

  .site-nav__list {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0;
    max-height: none;
    overflow: visible;
  }

  .site-nav__list a {
    padding: 0.55rem 0.7rem;
    border: 0;
    font-size: 0.92rem;
    position: relative;
  }

  .site-nav__list a::after {
    content: "";
    position: absolute;
    left: 0.7rem;
    right: 0.7rem;
    bottom: 0.25rem;
    height: 2px;
    border-radius: 2px;
    background: var(--rose);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s var(--ease);
  }

  .site-nav__list a:hover::after,
  .site-nav__list a[aria-current]::after {
    transform: scaleX(1);
  }

  .site-nav__list a:hover,
  .site-nav__list a:focus-visible {
    background: none;
  }

  .hero {
    padding: 4rem 0 4.5rem;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    align-items: center;
    gap: 3rem;
  }

  .hero__inner--single {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__art {
    display: block;
    justify-self: end;
    width: 100%;
    max-width: 380px;
  }

  .hero--home {
    padding: 5rem 0 5.5rem;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 3.5rem;
    padding-block: 3rem 4rem;
  }

  .layout--wide {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    top: calc(var(--header-h) + 1.25rem);
  }

  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .section {
    padding-block: 4.5rem;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    gap: 3rem;
  }

  .site-footer__grid {
    grid-template-columns: 1.1fr 2fr;
  }

  .site-footer__nav {
    grid-column: auto;
  }
}

@media (min-width: 1200px) {
  .site-nav__list a {
    font-size: 0.97rem;
    padding: 0.55rem 0.85rem;
  }
}

/* --------------------------------------------------------------------------
   10. Impression
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .pager,
  .sidebar,
  .copy-btn,
  .skip-link,
  .hero__actions {
    display: none;
  }

  .hero {
    background: none;
    color: #000;
    padding: 1rem 0;
  }

  .hero h1 {
    color: #000;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  a {
    color: #000;
  }
}
