/* ============================================================
   ÉCRITURE DE SOIE — Ateliers d'écriture à Lyon
   Design system & styles
   ============================================================ */

:root {
  /* — Palette : lavande · rouge de Lyon · or (le lion d'or sur fond rouge) — */
  --ink:        #2a2036;   /* encre prune profonde */
  --ink-soft:   #3d2f4d;
  --ivory:      #f4eff6;   /* papier teinté lavande */
  --ivory-2:    #e9e0f0;
  --cream:      #fbf8fc;

  --lavender:      #ab93d6; /* lavande */
  --lavender-soft: #cdbfe6;
  --lavender-deep: #6f5aa0;

  --gold:       #c9a24a;   /* or du lion */
  --gold-soft:  #ddc488;

  /* aliases d'accent (le rouge lyonnais mène, la lavande l'accompagne) */
  --silk:       var(--lavender);  /* teinte douce */
  --silk-deep:  #a31f3d;          /* rouge de Lyon */
  --red:        #be3a52;
  --red-deep:   #8c1832;
  --rose:       #d98a9a;
  --line:       rgba(42, 32, 54, 0.14);

  /* — Typographies — */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --body:  "Spectral", Georgia, serif;

  /* — Mesures — */
  --container: 1280px;
  --gutter: clamp(1.4rem, 5vw, 5rem);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Reset / base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

/* l'attribut hidden doit toujours l'emporter, même si un display est défini ailleurs */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  /* fond du hero : on fige les notes (texte + tache) dans un état calme et visible */
  .ink-note .hw { animation: none; clip-path: inset(0 0 0 0); opacity: 0.3; }
  .ink-note .hw::after { display: none; }
  .ink-note .blot { animation: none; opacity: 0.13; transform: scale(1); }
}

body {
  font-family: var(--body);
  font-weight: 400;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.7;
  font-size: clamp(1rem, 0.6vw + 0.9rem, 1.12rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--silk); color: var(--cream); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; letter-spacing: -0.01em; }

/* ─── Texture grain ────────────────────────────────────────── */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Fil de progression ───────────────────────────────────── */
.scroll-thread {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: transparent; pointer-events: none;
}
.scroll-thread span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--silk), var(--silk-deep));
  transition: width 0.08s linear;
}

/* ─── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem var(--gutter);
  color: var(--ink);
  transition: padding 0.5s var(--ease);
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(244,239,246,0.7) 0%, transparent 100%);
  opacity: 1; transition: opacity 0.5s var(--ease);
}
.nav.is-stuck {
  padding-top: 0.78rem; padding-bottom: 0.78rem;
}
.nav.is-stuck::before {
  background: rgba(244, 239, 246, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 0.55rem; font-family: var(--serif); font-size: 1.22rem; letter-spacing: 0.01em; }
.nav__mark { color: var(--silk-deep); font-size: 1.05em; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.1rem); }
.nav__links a { font-size: 0.94rem; letter-spacing: 0.02em; position: relative; opacity: 0.84; transition: opacity 0.3s; }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0;
  background: var(--silk-deep); transition: width 0.35s var(--ease);
}
.nav__links a:hover { opacity: 1; }
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
/* page courante */
.nav__links a.is-current:not(.nav__cta) { opacity: 1; color: var(--silk-deep); }
.nav__links a.is-current:not(.nav__cta)::after { width: 100%; }
.nav__cta.is-current { background: var(--ink); color: var(--cream); }
.nav__cta {
  padding: 0.5rem 1.15rem; border: 1px solid var(--ink); border-radius: 100px;
  opacity: 1 !important; transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.nav__cta:hover { background: var(--ink); color: var(--cream); }

.nav__burger { display: none; width: 40px; height: 40px; flex-direction: column; gap: 6px; align-items: center; justify-content: center; }
.nav__burger span { display: block; width: 22px; height: 1.5px; background: currentColor; transition: transform 0.35s var(--ease), opacity 0.35s; }
.nav.is-open .nav__burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav.is-open .nav__burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ─── Boutons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.92rem 1.7rem; border-radius: 100px; font-family: var(--body);
  font-size: 0.98rem; letter-spacing: 0.02em; position: relative; overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), color 0.4s var(--ease);
}
.btn--solid { background: var(--ink); color: var(--cream); box-shadow: 0 10px 30px -12px rgba(28,26,36,0.6); }
.btn--solid::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, var(--red-deep), var(--silk-deep));
  opacity: 0; transition: opacity 0.45s var(--ease);
}
.btn--solid:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -14px rgba(140,24,50,0.5); }
.btn--solid:hover::before { opacity: 1; }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--full { width: 100%; }

