/* ============================================================
   portfolio-motion.css — ajouts animés SANS changer le design
   Palette du site d'origine (Bodoni/DM Mono · paper/ink/coral).
   Ce fichier s'ajoute APRÈS portfolio-v4.css et ne le réécrit pas.
   ============================================================ */

/* ---------- 1. Barre de progression de lecture ---------- */
.read-progress {
  position: fixed;
  z-index: 200;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--accent);
  pointer-events: none;
}

/* ---------- 2. Révélations au scroll (UNE seule variante, discrète) ---------- */
[data-rv] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity .5s cubic-bezier(.16, 1, .3, 1),
    transform .5s cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
[data-rv="fade"]   { transform: none; }
[data-rv="left"]   { transform: translate3d(0, 18px, 0); }
[data-rv="right"]  { transform: translate3d(0, 18px, 0); }
[data-rv="scale"]  { transform: translate3d(0, 18px, 0); }
[data-rv="blur"]   { transform: translate3d(0, 18px, 0); }
[data-rv="mask"]   { transform: translate3d(0, 18px, 0); }
[data-rv].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 3. Nom du hero : révélation ligne par ligne (masque) ---------- */
.hero-name .ln {
  display: block;
  overflow: hidden;
  padding-bottom: .03em;
  color: inherit; font-style: normal; font-weight: inherit;
}
.hero-name .ln > span {
  display: block;
  color: inherit; font-style: normal;
  transform: translate3d(0, 112%, 0);
  transition: transform 1.05s cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--d, 0s);
  will-change: transform;
}
.hero-name .ln:nth-child(2) > span {
  font-weight: 400;
}
.hero-name.is-in .ln > span { transform: none; }

/* ---------- 4. Portrait : anneau conique rotatif (rappel du site « aurora ») ---------- */
.portrait-stage {
  position: relative;
  isolation: isolate;
  opacity: 1;
  transition: opacity 1s cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--d, 0s);
  /* la parallaxe (--px) pilote le translate : ne pas la surcharger ici */
  transform: translate3d(0, var(--px, 0px), 0);
  will-change: transform, opacity;
}
body.preload .portrait-stage { opacity: 0; }
/* le caption passe au-dessus du cadre (z-index:1) */
.portrait-caption { z-index: 3; }
.portrait-ring {
  position: absolute;
  z-index: 0;
  inset: -13px;
  padding: 2px;                     /* épaisseur de l'anneau */
  border-radius: 3px;
  background: var(--accent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 1.1s ease .35s;
}
.is-in .portrait-ring, .portrait-stage.is-in .portrait-ring { opacity: .95; }

.portrait-frame {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--paper-deep);
}
.portrait-frame img {
  transition: transform 1.2s cubic-bezier(.16, 1, .3, 1);
  transform: scale(1.02);
}
.portrait-stage:hover .portrait-frame img { transform: scale(1.06); }

/* halo doux et STATIQUE derrière le portrait (plus de pulsation) */
.portrait-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 6% 4% 10% 4%;
  background: radial-gradient(60% 55% at 50% 40%, rgba(76, 155, 232, .22), transparent 70%);
  filter: blur(28px);
  opacity: .55;
  pointer-events: none;
}

/* ---------- 5. Micro-interactions sur les cards (lift + accent) ----------
   NB : la propriété `transition` reste portée par [data-rv] (voir §2),
   qui couvre opacity + transform + box-shadow. Ici on ne définit que
   les VALEURS au survol, pour que le reveal et le hover ne se brouillent pas. */
.work-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 44px rgba(19, 26, 51, .16);
}
.capability:hover { transform: translateY(-5px); }
.practice-row:hover { background: rgba(255, 255, 255, .55); }
.presence:hover, .session:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 34px rgba(19, 26, 51, .15);
}
.case-data > div:hover { transform: translateY(-4px); }

/* ---------- 6. Titres de section : soulignement accent (statique) ---------- */
.section-heading { position: relative; }
.section-heading::after {
  content: "";
  position: absolute;
  left: 0; bottom: -.4rem;
  width: 4.5rem; height: 2px;
  background: var(--accent);
}

/* ---------- 7. Liens fléchés : la flèche glisse au survol ---------- */
.arrow-link { transition: transform .4s cubic-bezier(.16, 1, .3, 1), color .3s ease; }
.arrow-link:hover { transform: translateX(4px); }

