/* ==========================================================================
   Guilhem Bomont-Latouche · site personnel
   Deux thèmes : « encre & washi » (clair) · « sakura de nuit » (sombre)
   ========================================================================== */

:root {
  --font-titre: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  --font-corps: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  --nav-h: 68px;
  --radius: 14px;
  --transition: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F3EC;
  --bg-soft: #F0EAE0;
  --surface: #FCFAF5;
  --ink: #26211B;
  --ink-soft: #5D564C;
  --accent: #B4333C;
  --accent-contrast: #FDFBF7;
  --accent-soft: rgba(180, 51, 60, 0.07);
  --sakura: #EFB9C6;
  --sakura-soft: rgba(233, 183, 195, 0.22);
  --line: rgba(38, 33, 27, 0.16);
  --branch: #4A3226;
  --sun: #C23A43;
  --petal-1: #F2C3CF;
  --petal-2: #E9A9BA;
  --petal-3: #F8DCE3;
  --shadow: 0 14px 40px rgba(87, 63, 45, 0.10);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12141C;
  --bg-soft: #171A24;
  --surface: #1B1F2B;
  --ink: #EDE8E0;
  --ink-soft: #A3A8B4;
  --accent: #E8A0B4;
  --accent-contrast: #1A1218;
  --accent-soft: rgba(232, 160, 180, 0.10);
  --sakura: #C98CA0;
  --sakura-soft: rgba(201, 140, 160, 0.14);
  --line: rgba(237, 232, 224, 0.15);
  --branch: #454A5C;
  --sun: #8C2733;
  --petal-1: #E3A4B6;
  --petal-2: #C98CA0;
  --petal-3: #F0C4D0;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
}

body {
  margin: 0;
  font-family: var(--font-corps);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  transition: background-color var(--transition), color var(--transition);
}

/* grain washi : voile fixe, hors interactions */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 {
  font-family: var(--font-titre);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); }

img { max-width: 100%; display: block; }

::selection { background: var(--sakura); color: #26211B; }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-titre);
  font-size: 1.15rem;
  font-weight: 600;
}

.nav-mark { width: 26px; height: 26px; }
.mark-petals { fill: var(--sakura); transition: fill var(--transition); }
.mark-heart { fill: var(--accent); transition: fill var(--transition); }

.nav-links {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.3rem 0;
  position: relative;
  transition: color var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: right var(--transition);
}

.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }

.nav-actions { display: flex; align-items: center; gap: 0.6rem; }

.theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--transition), transform 0.2s ease;
}

.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle svg { width: 19px; height: 19px; }

:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

.burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.burger span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, top 0.3s ease;
}

.burger span:first-child { top: 15px; }
.burger span:last-child { top: 22px; }

body.menu-ouvert .burger span:first-child { top: 18.5px; transform: rotate(45deg); }
body.menu-ouvert .burger span:last-child { top: 18.5px; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 2rem) clamp(1.25rem, 6vw, 5rem) 4rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 85% 10%, var(--sakura-soft), transparent 60%),
    var(--bg);
  transition: background-color var(--transition);
}

/* lavis : grandes taches d'encre très diluées, comme un fond aquarelle */
.hero-lavis {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 42% 30% at 10% 80%, color-mix(in srgb, var(--ink) 6%, transparent), transparent 70%),
    radial-gradient(ellipse 55% 42% at 80% 85%, color-mix(in srgb, var(--sakura) 16%, transparent), transparent 72%),
    radial-gradient(ellipse 30% 22% at 32% 16%, color-mix(in srgb, var(--ink) 4%, transparent), transparent 70%),
    radial-gradient(ellipse 20% 16% at 55% 60%, color-mix(in srgb, var(--sakura) 9%, transparent), transparent 75%);
  filter: blur(6px);
  transition: background var(--transition);
}

/* disque soleil « hinomaru » derrière la branche */
.hero-sun {
  position: absolute;
  top: 15%;
  right: 9%;
  width: clamp(280px, 28vw, 440px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sun) 0%, var(--sun) 96%, transparent 100%);
  opacity: 0.92;
  pointer-events: none;
  transition: background var(--transition);
}

#petals {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-branch {
  position: absolute;
  top: 0;
  right: 0;
  width: min(46vw, 620px);
  height: auto;
  pointer-events: none;
  /* pivote autour de son point d'attache (coin haut droit), plié par le vent en JS */
  transform-origin: 96% 2%;
  will-change: transform;
}

