:root {
  --ink: #1d1c1a;
  --green: #53695e;
  --orange: #e58a00;
  --paper: #fbf9f4;
  --cream: #f0e8dc;
  --line: #cfc6b8;
  --width: 12%;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}
body {
  margin: 0;
  font-family: Montserrat, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
header {
  position: sticky;
  top: 0;
  background: rgb(251 249 244/0.84);
  -webkit-backdrop-filter: blur(12px) saturate(115%);
  backdrop-filter: blur(12px) saturate(115%);
  padding: 18px var(--width);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  border-bottom: 1px solid rgb(29 28 26/0.07);
  box-shadow: 0px 5px 20px rgb(29 28 26/0.07);
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.brand img {
  display: block;
  width: auto;
  height: 74px;
  max-width: 270px;
  margin: 0;
}
nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
nav a {
  font-size: 13px;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  position: relative;
  display: inline-block;
}
nav a::after {
  content: "";
  position: absolute;

  left: -4%;
  bottom: -10px;

  width: 108%;
  height: 12px;

  background-image: url("assets/trait-crayon-orange-godren.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;

  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;

  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.15s ease;

  pointer-events: none;
}
@media (max-width: 900px) {
  nav a::after {
    display: none;
  }
}

/* Dessin de gauche à droite */
nav a:hover::after,
nav a:focus-visible::after,
nav a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
}
section {
  padding: 96px max(var(--width), 24px);
  overflow: hidden;
}
h1,
h2 {
  font-family: Fredoka, Arial, sans-serif;
  line-height: 1.02;
  letter-spacing: -0.025em;
}
h1 {
  font-size: clamp(54px, 8vw, 100px);
  margin: 0.2em 0;
  text-shadow: 0px 10px 10px rgb(29 28 26/0.2);
}
h2 {
  font-size: clamp(42px, 6vw, 70px);
  max-width: 1000px;
  text-shadow: 0px 10px 10px rgb(29 28 26/0.2);
}
em {
  color: var(--green);
  font-style: normal;
}
.hero {
  min-height: calc(100vh - 200px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 5vw;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;

  /* Débordement nécessaire après la rotation */
  inset: -12%;
  z-index: 0;

  background-image: url("assets/filigrane.svg");
  background-repeat: repeat;
  background-position: center top;
  background-size: 240px auto;

  /* Inclinaison de tout le pattern */
  transform: rotate(10deg) scale(1.1);
  transform-origin: center;

  /* Intensité générale */
  opacity: 0.035;

  /* Disparition progressive vers le bas */
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 25%,
    rgb(0 0 0 / 70%) 55%,
    transparent 90%
  );

  mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 25%,
    rgb(0 0 0 / 70%) 55%,
    transparent 90%
  );

  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 760px) {
  .hero::before {
    inset: -8%;
    background-size: 180px auto;
    transform: rotate(-5deg) scale(1.12);
    opacity: 0.025;
  }
}

.avatar-frame {
  position: relative;
  background: var(--cream);
  border: 1px solid rgb(29 28 26/0.07);
  border-radius: 42% 58% 54% 46%/47% 43% 57% 53%;
  box-shadow: 0 22px 38px rgb(29 28 26/0.14);
  animation: avatar-blob 8s ease-in-out infinite;
  overflow: visible;
}
.hero-frame {
  width: min(600px, 48vw);
  padding: 99px;
  justify-self: center;
}
.heroavatar {
  position: relative;
  z-index: 1;
  display: block;
  width: 88%;
  max-height: 480px;
  margin: auto;
  height: auto;
  object-fit: contain;
  overflow: visible;
}
.hero p {
  max-width: 600px;
}
.hero div.goal {
  max-width: 600px;
  display: flex;
  align-items: center;
}
.hero div {
  display: inline-block;
}
.hero div.dot {
  width: 5px;
  height: 5px;
  margin: 0 20px;
  border-radius: 100%;
  background-color: var(--orange);
}
.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  margin-top: 15px;
  font: inherit;
  cursor: pointer;
  transition: all 0.4s ease;
}
.btn:hover {
  transform: translateY(-2px);
  background: var(--green);
  box-shadow: 0px 5px 20px rgb(29 28 26/0.25);
}

