/* =========================================================
   Portfolio — Papi, dev web freelance
   Style : créatif / coloré, inspiration "syntaxe de code"
   ========================================================= */

:root {
  --bg: #fbf7f0;
  --bg-warm: #f4ecdd;
  --ink: #16130f;
  --ink-soft: #55504a;

  /* accents "syntaxe" */
  --magenta: #ff2e88;
  --violet: #7c3aed;
  --cyan: #06b6d4;
  --lime: #a3e635;
  --amber: #fbbf24;
  --coral: #ff6b3d;

  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1140px;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  background: rgba(251, 247, 240, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(22,19,15,0.08);
}
.nav__logo {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem;
  display: inline-flex; align-items: center; gap: 8px; letter-spacing: -0.5px;
}
.nav__dot { width: 11px; height: 11px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 0 4px rgba(255,46,136,0.18); }
.nav__blink { color: var(--magenta); animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { font-size: 0.92rem; font-weight: 500; color: var(--ink-soft); transition: color 0.2s; }
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  background: var(--ink); color: var(--bg) !important;
  padding: 9px 18px; border-radius: 999px; font-weight: 600 !important;
  transition: transform 0.15s, background 0.2s;
}
.nav__cta:hover { transform: translateY(-2px); background: var(--magenta); }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__burger span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: 0.3s; }
.nav__burger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; top: 64px; left: 0; right: 0; z-index: 99;
  background: var(--bg); border-bottom: 1px solid rgba(22,19,15,0.1);
  display: flex; flex-direction: column; padding: 12px 24px 20px;
  transform: translateY(-120%); transition: transform 0.3s ease;
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a { padding: 12px 0; font-weight: 600; border-bottom: 1px solid rgba(22,19,15,0.06); }

/* ---------- HERO ---------- */
.hero { position: relative; padding: 150px 0 90px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: -20%; right: -10%; width: 55vw; height: 55vw; max-width: 640px; max-height: 640px;
  background: radial-gradient(circle at 30% 30%, var(--magenta), transparent 62%),
              radial-gradient(circle at 70% 70%, var(--violet), transparent 60%);
  filter: blur(10px); opacity: 0.16; border-radius: 50%; z-index: 0;
}
.hero::after {
  content: ""; position: absolute; bottom: -25%; left: -12%; width: 45vw; height: 45vw; max-width: 520px; max-height: 520px;
  background: radial-gradient(circle, var(--cyan), transparent 62%); filter: blur(10px); opacity: 0.14; border-radius: 50%; z-index: 0;
}
.hero__inner { position: relative; z-index: 1; }

.hero__eyebrow { font-family: var(--font-mono); font-size: 0.86rem; color: var(--ink-soft); margin-bottom: 22px; }
.hero__prompt { color: var(--violet); font-weight: 700; }

.hero__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.3rem, 6.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.02em;
  max-width: 14ch;
}
.hero__title em { font-style: normal; color: var(--violet); }
.hero__title mark {
  background: linear-gradient(180deg, transparent 55%, var(--amber) 55%);
  color: inherit; padding: 0 4px;
}

.hero__lead { margin-top: 26px; font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--ink-soft); max-width: 52ch; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__stats { display: flex; gap: 40px; margin-top: 54px; flex-wrap: wrap; }
.hero__stats div { display: flex; flex-direction: column; }
.hero__stats strong { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; line-height: 1; }
.hero__stats span { font-size: 0.82rem; color: var(--ink-soft); margin-top: 4px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.95rem; padding: 13px 24px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { transform: translateY(-2px); background: var(--magenta); box-shadow: 0 10px 24px rgba(255,46,136,0.32); }
.btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { transform: translateY(-2px); background: var(--ink); color: var(--bg); }
.btn--block { width: 100%; }

/* ---------- SECTIONS ---------- */
.section { padding: 90px 0; }
.section__head { margin-bottom: 46px; max-width: 640px; }
.section__tag { font-family: var(--font-mono); font-size: 0.8rem; color: var(--magenta); font-weight: 700; letter-spacing: 0.02em; }
.section__title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(1.8rem, 4vw, 2.9rem); line-height: 1.05; margin-top: 12px;
}
.section__sub { margin-top: 14px; color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- WORK GRID ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }

.card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-warm); border: 1px solid rgba(22,19,15,0.08);
  display: flex; flex-direction: column; transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(22,19,15,0.14); }

.card__shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #241c2e; }
.card__shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.card:hover .card__shot img { transform: scale(1.05); }
.card__num {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  background: rgba(0,0,0,0.55); color: #fff; padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(4px);
}
.card__live {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em;
  background: var(--lime); color: #16130f; padding: 5px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
}
.card__live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #16130f; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card__cat { font-family: var(--font-mono); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.card__title { font-family: var(--font-display); font-weight: 700; font-size: 1.32rem; margin: 8px 0 8px; letter-spacing: -0.01em; }
.card__desc { font-size: 0.92rem; color: var(--ink-soft); flex: 1; }
.card__tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 18px; }
.card__tag { font-family: var(--font-mono); font-size: 0.7rem; padding: 4px 9px; border-radius: 999px; background: rgba(22,19,15,0.06); color: var(--ink-soft); }
.card__cta { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; color: var(--ink); align-self: flex-start; }
.card__cta span { transition: transform 0.2s; }
.card:hover .card__cta span { transform: translate(4px, -4px); }