/* ---------- 8. Entrée du hero en cascade (au chargement) ---------- */
.hero-top, .hero-statement, .hero-security-track,
.hero-secondary-note, .hero-actions, .hero-ledger, .portrait-caption {
  transition:
    opacity .5s cubic-bezier(.16, 1, .3, 1),
    transform .5s cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--d, 0s);
}
body.preload .hero-top,
body.preload .hero-statement,
body.preload .hero-security-track,
body.preload .hero-secondary-note,
body.preload .hero-actions,
body.preload .hero-ledger,
body.preload .portrait-caption {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}

/* ---------- 9. Curseur personnalisé discret (souris fine uniquement) ---------- */
@media (hover: hover) and (pointer: fine) {
  .work-card, .capability, .arrow-link, .practice-row { cursor: pointer; }
}

/* ---------- 10. Photo de profil : bords arrondis ---------- */
.portrait-frame { border-radius: 16px; overflow: hidden; }
.portrait-ring { border-radius: 20px; }
.portrait-dossier::before { border-radius: 18px; }

/* ---------- 11. Formulaire contact : carte papier éditoriale ---------- */
.contact-form {
  max-width: 42rem;
  margin-top: 2.5rem;
  padding: 2.1rem 2.2rem 2.3rem;
  color: var(--ink);
  background: var(--paper-soft);
  border: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: 10px 10px 0 rgba(19, 26, 51, .16);
}
.form-row { gap: 1.1rem; }
.form-field { margin-bottom: 1.15rem; }
.form-field > span { color: var(--ink-soft); }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: .8rem .95rem;
  font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #98a3bd; }
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--ink);
  background: #ffffff;
  box-shadow: 3px 3px 0 rgba(19, 26, 51, .14);
  outline: none;
}
.contact-form input:focus-visible,
.contact-form textarea:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
.contact-form textarea { min-height: 8.5rem; }
.form-submit {
  margin-top: .35rem;
  padding: .9rem 1.8rem;
  color: var(--paper-soft);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: 4px 4px 0 rgba(19, 26, 51, .18);
  transition: background .22s ease, color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.form-submit:hover {
  color: #ffffff;
  background: var(--coral);
  border-color: var(--coral);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(19, 26, 51, .22);
}
.form-submit:active { transform: translate(0, 0); box-shadow: 2px 2px 0 rgba(19, 26, 51, .2); }
.form-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: 4px 4px 0 rgba(19, 26, 51, .18); }
.form-status {
  display: inline-block;
  margin-top: 1.15rem;
  padding: .5rem .85rem;
  color: var(--ink);
  background: var(--acid);
  border: 1px solid var(--ink);
  border-radius: 0;
  font: 500 .74rem/1.4 var(--mono);
  letter-spacing: .04em;
}
.form-status.ok { color: var(--ink); background: var(--acid); }
.form-status.err { color: var(--paper-soft); background: var(--ink); }

/* ---------- 11ter. Icônes SVG (remplacent les emojis) ---------- */
.ico { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; }
.ico svg { width: 100%; height: 100%; }
.practice-row .ico { margin-top: .1rem; }
.practice-row .ico svg { stroke: var(--acid); }

/* ---------- 11bis. Consentement RGPD (case à cocher) ---------- */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin: .35rem 0 1.15rem;
  color: var(--ink-soft);
  font: 400 .82rem/1.45 var(--body);
  cursor: pointer;
}
.form-consent input {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: .12rem;
  accent-color: var(--accent);
}
.form-consent a { color: var(--accent-deep); text-decoration: underline; }
.form-consent a:hover { text-decoration: none; }
@media (max-width: 760px) {
  .contact-form { padding: 1.5rem 1.2rem 1.7rem; box-shadow: 6px 6px 0 rgba(19, 26, 51, .16); }
}