.green {
  background: var(--green);
  color: var(--paper);
}
.green em {
  color: #ffd36b;
}
.orange {
  background: var(--orange);
  color: var(--ink);
}
.orange em {
  color: var(--paper);
}
.cream {
  background: var(--cream);
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 35px;
}
.grid article {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  min-width: 0;
  min-height: 190px;
  transition: all 0.4s ease;
}
.grid article:hover {
  transform: translateY(-5px);
  box-shadow: 0px 5px 20px rgb(29 28 26/0.25);
}
.green .grid article {
  border-color: rgb(255 255 255/0.38);
  background: rgb(255 255 255/0.07);
}
.grid b {
  font-size: 22px;
  display: block;
  margin-top: 12px;
}
.cream .grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.placeholders article {
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  font-weight: bold;
  min-height: 280px;
}
.placeholders article:nth-child(2) {
  background: var(--orange);
  color: var(--ink);
}
.placeholders article:nth-child(3) {
  background: #d7d1c6;
  color: var(--ink);
}
.section-frame {
  width: 172px;
  height: 172px;
  float: right;
  margin: 0 0 30px 40px;
  padding: 27px;
  animation-duration: 7s;
  animation-direction: reverse;
}
.section-avatar {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  overflow: visible;
}
.card-icon {
  float: right;
  display: block;
  width: 62px;
  height: 62px;
  object-fit: contain;
  margin: 0 0 14px 20px;
}
@keyframes avatar-blob {
  0%,
  100% {
    border-radius: 43% 57% 61% 39%/48% 42% 58% 52%;
  }
  50% {
    border-radius: 58% 42% 45% 55%/40% 59% 41% 60%;
  }
}
form {
  max-width: 650px;
  display: grid;
  gap: 14px;
}
label {
  display: grid;
  gap: 5px;
  font-size: 14px;
  font-weight: 700;
}
input,
select,
textarea {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: 1px solid #bbb;
  font: inherit;
  background: white;
  color: var(--ink);
}
textarea {
  min-height: 160px;
  resize: vertical;
}
.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.form-submit:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}
#feedback {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 1.6em;
  margin: 12px 0 0;
  padding: 12px 16px;
  border-radius: 22px;
  background: rgb(251 249 244/0.45);
  font-weight: 700;
}
#feedback[hidden] {
  display: none;
}
.feedback-avatar {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  padding: 8px;
  object-fit: contain;
  background: var(--cream);
  border-radius: 44% 56% 58% 42%/48% 43% 57% 52%;
  box-shadow: 0 8px 16px rgb(29 28 26/0.12);
}
.feedback-text {
  margin: 0;
}
#feedback.success {
  color: #244b3e;
}
#feedback.error {
  color: #7a241c;
}
footer {
  padding: 35px var(--width);
  background: #111;
  color: #aaa;
  font-size: 12px;
}
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 0.75s ease,
    transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.from-right {
  transform: translateX(34px);
}
.reveal.is-visible {
  opacity: 1;
  transform: translate(0);
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .reveal.from-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .grid article {
    transition: none;
  }
  .avatar-frame {
    animation: none;
  }
}
@media (max-width: 1050px) {
  nav {
    gap: 12px;
  }
  .grid,
  .cream .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
  }
}
@media (max-width: 900px) {
  header {
    align-items: center;
  }
  .brand img {
    height: 66px;
  }
  .menu-toggle {
    display: grid;
    width: 48px;
    height: 48px;
    padding: 11px;
    border: 1px solid rgb(29 28 26/0.14);
    border-radius: 16px;
    background: rgb(240 232 220/0.78);
    place-content: center;
    gap: 5px;
    cursor: pointer;
    z-index: 2;
  }
  .menu-toggle span {
    display: block;
    width: 23px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
    transition:
      transform 0.28s ease,
      opacity 0.2s ease;
  }
  .menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  .menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 5%;
    right: 5%;
    max-width: none;
    padding: 14px;
    background: rgb(251 249 244/0.94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgb(29 28 26/0.08);
    border-radius: 0 0 24px 24px;
    box-shadow: 0 18px 36px rgb(29 28 26/0.12);
    display: grid;
    gap: 3px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
      opacity 0.25s ease,
      transform 0.25s ease,
      visibility 0.25s;
  }
  .menu-open nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  nav a {
    padding: 10px 14px;
    border-radius: 12px;
  }
  nav a:hover,
  nav a:focus-visible {
    background: var(--cream);
  }
  nav a::after {
    display: none;
  }
  .hero-frame {
    width: min(480px, 47vw);
    padding: 83px;
  }
}
@media (max-width: 760px) {
  html {
    scroll-padding-top: 92px;
  }
  header {
    padding: 12px 24px;
  }
  .brand img {
    height: 58px;
  }
  .menu-toggle {
    width: 46px;
    height: 46px;
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 58px;
  }
  .grid,
  .cream .grid {
    grid-template-columns: 1fr;
  }
  .hero-frame {
    width: min(400px, 90vw);
    margin-top: 35px;
    padding: 74px;
  }
  section {
    padding: 68px 24px;
  }
  .section-frame {
    width: 136px;
    height: 136px;
    margin-left: 22px;
    padding: 21px;
  }
  .grid article {
    min-height: 0;
  }
  .card-icon {
    width: 56px;
    height: 56px;
  }
}
@media (max-width: 420px) {
  h1 {
    font-size: clamp(46px, 15vw, 64px);
  }
  h2 {
    font-size: clamp(36px, 12vw, 50px);
  }
  section {
    padding-inline: 18px;
  }
  .section-frame {
    float: none;
    margin: 0 0 24px;
    width: 118px;
    height: 118px;
  }
  .brand img {
    max-width: 205px;
  }
  .btn {
    width: 100%;
    text-align: center;
  }
  .placeholders article {
    min-height: 210px;
  }
}

