/* Bandeau 3D de la future accueil (shortcode [oaka_hero_3d]) — tokens de la charte oaka, tout est préfixé .oaka-hero3d */

@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('sora-latin.woff2') format('woff2');
}

.oaka-hero3d {
  --h3d-orange-500: #FF8300;
  --h3d-orange-700: #CD5116;
  --h3d-orange-300: #FFA452;
  --h3d-ink-950: #080605;
  --h3d-ink-700: #4A423B;
  --h3d-ink-500: #8E8378;
  --h3d-ink-300: #CFC7BD;
  --h3d-ink-200: #E5DFD7;
  --h3d-white: #FFFFFF;
  --h3d-gradient-ticbox: linear-gradient(90deg, #FF8300 0%, #E66A0B 19%, #CD5116 40%, #C2461B 100%);
  --h3d-font-display: 'Sora', system-ui, sans-serif;
  --h3d-font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --h3d-font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color: var(--h3d-ink-950);
  font-family: var(--h3d-font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.oaka-hero3d *, .oaka-hero3d *::before, .oaka-hero3d *::after { box-sizing: border-box; }

.oaka-hero3d .h3d-eyebrow-row { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; }
.oaka-hero3d .h3d-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--h3d-orange-500); box-shadow: 0 0 0 4px rgba(255,131,0,0.18); }
.oaka-hero3d .h3d-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--h3d-orange-700); }

.oaka-hero3d .h3d-title {
  font-family: var(--h3d-font-display);
  font-size: clamp(40px, 5.8vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--h3d-ink-950);
  margin: 0;
  padding: 0;
  max-width: 13ch;
  text-wrap: balance;
}
.oaka-hero3d .h3d-title em {
  font-style: normal;
  background: var(--h3d-gradient-ticbox);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.oaka-hero3d .h3d-lead-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.oaka-hero3d .h3d-lead-row .h3d-meta { justify-self: end; max-width: 340px; margin-bottom: 56px; } /* un peu remonté par rapport au bas des boutons */
.oaka-hero3d .h3d-title + .h3d-lead { margin-top: 24px; }
.oaka-hero3d .h3d-lead-row > * { min-width: 0; }
.oaka-hero3d .h3d-lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--h3d-ink-700); max-width: 34em; margin: 0; padding: 0; text-wrap: pretty; }
.oaka-hero3d .h3d-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.oaka-hero3d .h3d-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--h3d-font-body); font-weight: 600; font-size: 15px; line-height: 1;
  padding: 15px 26px; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: box-shadow 200ms cubic-bezier(0.2,0.7,0.2,1), border-color 200ms;
}
.oaka-hero3d .h3d-btn:focus-visible { outline: 3px solid var(--h3d-orange-300); outline-offset: 2px; }
.oaka-hero3d .h3d-btn-primary { background: var(--h3d-gradient-ticbox); color: var(--h3d-white); }
.oaka-hero3d .h3d-btn-primary:hover { color: var(--h3d-white); filter: brightness(1.08); }
.oaka-hero3d .h3d-btn-outline { background: transparent; color: var(--h3d-ink-950); border-color: var(--h3d-ink-300); }
.oaka-hero3d .h3d-btn-outline:hover { color: var(--h3d-ink-950); border-color: var(--h3d-ink-950); }

.oaka-hero3d .h3d-meta {
  background: var(--h3d-white); border: 1px solid var(--h3d-ink-200); border-radius: 14px;
  padding: 20px 24px; box-shadow: 0 2px 4px rgba(20, 17, 15, 0.06), 0 1px 2px rgba(20, 17, 15, 0.04);
}
.oaka-hero3d .h3d-meta-label { font-family: var(--h3d-font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--h3d-ink-500); margin-bottom: 10px; }
.oaka-hero3d .h3d-meta-value { font-family: var(--h3d-font-display); font-size: 18px; font-weight: 600; line-height: 1.3; }
.oaka-hero3d .h3d-meta-value small { display: block; margin-top: 6px; font-family: var(--h3d-font-body); font-weight: 400; font-size: 14px; color: var(--h3d-ink-700); }