/* ---------- 12. Expérience mobile ---------- */
@media (max-width: 760px) {
  /* anti défilement horizontal : clip double + fallback iOS + rubber-band */
  html {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    scroll-padding-top: 5.2rem;
  }
  @supports (overflow: clip) {
    html, body { overflow-x: clip; }
  }
  body { text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
  a, button { touch-action: manipulation; }

  /* reveals : plus de translation horizontale (source du scroll parasite) */
  [data-rv="left"], [data-rv="right"] { transform: translate3d(0, 26px, 0); }
  /* glow du portrait : pas de débordement horizontal */
  .portrait-stage::after { inset: -14% 0; }

  /* header collant + fond flouté */
  .site-header {
    position: sticky;
    z-index: 60;
    top: 0;
    padding-top: env(safe-area-inset-top);
    background: rgba(238, 240, 232, .92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  /* hamburger → croix */
  .menu-toggle { position: relative; transition: background .25s ease, color .25s ease; }
  .menu-toggle span { transition: transform .32s cubic-bezier(.16, 1, .3, 1), opacity .2s ease; }
  .menu-toggle[aria-expanded="true"] { color: var(--paper-soft); background: var(--ink); }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

  /* panneau plein écran, liens display en cascade */
  .nav-links {
    display: flex;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity .3s ease, transform .35s cubic-bezier(.16, 1, .3, 1), visibility 0s linear .35s;
    top: 100%;
    justify-content: flex-start;
    height: calc(100vh - 4.7rem);
    height: calc(100dvh - 4.7rem);
    padding-top: 1.1rem;
    padding-bottom: calc(1.2rem + env(safe-area-inset-bottom));
    background: var(--paper);
  }
  .nav-links.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s;
  }
  .nav-links a {
    padding: 1rem 0;
    font: 500 clamp(1.65rem, 7vw, 2.2rem)/1 var(--display);
    letter-spacing: -.03em;
    text-transform: none;
    opacity: 0;
    transform: translate3d(0, 14px, 0);
    transition: opacity .4s ease, transform .45s cubic-bezier(.16, 1, .3, 1), color .18s ease;
  }
  .nav-links.open a { opacity: 1; transform: none; }
  .nav-links.open a:nth-child(1) { transition-delay: .05s; }
  .nav-links.open a:nth-child(2) { transition-delay: .11s; }
  .nav-links.open a:nth-child(3) { transition-delay: .17s; }
  .nav-links.open a:nth-child(4) { transition-delay: .23s; }
  .mobile-nav-contact { color: var(--coral); }

  /* verrouillage du scroll + fond d'écran cliquable pour fermer */
  body.menu-open { overflow: hidden; }
  body.menu-open::after {
    content: "";
    position: fixed;
    z-index: 40;
    inset: 0;
    top: 4.7rem;
    padding-top: env(safe-area-inset-top);
    background: rgba(12, 10, 24, .5);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }

  /* cibles tactiles */
  .arrow-link { padding-block: .4rem; }
  .work-card, .capability, .presence, .session { transition: transform .18s ease; }
  .work-card:active, .capability:active, .presence:active, .session:active,
  .contact-nav:active, .form-submit:active { transform: scale(.985); }

  /* hero & sections : densité plus confortable */
  .work-card { min-height: 0; padding-bottom: 2.2rem; }
  .case-phone { justify-self: center; }
  .case-hero h1 { font-size: clamp(3rem, 13vw, 4.2rem); }
  .form-submit { width: 100%; justify-content: center; }
  .footer { padding-bottom: calc(1.35rem + env(safe-area-inset-bottom)); }
}

/* tactile : neutraliser les hover "collants" (le :active fait le feedback) */
@media (hover: none) {
  .work-card:hover, .capability:hover, .presence:hover, .session:hover,
  .method-list li:hover, .case-data > div:hover { transform: none; box-shadow: none; }
  .practice-row:hover { transform: none; background: none; }
  .arrow-link:hover { gap: .5rem; color: inherit; }
  .contact-nav:hover { background: var(--ink); transform: none; }
  .form-submit:hover { color: var(--paper-soft); background: var(--ink); transform: none; box-shadow: 4px 4px 0 rgba(19, 26, 51, .18); }
}

/* ---------- 13. Accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-rv],
  .hero-name .ln > span,
  body.preload .hero-top,
  body.preload .hero-statement,
  body.preload .hero-security-track,
  body.preload .hero-secondary-note,
  body.preload .hero-actions,
  body.preload .hero-ledger,
  body.preload .portrait-caption {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
    transition: none !important;
  }
  .portrait-ring { animation: none; opacity: .95; }
  .portrait-stage::after { animation: none; }
  .section-heading::after { transform: scaleX(1); transition: none; }
  .read-progress { display: none; }
  .work-card:hover, .capability:hover, .practice-row:hover,
  .presence:hover, .session:hover, .method-list li:hover,
  .case-data > div:hover { transform: none; }
}