/* ─── Reveal (apparitions) ─────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

.reveal-line { display: block; overflow: hidden; }
.reveal-line > span { display: block; transform: translateY(110%); transition: transform 1.1s var(--ease); }
.is-in .reveal-line > span, .hero.is-loaded .reveal-line > span { transform: none; }

.word-reveal { opacity: 0.12; transition: opacity 0.6s var(--ease); }
.word-reveal.lit { opacity: 1; }

/* ─── Sections : structure commune ─────────────────────────── */
section { position: relative; z-index: 2; }
.section-head { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.section-tag {
  font-family: var(--body); font-style: italic; font-size: 0.95rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--silk-deep);
  margin-bottom: 1rem;
}
.section-tag::before { content: "— "; }
.section-title { font-size: clamp(2rem, 4.6vw, 3.5rem); }
.section-sub { max-width: 46ch; margin: 1.4rem auto 0; color: var(--ink-soft); opacity: 0.86; }

/* ═══════════════════  HERO  ═══════════════════ */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  /* le padding bas réserve la place du fil « Entrer dans les mots » (en absolu) */
  justify-content: center; padding: 7rem var(--gutter) 7.5rem; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 8%, var(--cream) 0%, transparent 55%),
    radial-gradient(100% 80% at 5% 100%, var(--ivory-2) 0%, transparent 60%),
    var(--ivory);
}

/* — fond : chaque fragment s'écrit AVEC sa tache d'encre (paire) — */
.defs { position: absolute; }
.hero__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

/* une "note d'encre" = un bloc déplacé ensemble : la tache + le texte écrit dedans */
.ink-note {
  position: absolute; font-family: "Dancing Script", cursive; font-weight: 600; line-height: 1;
}

/* le texte manuscrit qui se trace */
.ink-note .hw {
  position: relative; display: inline-block; white-space: nowrap;
  color: var(--silk-deep);
  clip-path: inset(0 100% 0 0); opacity: 0;
}
.ink-note .hw::after { /* la pointe de plume qui avance */
  content: ""; position: absolute; top: 10%; right: -2px; width: 6px; height: 80%;
  background: linear-gradient(var(--red-deep), transparent);
  border-radius: 50%; filter: blur(1px); opacity: 0.55;
}

/* la tache d'encre, posée sous le début du mot, comme la source de l'encre */
.ink-note .blot {
  position: absolute; left: -0.5em; top: -0.32em; z-index: -1;
  width: 2.7em; height: 2.4em;
  border-radius: 47% 53% 58% 42% / 52% 44% 56% 48%;
  background: radial-gradient(60% 56% at 38% 34%, var(--silk-deep) 0%, var(--red-deep) 58%, rgba(110,18,40,0.5) 100%);
  opacity: 0; transform: scale(0.12);
}

/* une note ne s'anime QUE lorsqu'elle est appelée à écrire (JS), une seule fois */
.ink-note.is-writing .hw   { animation: handwrite var(--dur, 16s) linear forwards; }
.ink-note.is-writing .blot { animation: bloom var(--dur, 16s) var(--ease) forwards; }
/* éclaboussures satellites */
.ink-note .blot::before, .ink-note .blot::after {
  content: ""; position: absolute; border-radius: 50%; background: inherit; opacity: 0.9;
}
.ink-note .blot::before { width: 26%; height: 24%; top: -16%; left: 26%; }
.ink-note .blot::after  { width: 15%; height: 17%; bottom: -12%; right: 14%; }