.pencil-underline {
  position: relative;
  display: inline-block;
  color: inherit;
  z-index: 0;
}

.pencil-underline::after {
  content: "";
  position: absolute;
  z-index: -1;

  left: -3%;
  bottom: -0.25em;

  width: 106%;
  height: 0.32em;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 26' preserveAspectRatio='none'%3E%3Cpath d='M6 17 Q100 5 194 15' fill='none' stroke='%23E58D00' stroke-width='8' stroke-linecap='round'/%3E%3Cpath d='M10 20 Q102 10 190 17' fill='none' stroke='%23E58D00' stroke-width='3' stroke-linecap='round' opacity='.4'/%3E%3C/svg%3E");

  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;

  transform: rotate(-1deg);
  pointer-events: none;
}

/* Boutons de contact */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 32px;
}

.contact-links .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-height: 48px;
  max-width: 100%;
  margin-top: 0;
  padding: 12px 20px;

  text-align: center;
  line-height: 1.4;
}

.contact-links .btn-instagram {
  background: transparent;
  color: #1a1a1a;
  border: 1px solid currentColor;
}

.contact-links .btn-instagram:hover {
  background: #1a1a1a;
  color: #f2ece5;
}

/* Le pictogramme prend automatiquement la couleur du texte */
.instagram-icon {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

.contact-links .btn:focus-visible {
  outline: 3px solid #1a1a1a;
  outline-offset: 4px;
}

/* Information réservée aux lecteurs d’écran */
.contact-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .contact-links {
    flex-direction: column;
  }

  .contact-links .btn {
    width: 100%;
  }
}