/* colored top accent per card */
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; z-index: 3; background: var(--accent, var(--magenta)); }

/* ---------- SKILLS ---------- */
.skills__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.skill {
  background: var(--bg-warm); border: 1px solid rgba(22,19,15,0.08); border-radius: var(--radius);
  padding: 20px 18px; transition: transform 0.2s, border-color 0.2s;
}
.skill:hover { transform: translateY(-4px); border-color: var(--sk, var(--cyan)); }
.skill__ico { width: 34px; height: 34px; border-radius: 9px; background: var(--sk, var(--cyan)); display: grid; place-items: center; font-size: 1.05rem; margin-bottom: 12px; }
.skill__name { font-weight: 700; font-size: 0.98rem; }
.skill__desc { font-size: 0.8rem; color: var(--ink-soft); margin-top: 2px; }

/* ---------- ABOUT ---------- */
.about__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.about__text .section__title { margin: 12px 0 20px; }
.about__text p { color: var(--ink-soft); margin-bottom: 16px; max-width: 52ch; }
.about__text .btn { margin-top: 10px; }

.about__card { border-radius: var(--radius-lg); overflow: hidden; background: #1c1626; box-shadow: 0 24px 50px rgba(28,22,38,0.4); }
.about__card-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; background: #241c2e; }
.about__win { width: 12px; height: 12px; border-radius: 50%; background: #4a4055; }
.about__win:nth-child(1) { background: var(--coral); }
.about__win:nth-child(2) { background: var(--amber); }
.about__win:nth-child(3) { background: var(--lime); }
.about__file { margin-left: 8px; font-family: var(--font-mono); font-size: 0.78rem; color: #9b90a8; }
.about__code { padding: 22px 22px 26px; overflow-x: auto; }
.about__code code { font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.9; color: #e7dff0; white-space: pre; }
.c-key { color: #ff6bb3; } .c-var { color: #7dd3fc; } .c-prop { color: #c4b5fd; }
.c-str { color: #bef264; } .c-bool { color: #fbbf24; }

/* ---------- CONTACT ---------- */
.contact { background: var(--ink); color: var(--bg); border-radius: 40px; margin: 0 16px 40px; }
.contact__inner { text-align: center; padding: 30px 0 10px; }
.contact .section__tag { color: var(--amber); }
.contact__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5vw, 3.2rem); margin: 14px 0 10px; letter-spacing: -0.02em; }
.contact__sub { color: rgba(251,247,240,0.7); max-width: 46ch; margin: 0 auto 38px; }

.contact__form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 560px; margin: 0 auto; text-align: left; }
.field { display: flex; flex-direction: column; }
.field--full { grid-column: 1 / -1; }
.field label { font-family: var(--font-mono); font-size: 0.76rem; margin-bottom: 7px; color: rgba(251,247,240,0.65); }
.field input, .field textarea {
  background: rgba(251,247,240,0.06); border: 1px solid rgba(251,247,240,0.16); border-radius: 12px;
  padding: 12px 14px; color: var(--bg); font-family: var(--font-body); font-size: 0.95rem; transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--magenta); }
.field textarea { resize: vertical; }
.contact__form .btn { grid-column: 1 / -1; background: var(--magenta); color: #fff; }
.contact__form .btn:hover { background: var(--amber); color: var(--ink); box-shadow: 0 10px 24px rgba(251,191,36,0.3); }
.contact__note { grid-column: 1 / -1; text-align: center; font-size: 0.86rem; margin-top: 4px; min-height: 20px; }
.contact__note.ok { color: var(--lime); }
.contact__note.err { color: var(--coral); }

.contact__direct { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; padding-bottom: 10px; }
.contact__chip { font-family: var(--font-mono); font-size: 0.85rem; padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(251,247,240,0.2); transition: background 0.2s, color 0.2s; }
.contact__chip:hover { background: var(--bg); color: var(--ink); }

/* ---------- FOOTER ---------- */
.footer { padding: 30px 0 40px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer__logo { font-family: var(--font-mono); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.footer__copy { font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .about__inner { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .contact__form { grid-template-columns: 1fr; }
  .hero__stats { gap: 28px; }
  .contact { margin: 0 8px 30px; border-radius: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- BOUTON WHATSAPP FLOTTANT ---------- */
.wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(37,211,102,0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: wa-pop 0.4s ease both;
}
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: #25d366; z-index: -1;
  animation: wa-ring 2s ease-out infinite;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 10px 28px rgba(37,211,102,0.6); }
.wa-float svg { display: block; }

@keyframes wa-pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes wa-ring {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.8); opacity: 0; }
}

@media (max-width: 720px) {
  .wa-float { bottom: 18px; right: 18px; width: 54px; height: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-float, .wa-float::before { animation: none; }
}