/* frémissement propre des fleurs, en plus du vent global */
@media (prefers-reduced-motion: no-preference) {
  .branch-blossoms {
    transform-box: fill-box;
    transform-origin: 90% 10%;
    animation: fremir 5.4s ease-in-out infinite alternate;
  }
}

@keyframes fremir {
  from { transform: rotate(-0.45deg); }
  to { transform: rotate(0.55deg); }
}

.branch-wood {
  stroke: var(--branch);
  filter: url(#encre);
  transition: stroke var(--transition);
}

/* passage de pinceau sec : trait fin, plus clair, bords très froissés */
.branch-dry {
  stroke: var(--branch);
  opacity: 0.38;
  filter: url(#encre-fine);
  transition: stroke var(--transition);
}

.branch-blossoms { filter: url(#encre-fine); }

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.hero-name {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 0.45em;
  animation: lever 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* sceau hanko : cachet rouge à la manière d'une signature d'estampe */
.hanko {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.62em;
  height: 0.62em;
  margin-left: 0.28em;
  vertical-align: 0.08em;
  font-size: 0.62em;
  line-height: 1;
  color: var(--accent-contrast);
  background: var(--accent);
  border-radius: 0.08em;
  transform: rotate(-4deg);
  filter: url(#encre-fine);
  box-shadow: inset 0 0 0.06em rgba(0, 0, 0, 0.18);
  transition: background-color var(--transition), color var(--transition);
}

.hanko::before {
  content: "桜";
  font-size: 0.58em;
  font-family: var(--font-titre);
  font-weight: 600;
}

.hero-sub {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  margin-bottom: 2.2rem;
  animation: lever 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  animation: lever 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both;
}

@keyframes lever {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color var(--transition), color var(--transition);
}

.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-ghost {
  border: 1.5px solid var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 7.5rem) clamp(1.25rem, 4vw, 3rem);
  position: relative;
}

/* filigrane seigaiha (vagues japonaises) derrière le parcours */
#parcours::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--ink);
  opacity: 0.035;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cg fill='none' stroke='%23000' stroke-width='2.6'%3E%3Ccircle cx='0' cy='60' r='26'/%3E%3Ccircle cx='0' cy='60' r='18'/%3E%3Ccircle cx='0' cy='60' r='10'/%3E%3Ccircle cx='60' cy='60' r='26'/%3E%3Ccircle cx='60' cy='60' r='18'/%3E%3Ccircle cx='60' cy='60' r='10'/%3E%3Ccircle cx='120' cy='60' r='26'/%3E%3Ccircle cx='120' cy='60' r='18'/%3E%3Ccircle cx='120' cy='60' r='10'/%3E%3Ccircle cx='30' cy='30' r='26'/%3E%3Ccircle cx='30' cy='30' r='18'/%3E%3Ccircle cx='30' cy='30' r='10'/%3E%3Ccircle cx='90' cy='30' r='26'/%3E%3Ccircle cx='90' cy='30' r='18'/%3E%3Ccircle cx='90' cy='30' r='10'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cg fill='none' stroke='%23000' stroke-width='2.6'%3E%3Ccircle cx='0' cy='60' r='26'/%3E%3Ccircle cx='0' cy='60' r='18'/%3E%3Ccircle cx='0' cy='60' r='10'/%3E%3Ccircle cx='60' cy='60' r='26'/%3E%3Ccircle cx='60' cy='60' r='18'/%3E%3Ccircle cx='60' cy='60' r='10'/%3E%3Ccircle cx='120' cy='60' r='26'/%3E%3Ccircle cx='120' cy='60' r='18'/%3E%3Ccircle cx='120' cy='60' r='10'/%3E%3Ccircle cx='30' cy='30' r='26'/%3E%3Ccircle cx='30' cy='30' r='18'/%3E%3Ccircle cx='30' cy='30' r='10'/%3E%3Ccircle cx='90' cy='30' r='26'/%3E%3Ccircle cx='90' cy='30' r='18'/%3E%3Ccircle cx='90' cy='30' r='10'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  -webkit-mask-size: 120px 60px;
  mask-size: 120px 60px;
}

.section h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  margin-bottom: 2.4rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.55rem;
}

/* trait de pinceau sous les titres : vrai coup de pinceau en masque SVG */
.section h2::after {
  content: "";
  position: absolute;
  left: -2px;
  bottom: 0;
  width: 100%;
  height: 9px;
  background: var(--accent);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 8 C 24 4, 52 10, 84 7 S 148 4, 197 8' stroke='%23000' stroke-width='5.4' fill='none' stroke-linecap='round'/%3E%3Cpath d='M6 10.5 C 40 8, 90 12, 140 9 S 180 7, 194 9.5' stroke='%23000' stroke-width='1.6' fill='none' stroke-linecap='round' opacity='0.75'/%3E%3Cpath d='M10 4.5 C 45 3, 95 6, 150 4.5' stroke='%23000' stroke-width='1.1' fill='none' stroke-linecap='round' opacity='0.55'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 8 C 24 4, 52 10, 84 7 S 148 4, 197 8' stroke='%23000' stroke-width='5.4' fill='none' stroke-linecap='round'/%3E%3Cpath d='M6 10.5 C 40 8, 90 12, 140 9 S 180 7, 194 9.5' stroke='%23000' stroke-width='1.6' fill='none' stroke-linecap='round' opacity='0.75'/%3E%3Cpath d='M10 4.5 C 45 3, 95 6, 150 4.5' stroke='%23000' stroke-width='1.1' fill='none' stroke-linecap='round' opacity='0.55'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  opacity: 0.9;
  transform: scaleX(0) rotate(-0.4deg);
  transform-origin: left center;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.section h2.in-view::after { transform: scaleX(1) rotate(-0.4deg); }

/* apparition au défilement */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delai, 0s);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   À propos
   -------------------------------------------------------------------------- */

.apropos-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.apropos-photo {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 130px 130px var(--radius) var(--radius);
  box-shadow: var(--shadow);
}

.apropos-photo img {
  width: 100%;
  height: auto;
  border-radius: 120px 120px calc(var(--radius) - 6px) calc(var(--radius) - 6px);
}

.apropos-texte p { color: var(--ink-soft); max-width: 62ch; }
.apropos-texte p strong { color: var(--ink); }

/* --------------------------------------------------------------------------
   Parcours (timeline)
   -------------------------------------------------------------------------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* ligne du rouleau « emaki » : trait d'encre irrégulier qui se déroule */
.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 7px;
  background: linear-gradient(to bottom, var(--accent), var(--sakura));
  opacity: 0.55;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 200' preserveAspectRatio='none'%3E%3Cpath d='M7 3 C 4 30, 10 60, 6.5 100 S 9 160, 7 197' stroke='%23000' stroke-width='3.6' fill='none' stroke-linecap='round'/%3E%3Cpath d='M9 20 C 7 70, 10.5 120, 8 180' stroke='%23000' stroke-width='1.1' fill='none' stroke-linecap='round' opacity='0.6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 200' preserveAspectRatio='none'%3E%3Cpath d='M7 3 C 4 30, 10 60, 6.5 100 S 9 160, 7 197' stroke='%23000' stroke-width='3.6' fill='none' stroke-linecap='round'/%3E%3Cpath d='M9 20 C 7 70, 10.5 120, 8 180' stroke='%23000' stroke-width='1.1' fill='none' stroke-linecap='round' opacity='0.6'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.5s cubic-bezier(0.55, 0, 0.35, 1) 0.2s;
}

.timeline.in-view::before { transform: scaleY(1); }

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.6rem;
  padding: 0 0 2.6rem 2.4rem;
}

.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  transition: background-color var(--transition);
}