/* taille, filtre, teinte et position par défaut propres à chaque note */
.ink-note:nth-child(1) { font-size: clamp(2rem, 5vw, 3.5rem); top: 20%; left: 8%; }
.ink-note:nth-child(1) .blot { filter: url(#ink1); }
.ink-note:nth-child(2) { font-size: clamp(1.8rem, 4.4vw, 3rem); top: 42%; left: 32%; }
.ink-note:nth-child(2) .hw { color: var(--lavender-deep); }
.ink-note:nth-child(2) .blot { filter: url(#ink2); background: radial-gradient(58% 56% at 40% 36%, var(--lavender-deep), #4a3873 70%, rgba(74,56,115,0.45)); }
.ink-note:nth-child(3) { font-size: clamp(2.1rem, 5.4vw, 3.8rem); top: 64%; left: 12%; }
.ink-note:nth-child(3) .blot { filter: url(#ink3); }
.ink-note:nth-child(4) { font-size: clamp(1.7rem, 4vw, 2.7rem); top: 80%; left: 42%; }
.ink-note:nth-child(4) .hw { color: var(--gold); }
.ink-note:nth-child(4) .blot { filter: url(#ink4); background: radial-gradient(58% 54% at 42% 38%, var(--gold), #9c7a2c 72%, rgba(156,122,44,0.4)); }

/* tache et texte partagent la même horloge : ils apparaissent ensemble */
@keyframes bloom {
  0%   { opacity: 0; transform: scale(0.12) rotate(-6deg); }
  25%  { opacity: 0.17; transform: scale(1) rotate(3deg); }
  62%  { opacity: 0.15; transform: scale(1.04) rotate(4deg); }
  78%  { opacity: 0; transform: scale(1.13) rotate(7deg); }
  100% { opacity: 0; transform: scale(1.13) rotate(7deg); }
}
@keyframes handwrite {
  0%   { clip-path: inset(0 100% 0 0); opacity: 0; }
  5%   { opacity: 0.34; }
  25%  { clip-path: inset(0 0% 0 0);   opacity: 0.34; }
  62%  { clip-path: inset(0 0% 0 0);   opacity: 0.34; }
  78%  { clip-path: inset(0 0% 0 0);   opacity: 0; }
  100% { clip-path: inset(0 0% 0 0);   opacity: 0; }
}

.hero__content {
  position: relative; z-index: 2; max-width: var(--container); width: 100%; margin: 0 auto;
}
.hero__eyebrow {
  font-style: italic; font-size: 1rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--silk-deep); margin-bottom: 1.6rem; transition-delay: 0.1s;
}
.hero__title { font-size: clamp(2.8rem, 9vw, 7.2rem); line-height: 0.98; margin-bottom: 1.8rem; color: var(--ink); }
.hero__title--accent > span { font-style: italic; color: var(--silk-deep); }
.hero__title .reveal-line:nth-child(2) > span { transition-delay: 0.12s; }
.hero__title .reveal-line:nth-child(3) > span { transition-delay: 0.24s; }
.hero__lede { max-width: 52ch; font-size: clamp(1.1rem, 1.4vw, 1.32rem); color: var(--ink-soft); transition-delay: 0.45s; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; transition-delay: 0.6s; }

.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  font-style: italic; font-size: 0.9rem; letter-spacing: 0.05em; color: var(--ink-soft);
  transition-delay: 0.8s;
}
.hero__scroll-line { width: 1px; height: 46px; background: linear-gradient(var(--silk-deep), transparent); position: relative; overflow: hidden; }
.hero__scroll-line::after {
  content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%;
  background: var(--cream); animation: thread 2.2s var(--ease) infinite;
}
@keyframes thread { 0% { top: -50%; } 100% { top: 100%; } }

/* ═══════════════════  À LA UNE (carrousel)  ═══════════════════ */
.featured { padding: clamp(4.5rem, 11vh, 8rem) 0; }
.featured__inner { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.featured__inner > .section-tag { margin-bottom: 1.6rem; }

/* carrousel de cartes : carte centrale nette, voisines estompées qui dépassent */
.featured__carousel { position: relative; margin-top: 2.6rem; }
/* fondu progressif sur les bords (au lieu d'une coupure nette).
   Le masque rogne au bord de la boîte : on prévoit donc assez de marge
   basse pour que l'ombre des cartes tienne entièrement dans la zone. */
.featured__viewport {
  overflow: hidden; padding: 1.5rem 0 3.6rem;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.featured__track {
  display: flex; position: relative; gap: clamp(1rem, 2.2vw, 1.7rem);
  transition: transform 0.6s var(--ease); will-change: transform;
}

.slide {
  flex: 0 0 clamp(248px, 58vw, 348px);
  display: flex; flex-direction: column; text-align: left;
  background: var(--cream); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; box-shadow: 0 20px 44px -30px rgba(42, 32, 54, 0.5);
  opacity: 0.4; transform: scale(0.9);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease), box-shadow 0.55s var(--ease);
}
.slide.is-active { opacity: 1; transform: scale(1); box-shadow: 0 28px 54px -30px rgba(42, 32, 54, 0.55); }

.slide__media {
  aspect-ratio: 16 / 10; position: relative; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 120% at 22% 4%, rgba(255, 255, 255, 0.08) 0%, transparent 55%),
    linear-gradient(140deg, #2a2036 0%, #5d1228 58%, #8c1832 100%);
}
.slide__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide__media::after { content: "✒"; font-size: 2.4rem; color: rgba(255, 255, 255, 0.55); }
.slide__media.has-img::after { content: none; }

.slide__body { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.4rem 1.6rem 1.7rem; flex: 1; }
.slide__label { font-style: italic; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--silk-deep); }
.slide__title { font-family: var(--serif); font-weight: 300; font-size: clamp(1.4rem, 2.3vw, 1.9rem); line-height: 1.16; }
.slide__text { color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.slide__cta { margin-top: auto; align-self: flex-start; }
/* en vue publique, un champ vide ne laisse pas de trou (en édition ils restent visibles) */
body:not(.edit-on) .slide__label:empty,
body:not(.edit-on) .slide__text:empty,
body:not(.edit-on) .slide__cta:empty { display: none; }

/* champ image téléversable (formulaires admin) */
.img-field__preview { margin: 0.4rem 0; max-width: 260px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-height: 64px; display: flex; align-items: center; justify-content: center; background: var(--ivory); }
.img-field__preview img { width: 100%; display: block; }
.img-field__empty { color: var(--ink-soft); font-size: 0.85rem; padding: 1rem; opacity: 0.8; }
.img-field__actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.img-field__status { font-size: 0.82rem; color: var(--ink-soft); }

/* vue admin « écrits en live » */
.live-dot { color: #b3123a; font-size: 0.82rem; font-weight: 600; animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 50% { opacity: 0.35; } }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; margin-top: 1.2rem; }
.live-card { background: var(--cream); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.live-card__head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.live-card__who { font-weight: 600; }
.live-card__prop { font-size: 0.8rem; color: var(--ink-soft); }
.live-card__head .badge { margin-left: auto; }
.live-card__text { white-space: pre-wrap; line-height: 1.6; font-family: var(--body); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.8rem; min-height: 80px; max-height: 320px; overflow: auto; }
.live-card__pub { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; padding: 0.5rem 0; border-top: 1px dashed var(--line); }
.live-card__comments { display: flex; flex-direction: column; gap: 0.3rem; }
.live-comment { margin: 0; font-size: 0.85rem; background: rgba(171, 147, 214, 0.14); border-radius: 8px; padding: 0.4rem 0.6rem; }
.live-card__advise { display: flex; gap: 0.4rem; }
.live-card__advise input { flex: 1; }

/* flèches */
.featured__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--cream); color: var(--ink); font-size: 1.5rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 18px 38px -20px rgba(42, 32, 54, 0.5);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.featured__nav:hover { border-color: var(--silk-deep); color: var(--silk-deep); transform: translateY(-50%) scale(1.06); }
.featured__nav--prev { left: clamp(-4px, 1.4vw, 22px); }
.featured__nav--next { right: clamp(-4px, 1.4vw, 22px); }

/* points */
.featured__dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2rem; }
.featured__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ivory-2); border: 1px solid var(--line); cursor: pointer; transition: background 0.3s var(--ease), transform 0.3s var(--ease); }
.featured__dot:hover { background: var(--silk); }
.featured__dot.is-active { background: var(--silk-deep); border-color: var(--silk-deep); transform: scale(1.2); }

@media (max-width: 680px) {
  .featured__nav { display: none; }
  .slide { flex-basis: 80vw; }
}

/* ═══════════════════  ATELIERS  ═══════════════════ */
.ateliers { padding: clamp(4rem, 9vh, 7rem) 0; }
.cards {
  max-width: var(--container); margin: 3.2rem auto 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.card {
  position: relative; padding: 2.3rem 2rem 2.1rem; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--cream), var(--ivory-2));
  border: 1px solid var(--line); overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  transform-style: preserve-3d;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none;
  background: radial-gradient(140px 140px at var(--mx, 50%) var(--my, 0%), rgba(171,147,214,0.22), transparent 70%);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -28px rgba(28,26,36,0.4); }
.card:hover::after { opacity: 1; }
.card--accent { background: linear-gradient(180deg, #2a2733, var(--ink)); color: var(--ivory); border-color: transparent; }
.card--accent .card__index, .card--accent .card__meta li { color: var(--gold); }
.card--accent .card__meta li::before { background: var(--gold); }
.card__index { font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0.2em; color: var(--silk-deep); margin-bottom: 1.4rem; }
.card__title { font-size: 1.6rem; margin-bottom: 0.9rem; }
.card__text { font-size: 1rem; opacity: 0.86; }
.card__meta { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; }
.card__meta li { display: flex; align-items: center; gap: 0.6rem; letter-spacing: 0.01em; opacity: 0.9; }
.card__meta li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--silk-deep); flex: none; }
.ateliers__note {
  text-align: center; margin: 3.2rem auto 0; max-width: 40ch; font-style: italic;
  font-size: 1.15rem; color: var(--silk-deep);
}
.ateliers__cta { text-align: center; margin-top: 1.8rem; }

/* ═══════════════════  DÉROULÉ  ═══════════════════ */
.deroule { padding: clamp(5rem, 11vh, 8rem) 0; background: linear-gradient(180deg, var(--ivory), var(--ivory-2)); }
.steps {
  max-width: var(--container); margin: 3.4rem auto 0; padding: 0 var(--gutter); list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; counter-reset: s;
}
.step { position: relative; padding-top: 2.2rem; border-top: 1px solid var(--line); }
.step__num { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--silk-deep); display: block; margin-bottom: 1rem; }
.step__title { font-size: 1.45rem; margin-bottom: 0.7rem; }
.step__text { font-size: 0.98rem; opacity: 0.84; }
.step:nth-child(2) { transition-delay: 0.08s; }
.step:nth-child(3) { transition-delay: 0.16s; }
.step:nth-child(4) { transition-delay: 0.24s; }

/* ═══════════════════  AGNÈS  ═══════════════════ */
.agnes {
  max-width: var(--container); margin: 0 auto; padding: clamp(6rem, 13vh, 10rem) var(--gutter);
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center;
}
.agnes__portrait {
  position: relative; aspect-ratio: 4/5; border-radius: 200px 200px 18px 18px;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(160deg, var(--ink), var(--ink-soft));
  box-shadow: 0 40px 80px -40px rgba(28,26,36,0.7);
}
.agnes__orb {
  position: absolute; width: 130%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--silk), var(--silk-deep) 40%, transparent 72%);
  filter: blur(8px); opacity: 0.85; animation: float 12s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translate(-6%, -8%) scale(1); } 50% { transform: translate(8%, 6%) scale(1.08); } }
