/* =========================================================
   Kim Cuddle — carnet d'atelier fleuri
   ========================================================= */

/* Police Loveline */
@font-face {
  font-family: "Loveline";
  src: url("../fonts/Loveline.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #ece3d2;
  --paper: #fbf6ec;
  --paper-2: #f4ecdd;
  --ink: #3a332d;
  --ink-soft: #6b6058;
  --line: #e2d4bd;
  --violet: #8a63b8;
  --violet-deep: #5d3f86;
  --lavender: #d8c7ee;
  --lavender-soft: #efe6f8;
  --leaf: #5f7d3c;
  --leaf-soft: #b9cf8a;
  --yellow: #f2bb3c;

  --script: "Loveline", "Dancing Script", cursive;
  --hand: "Caveat", cursive;
  --body: "Nunito", system-ui, sans-serif;

  --wobbly: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 330px 0 140px;
  background: var(--noise), radial-gradient(1200px 600px at 10% 0%, #f1ead9 0%, transparent 60%), var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.06rem;
  line-height: 1.7;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: var(--violet-deep); }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0 0 1em; }

.script { font-family: var(--script); font-weight: 400; }

.kicker {
  font-family: var(--hand);
  font-size: 1.45rem;
  color: var(--violet);
  margin: 0 0 .1em;
  transform: rotate(-2deg);
  display: inline-block;
}

h2.script {
  font-size: clamp(2.6rem, 5vw, 4rem);
  color: var(--ink);
  margin: .12em 0 .45em;
  line-height: 1.15;
}

/* ---------- La feuille ---------- */
.sheet {
  position: relative;
  width: min(1100px, calc(100% - 200px));
  margin: 0 auto;
  padding: 36px 96px 170px 76px;
  background: var(--noise), var(--paper);
  border-radius: 6px;
  box-shadow:
    0 1px 0 #fff inset,
    0 2px 3px rgba(70, 50, 30, .08),
    0 24px 60px -20px rgba(70, 50, 30, .28);
}

/* marge rose façon cahier */
.sheet::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 44px;
  width: 2px;
  background: rgba(184, 150, 214, .35);
}

section { position: relative; padding: 70px 0; }

/* ---------- Croco (photos détourées) ----------
   Repères à l'échelle d'affichage (tête 380 px de large) :
   bord du lit = 309 px, centre du bras = 342 px, bas du moignon = 364 px */
.croco {
  position: absolute;
  z-index: 6;
  width: 380px;
  top: -309px;
  right: -28px;
  pointer-events: none;
}
.croco__head {
  position: relative;
  transform-origin: 342px 364px;
  will-change: transform;
}
.croco__head img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 12px rgba(70, 45, 20, .22));
}
.croco__pupil-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.croco__bob,
.hand {
  animation: idle 1.1s infinite;
}

@keyframes idle {
  0%   { transform: translateY(0);   animation-timing-function: steps(1, end); }
  50%  { transform: translateY(4px); animation-timing-function: steps(1, end); }
  100% { transform: translateY(0); }
}

.croco__note {
  position: absolute;
  top: 40px;
  left: -170px;
  margin: 0;
  font-family: var(--hand);
  font-size: 1.35rem;
  color: var(--ink-soft);
  transform: rotate(-6deg);
  white-space: nowrap;
}
.croco__note::after {
  content: "";
  position: absolute;
  right: -46px; top: 18px;
  width: 42px; height: 24px;
  border-top: 2px solid var(--ink-soft);
  border-right: 2px solid transparent;
  border-radius: 50% 50% 0 0;
  transform: rotate(18deg);
  opacity: .7;
}