.tl-annees {
  font-family: var(--font-titre);
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 2px;
}

.tl-corps h3 { font-size: 1.2rem; margin-bottom: 0.25em; }
.tl-corps p { color: var(--ink-soft); max-width: 58ch; }

/* --------------------------------------------------------------------------
   Expériences
   -------------------------------------------------------------------------- */

.carte {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.8rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color var(--transition);
}

.carte:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.carte-finlearn {
  margin-bottom: 1.4rem;
  background: linear-gradient(120deg, var(--accent-soft), transparent 55%), var(--surface);
}

.carte-finlearn p:last-child { max-width: 70ch; }

.carte-entete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.carte h3 { font-size: 1.25rem; margin-bottom: 0.1em; }

.carte-date {
  font-size: 0.85rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.carte-role {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 0.7em;
}

.carte p:not(.carte-role) { color: var(--ink-soft); font-size: 0.98rem; }

.cartes-grille {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}

.aussi {
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.aussi p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0;
}

.aussi strong { color: var(--ink); }

/* --------------------------------------------------------------------------
   Projets & cyber
   -------------------------------------------------------------------------- */

.projets-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.4rem;
  align-items: stretch;
}

.projet-principal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem 2.3rem;
  background-image: radial-gradient(ellipse 70% 50% at 100% 0%, var(--sakura-soft), transparent 65%);
  transition: background-color var(--transition);
}

