/* =========================================================
   liens.css — Das Fabularium
   Page "Compagnons de route" : annuaire de liens regroupés
   par catégorie, sous forme de cartes "notes épinglées".
========================================================= */

/* ---- HERO ---- */
.liens-hero {
  position: relative;
  padding: clamp(60px, 8vw, 110px) 0 clamp(40px, 5vw, 70px);
  overflow: hidden;
  text-align: center;
}

.liens-hero .container {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.liens-hero h1 {
  margin: 8px 0 18px;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
}

.liens-hero h1 em {
  font-style: italic;
  color: var(--rust);
}

.liens-hero .hero-lead {
  max-width: 58ch;
  margin: 0 auto;
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  color: var(--ink-soft);
  line-height: 1.6;
}

.liens-hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.liens-hero-decor .deco-star {
  position: absolute;
  color: var(--rust);
  opacity: 0.55;
}

.liens-hero-decor .deco-star-1 {
  top: 18%;
  left: 9%;
  width: 24px;
  height: 24px;
  transform: rotate(-12deg);
}

.liens-hero-decor .deco-star-2 {
  bottom: 22%;
  right: 11%;
  width: 16px;
  height: 16px;
  color: var(--blue-aquarelle);
  opacity: 0.6;
  transform: rotate(16deg);
}

.liens-hero-decor .deco-spool {
  position: absolute;
  top: 16%;
  right: 5%;
  width: clamp(60px, 6vw, 88px);
  transform: rotate(-14deg);
  opacity: 0.75;
}
.liens-hero-decor .deco-spool img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(2px 4px 5px rgba(42, 36, 31, 0.18));
}

@media (max-width: 720px) {
  .liens-hero-decor .deco-spool { display: none; }
}

/* ---- SOMMAIRE ---- */
.liens-toc {
  padding: clamp(20px, 3vw, 36px) 0 clamp(28px, 3.5vw, 44px);
}

.liens-toc .container {
  max-width: 980px;
}

.liens-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
}

.liens-toc a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(42, 36, 31, 0.14);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  text-decoration: none;
  color: var(--ink);
  transition: all 200ms ease;
}

.liens-toc a:hover {
  background: var(--paper-warm, #f1eadc);
  border-color: var(--rust);
  transform: translateY(-1px);
}

.liens-toc .num {
  font-family: var(--font-title);
  font-size: 0.78rem;
  color: var(--rust);
}

/* ---- SECTIONS ---- */
.liens-section {
  position: relative;
  padding: clamp(50px, 6vw, 90px) 0;
  overflow: hidden;
}

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto clamp(32px, 4vw, 50px);
  position: relative;
}

.section-head .section-num {
  display: inline-block;
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  color: var(--rust);
  line-height: 1;
  opacity: 0.55;
  margin-bottom: 6px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0 0 14px;
  line-height: 1.1;
}

.section-head p {
  font-size: clamp(0.98rem, 1.1vw, 1.08rem);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 56ch;
}

/* ---- GRILLE DE LIENS ---- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(22px, 2.6vw, 32px);
}

@media (max-width: 880px) { .link-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .link-grid { grid-template-columns: 1fr; } }

.link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(20px, 2.4vw, 26px);
  background:
    linear-gradient(180deg, rgba(255, 250, 238, 0.95), rgba(247, 235, 211, 0.92));
  border: 1px solid rgba(36, 27, 21, 0.14);
  border-radius: 5px 8px 6px 7px;
  box-shadow:
    3px 4px 0 rgba(42, 36, 31, 0.06),
    0 10px 22px rgba(42, 36, 31, 0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 280ms cubic-bezier(.2,.7,.3,1), box-shadow 280ms ease;
}

/* rotations légères pour casser l'alignement (mur d'atelier) */
.link-card:nth-of-type(3n+1) { transform: rotate(-0.5deg); }
.link-card:nth-of-type(3n+2) { transform: rotate(0.4deg); }
.link-card:nth-of-type(3n+3) { transform: rotate(-0.3deg); }

.link-card:hover {
  transform: rotate(0) translateY(-3px);
  box-shadow:
    4px 6px 0 rgba(42, 36, 31, 0.08),
    0 14px 28px rgba(42, 36, 31, 0.10);
  border-color: rgba(169, 72, 43, 0.4);
}

/* petit masking tape en haut */
.link-card .card-tape {
  position: absolute;
  top: -10px;
  width: 72px;
  height: 20px;
  background: url("../assets/tape-masking-paper.png") center / 100% 100% no-repeat;
  filter: var(--tape-filter);
  opacity: var(--tape-opacity);
  pointer-events: none;
  z-index: 2;
}

.link-card:nth-of-type(3n+1) .card-tape { left: 14%; transform: rotate(-6deg); }
.link-card:nth-of-type(3n+2) .card-tape { right: 16%; transform: rotate(7deg); }
.link-card:nth-of-type(3n+3) .card-tape { left: 38%; transform: rotate(-3deg); width: 92px; }

.card-cat {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  background: rgba(169, 72, 43, 0.10);
  color: var(--rust);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.link-card h3 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(1.15rem, 1.4vw, 1.35rem);
  line-height: 1.2;
  color: var(--ink);
}

.link-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
  flex: 1;
}

.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
  transition: gap 200ms ease;
}

.link-cta svg {
  width: 14px;
  height: 14px;
}

.link-card:hover .link-cta { gap: 12px; }

/* ---- OUTRO ---- */
.liens-outro {
  margin-top: clamp(40px, 5vw, 60px);
  text-align: center;
}

.liens-outro .caveat {
  font-family: "Caveat", "IM Fell English", cursive;
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 56ch;
  line-height: 1.4;
}

.liens-outro .caveat a {
  color: var(--rust);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
