:root {
  --bg: #FBF6EE;
  --panel: #F4EBDD;
  --panel-2: #FFFFFF;
  --ink: #241F19;
  --muted: #6E6459;
  --line: rgba(36,31,25,0.12);
  --terracotta: #E0653A;
  --gold: #D9A441;
  --sage: #52795E;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}
@media (pointer: coarse) { body { cursor: auto; } }

h1, h2, h3, .brand, nav a, .eyebrow, .ticker span { font-family: 'Archivo', 'Inter', sans-serif; }

h1 { font-weight: 900; letter-spacing: -0.02em; margin: 0; }
h2 { font-weight: 800; letter-spacing: -0.015em; margin: 0 0 0.3em; font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-weight: 700; margin: 0 0 0.4em; font-size: 1.2rem; }
p { color: var(--muted); max-width: 62ch; font-size: 1.05rem; }
a { color: var(--terracotta); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.82rem; font-weight: 700; color: #fff;
  background: var(--sage); padding: 0.4rem 0.9rem; margin-bottom: 1.3rem;
}

.gradient-text {
  background: linear-gradient(100deg, var(--terracotta), var(--gold) 60%, var(--sage));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* --- Curseur custom, plus travaillé --- */
#cursor {
  position: fixed; top: 0; left: 0;
  width: 20px; height: 20px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  transform: translate(-50%, -50%);
  transition: width 0.22s cubic-bezier(.2,.8,.2,1), height 0.22s cubic-bezier(.2,.8,.2,1),
              background 0.22s ease, border-color 0.22s ease;
  display: flex; align-items: center; justify-content: center;
}
#cursor::after {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink);
  transition: opacity 0.2s ease;
}
#cursor span {
  font-size: 0.68rem; font-weight: 700; color: #fff;
  opacity: 0; white-space: nowrap; letter-spacing: 0.02em;
}
#cursor.hovering {
  width: 68px; height: 68px;
  background: var(--terracotta);
  border-color: var(--terracotta);
}
#cursor.hovering::after { opacity: 0; }
#cursor.hovering span { opacity: 1; }
@media (pointer: coarse) { #cursor { display: none; } }

/* --- Ticker --- */
.ticker-wrap { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; background: var(--panel); padding: 0.9rem 0; }
.ticker { display: flex; width: max-content; animation: scroll-left 30s linear infinite; will-change: transform; backface-visibility: hidden; transform: translateZ(0); }
.ticker span { flex: none; font-weight: 800; font-size: 1rem; letter-spacing: 0.02em; padding: 0 1.4rem; white-space: nowrap; color: var(--muted); }
.ticker span.sep { padding: 0 0.9rem; }
.ticker span.hi { color: var(--terracotta); }
@keyframes scroll-left { from { transform: translate3d(0,0,0); } to { transform: translate3d(-33.3333%,0,0); } }
@media (prefers-reduced-motion: reduce) { .ticker { animation: none; } }

/* --- Bannières photo --- */
.img-banner {
  position: relative;
  min-height: 320px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  border-radius: 4px;
  overflow: hidden;
}
.img-banner::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(36,31,25,0) 30%, rgba(36,31,25,0.72) 100%);
}
.img-banner .caption { position: relative; z-index: 1; padding: 1.6rem 2rem; color: #fff; }
.img-banner .caption h3 { color: #fff; margin-bottom: 0.2rem; }
.img-banner .caption p { color: rgba(255,255,255,0.85); margin: 0; font-size: 0.95rem; }
.img-banner .credit { position: absolute; bottom: 0.6rem; right: 0.9rem; z-index: 1; font-size: 0.7rem; color: rgba(255,255,255,0.55); }

/* --- Header --- */
header { position: sticky; top: 0; z-index: 30; background: rgba(251,246,238,0.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1400px; margin: 0 auto; padding: 1.2rem 3rem; display: flex; align-items: center; justify-content: space-between; position: relative; }
.brand { font-weight: 900; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.brand em { color: var(--terracotta); font-style: normal; }
nav ul { list-style: none; display: flex; gap: 2.2rem; margin: 0; padding: 0; }
nav a { text-decoration: none; color: var(--muted); font-size: 0.95rem; font-weight: 600; padding-bottom: 4px; border-bottom: 2px solid transparent; transition: color 0.15s ease, border-color 0.15s ease; }
nav a:hover, nav a.active { color: var(--ink); border-bottom-color: var(--terracotta); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--ink); width: 42px; height: 42px; cursor: none; font-size: 1.2rem; }

/* --- Section shell --- */
.section { position: relative; width: 100%; padding: 4.5rem 3rem; border-top: 1px solid var(--line); overflow: hidden; }
.section:first-of-type { border-top: none; }
.section-inner { max-width: 1400px; margin: 0 auto; position: relative; z-index: 1; }
.section.tinted { background: var(--panel); }

.blob-bg { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.22; z-index: 0; pointer-events: none; }

/* --- Hero --- */
.hero { min-height: 80vh; display: flex; align-items: center; padding: 3rem; position: relative; }
.hero-inner { max-width: 1400px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 2rem; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.8rem, 6.5vw, 5.2rem); line-height: 1; }
.hero .lead { font-size: 1.2rem; color: var(--ink); opacity: 0.85; margin-top: 1.3rem; }

/* --- Photo frame organique --- */
.photo-frame {
  width: 100%; max-width: 380px; aspect-ratio: 1; justify-self: center; margin: 0 auto; position: relative;
  background: linear-gradient(135deg, var(--terracotta), var(--gold));
  border-radius: 42% 58% 65% 35% / 45% 45% 55% 55%;
  animation: morph 9s ease-in-out infinite;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.photo-frame span { font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 5rem; color: rgba(255,255,255,0.55); }
@keyframes morph {
  0%, 100% { border-radius: 42% 58% 65% 35% / 45% 45% 55% 55%; }
  33% { border-radius: 65% 35% 40% 60% / 55% 65% 35% 45%; }
  66% { border-radius: 35% 65% 55% 45% / 40% 45% 55% 60%; }
}
@media (prefers-reduced-motion: reduce) { .photo-frame { animation: none; } }

.btn-row { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--ink); color: var(--bg); text-decoration: none; padding: 0.9rem 1.8rem; font-weight: 800; font-size: 1rem; border: 2px solid var(--ink); }
.btn:hover { background: transparent; color: var(--ink); }
.btn-outline { display: inline-block; background: transparent; color: var(--ink); text-decoration: none; padding: 0.9rem 1.8rem; font-weight: 700; font-size: 1rem; border: 2px solid var(--line); }
.btn-outline:hover { border-color: var(--terracotta); color: var(--terracotta); }

/* --- Stats --- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat .num { font-family: 'Archivo', sans-serif; font-weight: 900; font-size: clamp(2.4rem, 4.6vw, 3.6rem); color: var(--terracotta); line-height: 1; display: block; }
.stat .label { color: var(--muted); font-size: 0.93rem; margin-top: 0.4rem; }

/* --- Grids / tilt cards --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }

.tilt-card {
  border: 1px solid var(--line); background: var(--panel-2); padding: 1.8rem;
  transform-style: preserve-3d; transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  will-change: transform; box-shadow: 0 1px 2px rgba(36,31,25,0.04);
}
.tilt-card:hover { border-color: var(--terracotta); box-shadow: 0 12px 30px rgba(36,31,25,0.08); }

/* --- Timeline --- */
.timeline { position: relative; padding-left: 3rem; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--terracotta), var(--gold)); }
.timeline-item { position: relative; padding-bottom: 2.8rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -3rem; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 3px solid var(--terracotta); }
.timeline-date { display: inline-block; font-size: 0.85rem; font-weight: 800; color: #fff; background: var(--terracotta); padding: 0.25rem 0.7rem; margin-bottom: 0.5rem; }

/* --- Skill tiles --- */
.skill-tile { border: 1px solid var(--line); background: var(--panel-2); padding: 1.2rem 1.4rem; cursor: none; transition: border-color 0.15s ease, box-shadow 0.2s ease; }
.skill-tile:hover, .skill-tile.open { border-color: var(--terracotta); box-shadow: 0 8px 22px rgba(36,31,25,0.07); }
.skill-tile .row { display: flex; align-items: center; justify-content: space-between; }
.skill-tile h3 { margin: 0; font-size: 1.02rem; }
.skill-tile .plus { font-size: 1.4rem; color: var(--terracotta); transition: transform 0.2s ease; }
.skill-tile.open .plus { transform: rotate(45deg); }
.skill-tile .detail { max-height: 0; overflow: hidden; color: var(--muted); font-size: 0.94rem; transition: max-height 0.25s ease, margin-top 0.25s ease; }
.skill-tile.open .detail { max-height: 220px; margin-top: 0.7rem; }

/* --- Tags (centres d'intérêt, langues) --- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tag-chip { font-size: 0.9rem; font-weight: 600; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); padding: 0.5rem 1rem; border-radius: 20px; }

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

/* --- Contact --- */
form { display: flex; flex-direction: column; gap: 1.1rem; max-width: 520px; }
label { font-size: 0.85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
input, textarea { font-family: inherit; font-size: 1.05rem; padding: 0.8rem 0.9rem; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); }
input:focus, textarea:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; }

footer { border-top: 1px solid var(--line); padding: 2.2rem 3rem; text-align: center; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 900px) {
  .header-inner { padding: 1.1rem 1.5rem; }
  .section { padding: 3.5rem 1.5rem; }
  .hero { padding: 2rem 1.5rem; min-height: unset; }
  .hero-inner { grid-template-columns: 1fr; }
  .photo-frame { order: -1; max-width: 240px; }
  .grid-2, .grid-3, .grid-4, .grid-6, .stats { grid-template-columns: 1fr 1fr; }
  .menu-btn { display: block; }
  nav ul { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--panel); border-bottom: 1px solid var(--line); padding: 1.2rem 1.5rem; gap: 1rem; }
  nav ul.open { display: flex; }
}
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4, .grid-6, .stats { grid-template-columns: 1fr; } }