.agnes__initial { position: relative; font-family: var(--serif); font-style: italic; font-size: clamp(5rem, 12vw, 9rem); color: var(--cream); mix-blend-mode: overlay; }
/* Photo optionnelle dans un médaillon (sinon l'initiale et le décor restent) */
.cle-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.agnes__portrait.has-photo .agnes__orb,
.agnes__portrait.has-photo .agnes__initial { display: none; }
.agnes__text .section-title { margin-bottom: 1.6rem; }
.agnes__text p { margin-bottom: 1.2rem; color: var(--ink-soft); }
.agnes__actions { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; margin-top: 0.6rem; }

/* ═══════════════════  CARNET  ═══════════════════ */
.carnet { padding: clamp(5rem, 11vh, 8rem) 0; }
.carnet__grid {
  max-width: var(--container); margin: 3.2rem auto 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.note {
  padding: 2rem 1.9rem; border-radius: var(--radius); background: var(--cream);
  border: 1px solid var(--line); position: relative;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
a.note { text-decoration: none; color: inherit; display: block; }
.note::before { content: "“"; position: absolute; top: 0.4rem; right: 1.2rem; font-family: var(--serif); font-size: 4rem; color: var(--silk); opacity: 0.25; }
.note:hover { transform: translateY(-5px) rotate(-0.4deg); box-shadow: 0 24px 44px -26px rgba(28,26,36,0.34); }
.note--wide { grid-column: span 1; background: linear-gradient(165deg, var(--ivory-2), var(--cream)); }
.note__date { font-style: italic; font-size: 0.85rem; letter-spacing: 0.08em; color: var(--silk-deep); margin-bottom: 1rem; text-transform: uppercase; }
.note__body { font-family: var(--serif); font-size: 1.18rem; line-height: 1.5; }
.note--wide .note__body { font-style: normal; }

.link-underline {
  display: inline-block; font-style: italic; font-size: 1.05rem; position: relative;
  color: var(--silk-deep); padding-bottom: 3px;
}
.link-underline::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--silk-deep); transform: scaleX(0.35); transform-origin: left; transition: transform 0.4s var(--ease); }
.link-underline:hover::after { transform: scaleX(1); }
.link-center { display: block; width: max-content; margin: 3rem auto 0; }