.projet-principal h3 { font-size: 1.7rem; margin-bottom: 0.1em; }
.projet-principal > p:not(.carte-role) { color: var(--ink-soft); }

.projets-cote {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.ctf-bloc {
  flex: 1;
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
  transition: background-color var(--transition);
}

.ctf-bloc h3 { font-size: 1.15rem; }
.ctf-bloc p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0.5em; }
.ctf-bloc strong { color: var(--ink); }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1.2rem 0;
}

.chips li {
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.chips-sakura { margin: 0.8rem 0 0; }

.chips-sakura li {
  background: var(--sakura-soft);
  border-color: transparent;
  color: var(--ink);
}

.lien-fleche {
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
}

.lien-fleche::after {
  content: " \2192";
  display: inline-block;
  transition: transform 0.25s ease;
}

.lien-fleche:hover::after { transform: translateX(5px); }

/* --------------------------------------------------------------------------
   Au-delà du code
   -------------------------------------------------------------------------- */

.audela-grille {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 1.4rem;
}

.audela-grille > :nth-child(3) { grid-column: 1; }
.audela-grille > :nth-child(2),
.audela-grille > :nth-child(4) { grid-column: 2; }
.audela-grille > :nth-child(1) { grid-row: 1; }
.audela-grille > :nth-child(3) { grid-row: 2; }

.tuile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.8rem;
  transition: background-color var(--transition);
}

.tuile h3 { font-size: 1.15rem; }
.tuile p { color: var(--ink-soft); font-size: 0.98rem; }

.tuile-teintee {
  background: linear-gradient(150deg, var(--sakura-soft), transparent 70%), var(--surface);
  border-color: transparent;
}

.langues { margin: 0; }

.langues div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.42rem 0;
}

.langues div + div { border-top: 1px solid var(--line); }

.langues dt { font-weight: 700; }
.langues dd { margin: 0; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.section-contact {
  text-align: center;
  position: relative;
  padding-bottom: clamp(5rem, 10vw, 8rem);
}

.enso {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  width: min(420px, 80vw);
  stroke: var(--sakura);
  opacity: 0.22;
  filter: url(#encre);
  pointer-events: none;
}

/* le cercle se trace comme un coup de pinceau quand la section apparaît */
@media (prefers-reduced-motion: no-preference) {
  .enso path {
    stroke-dasharray: 450;
    stroke-dashoffset: 450;
    transition: stroke-dashoffset 1.9s cubic-bezier(0.55, 0, 0.35, 1) 0.25s;
  }

  .enso.in-view path { stroke-dashoffset: 0; }
}

.contact-titre {
  font-size: clamp(2.2rem, 5vw, 3.4rem) !important;
}

.section-contact h2::after { display: none; }

.contact-texte {
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0 auto 2rem;
}

.contact-email {
  font-family: var(--font-titre);
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 3px;
  transition: color 0.25s ease;
  overflow-wrap: anywhere;
}

.contact-email:hover { color: var(--accent); }

.contact-liens {
  margin-top: 2.6rem;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
}

.contact-liens a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.contact-liens a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.contact-liens svg { width: 19px; height: 19px; }

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */

.pied {
  border-top: 1px solid var(--line);
  padding: 1.6rem clamp(1.25rem, 4vw, 3rem);
  text-align: center;
}

.pied p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.pied-credit {
  margin-top: 0.3rem !important;
  font-size: 0.75rem !important;
  opacity: 0.75;
}

.pied-credit a { color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .cartes-grille { grid-template-columns: 1fr; }
  .projets-grid { grid-template-columns: 1fr; }
  .aussi { grid-template-columns: 1fr; gap: 1rem; }
  .audela-grille { grid-template-columns: 1fr; }
  .audela-grille > * { grid-column: auto !important; grid-row: auto !important; }
  .hero-branch { width: 64vw; opacity: 0.55; }
  .hero-sun { width: 42vw; opacity: 0.5; }
}

@media (max-width: 768px) {
  .burger { display: block; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 1.5rem 1.2rem;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  }

  body.menu-ouvert .nav-links {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    padding: 0.8rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a:last-child { border-bottom: none; }
  .nav-links a::after { display: none; }

  .apropos-grid { grid-template-columns: 1fr; }
  .apropos-photo {
    position: static;
    width: min(220px, 60vw);
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .contact-liens { flex-wrap: wrap; }
}

/* --------------------------------------------------------------------------
   Mouvement réduit
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-name, .hero-sub, .hero-ctas {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .section h2::after {
    transform: scaleX(1) rotate(-0.4deg);
    transition: none;
  }

  #petals { display: none; }
}