/* le bras : une tuile photo qui se répète jusqu'à la main */
.croco-arm {
  position: absolute;
  z-index: 5;
  top: 25px;
  bottom: 144px;
  right: -28px;
  width: 76px;
  background: url("../images/croco/bras.webp") center top / 76px auto repeat-y;
  filter: drop-shadow(4px 8px 8px rgba(70, 45, 20, .18));
}
/* volume du tube : ombre sur les côtés, reflet doux au milieu */
.croco-arm::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 16px; right: 14px;
  border-radius: 20px;
  background: linear-gradient(90deg,
    rgba(60, 35, 10, .28), rgba(60, 35, 10, 0) 30%,
    rgba(255, 240, 200, .18) 45%, rgba(255, 240, 200, 0) 62%,
    rgba(60, 35, 10, .3));
}

/* ---------- Main + réseaux ----------
   Le poignet (pivot) est à 150 px du bas de la feuille.
   En arrivant en bas de page, la main tourne vers la gauche
   et les icônes flottent au-dessus de la paume. */
.hand {
  position: absolute;
  z-index: 7;
  right: -50px;
  bottom: -166px;
  width: 115px;
  height: 340px;
}
.hand__img {
  position: absolute;
  z-index: 2;
  top: 0; left: 0;
  width: 115px;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(3px 8px 8px rgba(70, 45, 20, .22));
  transform-origin: 55px 24px;
  transition: transform .9s cubic-bezier(.34, 1.4, .64, 1);
}
/* coude arrondi : visible quand le poignet a tourné */
.hand__elbow {
  position: absolute;
  z-index: 1;
  left: 14.3px;
  top: 26.4px;
  width: 65.1px;
  height: auto;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}
.hand.is-turned .hand__elbow { opacity: 1; transition-delay: .35s; }
.hand.is-turned .hand__img { transform: translate(-40.7px, 46.7px) rotate(90deg); }

.socials {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 10px;
}
.socials a {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: var(--paper);
  background: var(--violet-deep);
  box-shadow: 0 6px 12px -4px rgba(60, 35, 90, .45);
  transition: transform .25s, background .25s;
}
.socials a:hover, .socials a:focus-visible {
  background: var(--violet);
  transform: scale(1.12) rotate(-8deg);
}
.socials a:focus-visible { outline: 3px dashed var(--violet); outline-offset: 3px; }
.socials svg { width: 22px; height: 22px; }

/* icônes flottantes au-dessus de la main tournée */
.hand__socials {
  position: absolute;
  z-index: 3;
  left: -236px;
  top: -34px;
  gap: 12px;
  pointer-events: none;
}
.hand__socials li {
  opacity: 0;
  translate: 0 18px;
  transition: opacity .5s, translate .6s cubic-bezier(.34, 1.56, .64, 1);
}
.hand.is-turned .hand__socials { pointer-events: auto; }
.hand.is-turned .hand__socials li {
  opacity: 1;
  translate: 0 0;
  transition-delay: calc(.7s + var(--i) * .12s);
}
.hand.is-turned .hand__socials li a { animation: float 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.8s); }
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

.socials--inline { display: none; }

/* ---------- Lierre ---------- */
.vine {
  position: absolute;
  pointer-events: none;
  overflow: visible;
  z-index: 2;
}
.vine path.vine__stem { fill: none; stroke: #6a7f44; stroke-width: 2.4; stroke-linecap: round; }
.vine--top { top: -18px; left: -34px; width: 340px; }
.vine--wide { left: -40px; right: -40px; bottom: -10px; width: calc(100% + 80px); }
.vine--form { bottom: -70px; left: -70px; width: 240px; transform: scaleY(-1); }
.vine--footer { position: static; display: block; width: 260px; margin: 0 0 -6px -20px; }

/* lierre (image) posé en coin : le L enveloppe le coin bas-gauche */
.ivy-corner {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(60, 80, 30, .18));
}
.ivy-corner--about { width: 230px; left: -62px; bottom: -58px; }
.ivy-corner--memo { width: 150px; left: -64px; bottom: -58px; }