/* ═══════════════════  INSCRIPTION  ═══════════════════ */
.inscription { padding: clamp(6rem, 13vh, 10rem) var(--gutter); background: var(--ink); color: var(--ivory); position: relative; overflow: hidden; }
.inscription::before {
  content: ""; position: absolute; top: -30%; left: 50%; transform: translateX(-50%);
  width: 80vw; height: 80vw; max-width: 900px; max-height: 900px; border-radius: 50%;
  background: radial-gradient(circle, rgba(171,147,214,0.28), transparent 65%); pointer-events: none;
}
.inscription__inner { position: relative; max-width: 640px; margin: 0 auto; text-align: center; }
.inscription .section-tag { color: var(--gold); }
.inscription__title { font-size: clamp(2.2rem, 5.4vw, 4rem); margin-bottom: 1.3rem; }
.inscription__sub { color: rgba(246,241,231,0.78); max-width: 44ch; margin: 0 auto 2.8rem; }

.form { text-align: left; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: block; margin-bottom: 1.1rem; }
.field__label { display: block; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.9rem 1.05rem; border-radius: 12px; font: inherit;
  background: rgba(246,241,231,0.06); border: 1px solid rgba(246,241,231,0.2); color: var(--ivory);
  transition: border-color 0.3s, background 0.3s; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(246,241,231,0.4); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--silk); background: rgba(246,241,231,0.1); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9a86a' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1.1rem center; }