/* Scène : pleine largeur d'écran, le canvas en fond, texte et commandes par-dessus */
body:has(.oaka-hero3d) { overflow-x: clip; }
/* plein écran au défilement (ordinateur) : la scène reste épinglée le temps de parcourir la zone, puis la page reprend */
.oaka-hero3d .h3d-pin { position: relative; }
@media (min-width: 981px) and (hover: hover) and (pointer: fine) {
  .oaka-hero3d .h3d-pin { height: 220svh; margin: 56px 0; } /* un peu d'air au-dessus et au-dessous de l'illustration */
  .oaka-hero3d .h3d-pin > .h3d-stage { position: sticky; top: 0; height: 100svh; min-height: 0; }
  .oaka-hero3d .h3d-pin .h3d-scene-space { min-height: 240px; }
}
/* la section et la rangée Divi qui portent le bandeau passent en pleine largeur, collées au menu */
.et_pb_section:has(.oaka-hero3d) { padding-top: 0 !important; }
body .et_pb_row:has(.oaka-hero3d) { width: 100% !important; max-width: none !important; padding-top: 0 !important; }
.oaka-hero3d .h3d-stage {
  position: relative;
  width: 100%;
  min-height: clamp(720px, 62vw, 100svh);
  display: flex;
  flex-direction: column;
  background-color: #FAF7F2;
  background-image: radial-gradient(ellipse at 50% 72%, rgba(255,131,0,0.11) 0%, rgba(255,131,0,0) 58%);
}
.oaka-hero3d .h3d-stage canvas:focus { outline: none; }
.oaka-hero3d .h3d-stage canvas:focus-visible { outline: none; } /* le script donne le focus au canevas pour le clavier : pas de liseret */
.oaka-hero3d .h3d-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; z-index: 0; }
.oaka-hero3d .h3d-inner { width: 80%; max-width: 1240px; margin: 0 auto; }
.oaka-hero3d .h3d-overlay { position: relative; z-index: 2; padding: 40px 0 28px; pointer-events: none; }
/* voile crème derrière le texte, pour qu'il reste lisible devant l'animation */
.oaka-hero3d .h3d-overlay::before {
  content: ""; position: absolute; inset: 0 0 -60px 0; z-index: -1; pointer-events: none; transition: opacity 700ms;
  background: linear-gradient(to bottom, rgba(250,247,242,0.92) 0%, rgba(250,247,242,0.78) 60%, rgba(250,247,242,0) 100%);
}
.oaka-hero3d .h3d-overlay a, .oaka-hero3d .h3d-overlay .h3d-meta { pointer-events: auto; }
.oaka-hero3d .h3d-scene-space { flex: 1 1 auto; min-height: 380px; }
/* bas de scène : mode d'emploi en bas à gauche de l'écran, boutons à droite, tous alignés sur le bas du bouton central */
.oaka-hero3d .h3d-controls { position: relative; z-index: 2; padding-bottom: 18px; pointer-events: none; }
.oaka-hero3d .h3d-controls .h3d-inner { width: auto; max-width: none; padding: 0 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.oaka-hero3d .h3d-hint { display: none; margin: 0; padding: 0; font-size: 12px; line-height: 1.55; color: var(--h3d-ink-700); max-width: 30vw; }
/* simulation : le texte, posé devant l'animation, part en fondu vers les côtés (la chaîne ne bouge pas) */
@media (min-width: 981px) {
  .oaka-hero3d .h3d-overlay { position: absolute; top: 0; left: 0; right: 0; }
}
.oaka-hero3d .h3d-eyebrow-row, .oaka-hero3d .h3d-lead-row > div, .oaka-hero3d .h3d-meta {
  transition: opacity 600ms, transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.oaka-hero3d.is-game .h3d-eyebrow-row, .oaka-hero3d.is-game .h3d-lead-row > div { opacity: 0; transform: translateX(-90px); }
.oaka-hero3d.is-game .h3d-meta { opacity: 0; transform: translateX(90px); }
.oaka-hero3d.is-game .h3d-overlay::before { opacity: 0; }
.oaka-hero3d.is-game .h3d-overlay * { pointer-events: none !important; }
.oaka-hero3d.is-game .h3d-hint { display: block; animation: h3d-fade 600ms 300ms both; }
.oaka-hero3d .h3d-continue { opacity: 0; pointer-events: none; transition: opacity 400ms; }
.oaka-hero3d.is-game .h3d-continue { opacity: 1; pointer-events: auto; }
/* « Poursuivre », centré en bas de la scène épinglée */
.oaka-hero3d .h3d-continue {
  position: absolute; left: 50%; bottom: 18px; z-index: 3; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--h3d-font-body); font-size: 14px; font-weight: 600; line-height: 1; color: var(--h3d-white);
  background: var(--h3d-ink-950); border: 0; border-radius: 999px; padding: 11px 18px; cursor: pointer;
  box-shadow: 0 12px 28px rgba(20, 17, 15, 0.18);
}
.oaka-hero3d .h3d-continue span { color: var(--h3d-orange-500); animation: h3d-nudge 1.6s ease-in-out infinite; }
.oaka-hero3d .h3d-continue:hover { background: #2A2521; }
.oaka-hero3d .h3d-continue:focus-visible { outline: 3px solid var(--h3d-orange-300); outline-offset: 2px; }
@keyframes h3d-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .oaka-hero3d .h3d-continue span { animation: none; } }
@keyframes h3d-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.oaka-hero3d .h3d-hint kbd { font-family: var(--h3d-font-mono); font-size: 11px; display: inline-block; min-width: 20px; text-align: center; padding: 1px 5px; margin: 0 1px; border: 1px solid var(--h3d-ink-300); border-bottom-width: 2px; border-radius: 5px; background: var(--h3d-white); color: var(--h3d-ink-950); }
.oaka-hero3d .h3d-buttons { display: flex; gap: 8px; flex: none; }
/* bulles : orange pour l'équipe oaka, bleu pour le client ; même taille pour toutes */
.oaka-hero3d .h3d-bubble {
  position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none;
  font-family: var(--h3d-font-display); font-size: 13px; font-weight: 700; line-height: 1.25; color: #8E2517;
  background: #FFF4EB; border: 1px solid var(--h3d-orange-300); border-radius: 14px; padding: 7px 11px;
  white-space: normal; width: max-content; max-width: 260px; text-wrap: balance; /* lignes équilibrées : pas de mot isolé en fin de bulle */
  box-shadow: 0 6px 14px rgba(20, 17, 15, 0.08);
}
.oaka-hero3d .h3d-bubble.is-client { color: #173F78; background: #EEF4FC; border-color: #B9CDEB; }
.oaka-hero3d .h3d-bubble.is-client::after { background: #EEF4FC; border-color: #B9CDEB; }
/* le chef de projet parle sur le côté, pour ne pas masquer la chaîne */
.oaka-hero3d .h3d-bubble.is-tech::after { display: none; }
.oaka-hero3d .h3d-bubble.has-link { pointer-events: auto; }
.oaka-hero3d .h3d-bubble a { color: var(--h3d-orange-700); font-weight: 700; }
.oaka-hero3d .h3d-you {
  position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none;
  font-family: var(--h3d-font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1;
  color: #FFFFFF; background: #2563B5; border-radius: 999px; padding: 4px 8px; opacity: 0.85; transition: opacity 200ms, transform 60ms;
}
.oaka-hero3d .h3d-you.is-active { opacity: 1; box-shadow: 0 0 0 3px rgba(37, 99, 181, 0.25); }
.oaka-hero3d .h3d-bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; margin-left: -5px; background: #FFF4EB; border-right: 1px solid var(--h3d-orange-300); border-bottom: 1px solid var(--h3d-orange-300); transform: rotate(45deg); }
.oaka-hero3d .h3d-hint.is-done { opacity: 0.55; }
.oaka-hero3d .h3d-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--h3d-ink-700); font-size: 15px; padding: 24px; }
.oaka-hero3d .h3d-tag {
  position: absolute; left: 0; top: 0; z-index: 1;
  display: inline-flex; align-items: baseline; gap: 6px;
  font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--h3d-ink-950);
  background: rgba(255,255,255,0.88); backdrop-filter: blur(6px);
  border: 1px solid var(--h3d-ink-200); border-radius: 999px;
  padding: 5px 11px; white-space: nowrap; pointer-events: none;
  transition: opacity 250ms;
}
.oaka-hero3d .h3d-tag b { font-family: var(--h3d-font-mono); font-size: 10px; color: var(--h3d-orange-700); letter-spacing: 0.06em; }
.oaka-hero3d .h3d-chip {
  flex: none; pointer-events: auto;
  font-family: var(--h3d-font-body); font-size: 13px; font-weight: 600; line-height: 1.2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  background: var(--h3d-white); color: var(--h3d-ink-950); border: 1px solid var(--h3d-ink-200);
  cursor: pointer;
}
.oaka-hero3d .h3d-chip[hidden] { display: none; }
.oaka-hero3d .h3d-chip:hover { border-color: var(--h3d-ink-950); }
.oaka-hero3d .h3d-chip:focus-visible { outline: 3px solid var(--h3d-orange-300); outline-offset: 2px; }
.oaka-hero3d .h3d-pause .h3d-ico { width: 10px; height: 10px; display: inline-block; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.oaka-hero3d .h3d-pause[data-state="paused"] .h3d-ico { border: 0; width: 0; height: 0; border-left: 9px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }

/* Légende des postes */
.oaka-hero3d .h3d-steps {
  list-style: none; margin: 8px auto 0; padding: 20px 0 0; width: 80%; max-width: 1240px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px;
  border-top: 1px solid var(--h3d-ink-200);
}
.oaka-hero3d .h3d-steps li { min-width: 0; display: grid; gap: 6px; align-content: start; margin: 0; padding: 0; list-style: none; }
.oaka-hero3d .h3d-n { font-family: var(--h3d-font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--h3d-orange-700); }
.oaka-hero3d .h3d-step-title { font-family: var(--h3d-font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.01em; margin: 0; padding: 0; line-height: 1.25; color: var(--h3d-ink-950); }
.oaka-hero3d .h3d-step-text { margin: 0; padding: 0; font-size: 14px; line-height: 1.55; color: var(--h3d-ink-700); }
.oaka-hero3d .h3d-hand .h3d-step-title::after {
  content: ""; display: inline-block; width: 22px; height: 12px; margin-left: 8px; vertical-align: -1px;
  border-radius: 999px; background: var(--h3d-gradient-ticbox);
}

@media (max-width: 980px) {
  .oaka-hero3d .h3d-inner { width: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .oaka-hero3d .h3d-lead-row { grid-template-columns: 1fr; gap: 24px; }
  .oaka-hero3d .h3d-lead-row .h3d-meta { justify-self: start; margin-bottom: 0; }
  .oaka-hero3d .h3d-steps { grid-template-columns: 1fr 1fr 1fr; width: auto; margin-left: 20px; margin-right: 20px; }
  .oaka-hero3d .h3d-stage { min-height: 0; }
  .oaka-hero3d .h3d-scene-space { flex: none; min-height: 0; aspect-ratio: 1.6 / 1; }
}
@media (max-width: 640px) {
  .oaka-hero3d .h3d-overlay { padding-top: 24px; }
  .oaka-hero3d .h3d-scene-space { aspect-ratio: 1.25 / 1; }
  .oaka-hero3d .h3d-tag span { display: none; }
  .oaka-hero3d .h3d-tag { padding: 4px 8px; }
  .oaka-hero3d .h3d-steps { grid-template-columns: 1fr; gap: 14px; }
  .oaka-hero3d .h3d-controls .h3d-inner { flex-direction: column; align-items: flex-start; }
}

/* mode « section » : l'atelier s'intègre dans une page, avec la typographie des autres sections et la largeur du contenu */
.oaka-hero3d.h3d-section .h3d-inner { width: calc(100% - 32px); }
.oaka-hero3d.h3d-section .h3d-overlay { padding-top: 56px; }
.oaka-hero3d.h3d-section .h3d-eyebrow-row { margin-bottom: 14px; }
.oaka-hero3d.h3d-section .h3d-eyebrow { font-family: var(--h3d-font-mono, ui-monospace, 'SF Mono', Menlo, Consolas, monospace); }
.oaka-hero3d.h3d-section .h3d-title { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -0.03em; max-width: 22ch; }
.oaka-hero3d.h3d-section .h3d-title + .h3d-lead { margin-top: 18px; }
.oaka-hero3d.h3d-section .h3d-lead { font-size: 18px; line-height: 1.6; max-width: 40em; }
.oaka-hero3d.h3d-section .h3d-lead-row .h3d-meta { margin-bottom: 0; }
@media (min-width: 981px) and (hover: hover) and (pointer: fine) {
  .oaka-hero3d.h3d-section .h3d-pin { margin: 24px 0; }
}