/* ---------- Header ---------- */
.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 28px;
  padding-left: 40px;
  padding-right: 280px;
}
@media (max-width: 1280px) { .topbar { padding-right: 180px; } }
.brand-mini {
  font-family: var(--script);
  font-size: 1.7rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  background: linear-gradient(var(--lavender), var(--lavender)) 0 88% / 0 40% no-repeat;
  transition: background-size .25s;
}
.nav a:hover { background-size: 100% 40%; color: var(--ink); }
.nav__cta { color: var(--violet-deep) !important; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: .75em 1.5em;
  font: 800 1rem var(--body);
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: var(--wobbly);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.btn--primary {
  background: var(--violet-deep);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--lavender);
}
.btn:hover { transform: translate(-2px, -2px); }
.btn--primary:hover { box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:focus-visible { outline: 3px dashed var(--violet); outline-offset: 4px; }

/* ---------- Hero ---------- */
.hero { padding: 90px 0 60px 40px; }
.hero__title {
  font-size: clamp(4.5rem, 11vw, 8.5rem);
  color: var(--violet-deep);
  margin: .12em 0 .15em;
  line-height: 1.05;
  text-shadow: 3px 3px 0 var(--lavender);
}
.hero__lead { max-width: 34em; font-size: 1.18rem; color: var(--ink-soft); }
.hero__lead strong { color: var(--ink); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin: 30px 0 56px; }

.facts {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 760px;
}
.facts li {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .45);
  line-height: 1.2;
  color: var(--ink-soft);
  font-size: .92rem;
}
.facts__big {
  font-family: var(--hand);
  font-size: 2rem;
  font-weight: 700;
  color: var(--violet-deep);
  order: 2;
}

.stitch {
  height: 2px;
  margin: 0 0 0 40px;
  background: repeating-linear-gradient(90deg, var(--line) 0 14px, transparent 14px 24px);
}

/* ---------- Polaroids & scotch ---------- */
.polaroid {
  position: relative;
  margin: 0;
  padding: 12px 12px 0;
  background: #fffdf8;
  box-shadow: 0 2px 4px rgba(60, 40, 20, .1), 0 18px 30px -14px rgba(60, 40, 20, .35);
  transform: rotate(var(--r, 0deg));
  transition: transform .3s;
}
.polaroid:hover { transform: rotate(0deg) scale(1.03); z-index: 4; }
.polaroid figcaption {
  font-family: var(--hand);
  font-size: 1.35rem;
  text-align: center;
  line-height: 1.2;
  padding: 12px 6px 16px;
  color: var(--ink-soft);
}
.polaroid__photo {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--paper-2);
}
.polaroid__photo img { width: 100%; height: 100%; object-fit: cover; }
.polaroid__photo.is-empty img { display: none; }
.polaroid__photo.is-empty {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(138, 99, 184, .06) 12px 24px),
    var(--lavender-soft);
}
.polaroid__photo.is-empty::after {
  content: "📷 " attr(data-label);
  font-family: var(--hand);
  font-size: 1.3rem;
  color: var(--violet);
}

.tape {
  position: absolute;
  z-index: 3;
  top: -14px;
  left: 50%;
  width: 96px;
  height: 28px;
  margin-left: -48px;
  background: rgba(216, 199, 238, .75);
  transform: rotate(-4deg);
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 50%);
}

/* ---------- À propos ---------- */
.about {
  display: grid;
  grid-template-columns: 1.25fr .9fr;
  gap: 70px;
  align-items: center;
  padding-left: 40px;
}
.about__text p { max-width: 32em; }
.signature {
  font-size: 2.6rem;
  color: var(--violet-deep);
  transform: rotate(-4deg);
  display: inline-block;
  margin-top: .2em;
}
.polaroid--about { max-width: 340px; justify-self: center; }

/* ---------- Titres de section ---------- */
.heading { padding-left: 40px; margin-bottom: 26px; }