.field select option { background: var(--ink); color: var(--cream); }
.form .btn--solid { margin-top: 0.6rem; background: var(--cream); color: var(--ink); }
.form__status { margin-top: 1rem; text-align: center; font-style: italic; color: var(--gold); min-height: 1.4em; }

/* ═══════════════════  FOOTER  ═══════════════════ */
.footer {
  padding: clamp(2.8rem, 6vh, 4.5rem) var(--gutter) 2.4rem;
  max-width: var(--container); margin: 0 auto;
  display: grid; align-items: center; gap: 1.2rem 2.4rem;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas:
    "brand links social"
    "tag   links social"
    "fine  legal credit";
}
.footer__brand { grid-area: brand; display: flex; align-items: center; gap: 0.5rem; font-family: var(--serif); font-size: 1.4rem; }
.footer__tag { grid-area: tag; font-style: italic; color: var(--silk-deep); letter-spacing: 0.04em; }
.footer__links { grid-area: links; justify-self: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4rem; }
.footer__links a { font-size: 0.94rem; opacity: 0.8; position: relative; transition: opacity 0.3s; }
.footer__links a:hover { opacity: 1; }
.footer__fine { grid-area: fine; font-size: 0.82rem; color: var(--ink-soft); opacity: 0.6; line-height: 1.6; padding-top: 1.2rem; border-top: 1px solid var(--line); }