/* ---------- Étapes ---------- */
.steps__list {
  list-style: none;
  margin: 0; padding: 0 0 0 40px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.note {
  position: relative;
  padding: 26px 20px 18px;
  background:
    repeating-linear-gradient(transparent 0 27px, rgba(138, 99, 184, .14) 27px 28px),
    #fffdf7;
  box-shadow: 0 12px 22px -14px rgba(60, 40, 20, .4);
  transform: rotate(var(--r, 0deg));
}
.note h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: .5em; }
.note p { font-size: .95rem; color: var(--ink-soft); margin: 0; }
.note__num {
  position: absolute;
  top: -20px; left: 14px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  font-family: var(--hand);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--paper);
  background: var(--violet);
  border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%;
}

/* ---------- Tarifs ---------- */
.tape-measure {
  position: relative;
  margin: 0 0 40px 40px;
  height: 34px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 10px 2px;
  font-family: var(--hand);
  font-size: 1.1rem;
  color: var(--ink);
  background:
    repeating-linear-gradient(90deg, rgba(58, 51, 45, .55) 0 1px, transparent 1px 10px) 0 0 / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, rgba(58, 51, 45, .7) 0 2px, transparent 2px 50px) 0 0 / 100% 14px no-repeat,
    #f7e3a0;
  border-radius: 3px;
  transform: rotate(-.6deg);
  box-shadow: 0 6px 12px -8px rgba(60, 40, 20, .5);
}
.pricing__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  padding-left: 40px;
}
.card {
  position: relative;
  padding: 34px 24px 22px;
  background: #fffdf8;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 16px 28px -18px rgba(60, 40, 20, .45);
  transform: rotate(var(--r, 0deg));
}
.card h3 { font-size: 1.25rem; font-weight: 800; }
.card .card__price {
  font-family: var(--hand);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--violet-deep);
  margin: .15em 0 .4em;
  line-height: 1.1;
}
.card p { color: var(--ink-soft); font-size: .96rem; }
.card__delay {
  display: inline-block;
  margin: 0;
  padding: 2px 12px;
  border-radius: 99px;
  background: #e5eed3;
  color: #4a6130 !important;
  font-weight: 700;
  font-size: .85rem !important;
}
.card--featured { background: var(--lavender-soft); border-color: var(--lavender); }
.card__badge {
  position: absolute;
  top: 8px; right: 14px;
  margin: 0;
  font-family: var(--hand);
  font-size: 1.2rem;
  color: var(--violet) !important;
  transform: rotate(6deg);
}
.pricing__note {
  padding-left: 40px;
  margin-top: 30px;
  font-family: var(--hand);
  font-size: 1.3rem;
  color: var(--ink-soft);
}

/* ---------- Lestées ---------- */
.weighted {
  display: grid;
  grid-template-columns: 1.3fr .8fr;
  gap: 60px;
  align-items: center;
  padding-left: 40px;
}
.weighted__text p { max-width: 32em; }
.memo {
  position: relative;
  padding: 36px 28px 24px;
  background:
    repeating-linear-gradient(transparent 0 29px, rgba(95, 125, 60, .16) 29px 30px),
    #f8f4e3;
  box-shadow: 0 18px 30px -18px rgba(60, 40, 20, .45);
  transform: rotate(var(--r, 0deg));
}
.memo__title { font-family: var(--hand); font-size: 1.8rem; font-weight: 700; color: var(--leaf); margin-bottom: .2em; }
.memo ul { margin: 0 0 1em; padding: 0; list-style: none; font-family: var(--hand); font-size: 1.35rem; line-height: 1.45; }
.memo li::before { content: "✿ "; color: var(--violet); }
.memo__small { font-size: .8rem; color: var(--ink-soft); margin: 0; line-height: 1.4; }

/* ---------- Galerie ---------- */
.gallery { padding-bottom: 110px; }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px;
  padding-left: 40px;
}
.gallery__grid .polaroid:nth-child(2) { margin-top: 50px; }