/* réseaux sociaux */
.footer__social { grid-area: social; justify-self: end; display: flex; gap: 0.6rem; }
.footer__social-link {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--line); color: var(--ink-soft);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.footer__social-link:hover { color: var(--silk-deep); border-color: var(--silk-deep); transform: translateY(-2px); }

/* liens légaux */
.footer__legal { grid-area: legal; justify-self: center; display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: center; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.footer__legal a { font-size: 0.82rem; color: var(--ink-soft); opacity: 0.8; transition: opacity 0.3s, color 0.3s; }
.footer__legal a:hover { opacity: 1; color: var(--silk-deep); }

/* crédit discret */
.footer__credit { grid-area: credit; justify-self: end; font-size: 0.78rem; color: var(--ink-soft); opacity: 0.7; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.footer__credit-link { color: var(--silk-deep); font-weight: 600; opacity: 1; }
.footer__credit-link:hover { text-decoration: underline; }

/* pied de page large -> empilé sur mobile */
@media (max-width: 760px) {
  .footer {
    grid-template-columns: 1fr;
    grid-template-areas: "brand" "tag" "links" "social" "fine" "legal" "credit";
    justify-items: center; text-align: center; gap: 1rem;
  }
  .footer__brand, .footer__tag, .footer__links, .footer__social, .footer__legal, .footer__credit { justify-self: center; }
  .footer__fine { text-align: center; border-top: none; padding-top: 0.6rem; }
  .footer__legal, .footer__credit { border-top: none; padding-top: 0; }
}

/* ═══════════════════  RESPONSIVE  ═══════════════════ */
@media (max-width: 980px) {
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.6rem; }
  .carnet__grid { grid-template-columns: 1fr 1fr; }
  .note--wide { grid-column: span 2; }
  .agnes { grid-template-columns: 1fr; text-align: center; }
  .agnes__portrait { max-width: 320px; margin: 0 auto; }
  .agnes__actions { justify-content: center; }
  .agnes .link-underline { margin: 0 auto; }
}
@media (max-width: 680px) {
  .nav__links { position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px); flex-direction: column; justify-content: center; align-items: flex-start; gap: 1.8rem; padding: 0 2.4rem; background: var(--cream); box-shadow: -20px 0 60px -20px rgba(28,26,36,0.4); transform: translateX(110%); transition: transform 0.5s var(--ease); }
  .nav.is-open .nav__links { transform: none; }
  .nav__links a { font-size: 1.3rem; font-family: var(--serif); }
  .nav__burger { display: flex; z-index: 51; }
  .steps { grid-template-columns: 1fr; }
  .carnet__grid { grid-template-columns: 1fr; }
  .note--wide { grid-column: span 1; }
  .form__row { grid-template-columns: 1fr; }

  /* hero : on aère et on désencombre le fond manuscrit */
  /* padding bas = espace réservé à « Entrer dans les mots » (positionné en
     absolu en bas) pour qu'il ne chevauche plus les boutons sur petit écran */
  .hero { padding-top: 6rem; padding-bottom: 8.5rem; }
  .hero__scroll { bottom: 1.4rem; font-size: 0.82rem; }
  .hero__scroll-line { height: 34px; }
  .hero__actions { gap: 0.7rem; }
  .hero__actions .btn { flex: 1 1 auto; }
  /* on ne garde que deux notes (tache + texte), plus petites */
  .ink-note:nth-child(1) { font-size: 1.9rem; }
  .ink-note:nth-child(3) { font-size: 2.1rem; }
  .ink-note:nth-child(2), .ink-note:nth-child(4) { display: none; }
}
@media (max-width: 400px) {
  .hero__title { font-size: clamp(2.4rem, 13vw, 3.2rem); }
}