/* ---------- Devis ---------- */
.quote__form {
  position: relative;
  margin-left: 40px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  padding: 44px 44px 36px;
  background: var(--noise), #fffdf8;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 22px 40px -24px rgba(60, 40, 20, .45);
}
.field { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend {
  font-family: var(--hand);
  font-size: 1.35rem;
  color: var(--ink);
  padding: 0;
}
.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  font: 1rem var(--body);
  color: var(--ink);
  padding: 8px 2px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  transition: border-color .2s;
}
.field textarea {
  resize: vertical;
  line-height: 32px;
  padding: 0 2px;
  background: repeating-linear-gradient(transparent 0 31px, var(--line) 31px 32px);
  border-bottom: 0;
}
.field input::placeholder, .field textarea::placeholder { color: #b3a79a; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--violet);
}
.field input[type="file"] {
  font: .95rem var(--body);
  padding: 12px;
  border: 2px dashed var(--lavender);
  border-radius: 10px;
  background: var(--lavender-soft);
  color: var(--ink-soft);
}
.choices { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 8px; }
.choices label { font-family: var(--body); font-size: 1rem; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.choices input { accent-color: var(--violet-deep); width: 18px; height: 18px; }
.quote__submit { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 8px; }
.quote__status { margin: 0; font-family: var(--hand); font-size: 1.35rem; color: var(--leaf); }

/* ---------- Footer ---------- */
.footer {
  position: static;
  padding: 50px 0 0 40px;
  min-height: 250px;
}
.footer__brand { font-size: 2.8rem; color: var(--violet-deep); margin: 0; }
.footer__line { color: var(--ink-soft); font-size: .92rem; }

/* ---------- Apparition au scroll ---------- */
.js .reveal { opacity: 0; translate: 0 24px; transition: opacity .7s ease, translate .7s ease; }
.js .reveal.is-in { opacity: 1; translate: 0 0; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .steps__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 26px; }
  .gallery__grid { gap: 28px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 420px; }
}

@media (max-width: 959px) {
  body { padding-top: 230px; padding-bottom: 40px; }
  .sheet { width: calc(100% - 24px); padding: 28px 20px 48px; }
  .sheet::before { left: 12px; }
  .croco { width: 250px; top: -203px; right: 8px; }
  .croco__head { transform-origin: 225px 240px; }
  .croco__note, .croco-arm, .hand { display: none; }
  .topbar { padding: 0 0 0 10px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .nav { gap: 14px; }
  .hero, .about, .weighted, .heading, .steps__list, .pricing__cards, .gallery__grid, .pricing__note, .footer { padding-left: 10px; }
  .stitch, .tape-measure, .quote__form { margin-left: 10px; }
  .about, .weighted, .pricing__cards { grid-template-columns: 1fr; gap: 40px; }
  .quote__form { grid-template-columns: 1fr; padding: 34px 20px 28px; }
  .vine--top { width: 220px; left: -20px; }
  .ivy-corner--about { width: 170px; left: -40px; bottom: -40px; }
  .ivy-corner--memo { width: 130px; }
  .vine--form { width: 150px; left: -30px; bottom: -50px; }
  .socials--inline { display: flex; margin-top: 10px; }
  .hero { padding-top: 50px; }
  .footer { padding-top: 40px; }
  .vine--footer { display: none; }
}

@media (max-width: 560px) {
  section { padding: 50px 0; }
  .steps__list, .gallery__grid { grid-template-columns: 1fr; }
  .gallery__grid .polaroid:nth-child(2) { margin-top: 0; }
  .gallery__grid .polaroid { max-width: 320px; justify-self: center; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .croco__bob, .hand, .hand.is-turned .hand__socials li a { animation: none; }
  .hand__img, .hand__elbow, .hand__socials li { transition: none !important; }
  .js .reveal { opacity: 1; translate: none; transition: none; }
}
