/* ── ARIANE ──────────────────────────────────────────────────────
   Ariane est passée à la charte « Le Déclic » (Ariane/src/charte.css, 1.21.0 du 08/11/2026). Le téléphone de
   la démo reprend ses jetons sombres : l'app n'a pas de thème clair (le ciel est toujours de nuit), la
   maquette reste donc sombre dans les deux thèmes du site. */
:root {
  --ar-bg:        #09152C;
  --ar-card:      #111D36;
  --ar-card2:     #17233C;
  --ar-border:    #202D47;
  --ar-border-hi: #2D3A55;
  --ar-stroke:    color-mix(in oklab, var(--ar-border), var(--ar-border-hi) 50%);
  --ar-text:      #F0F5FE;
  --ar-muted:     #C2CEE5;
  --ar-acc:       #6497FF; /* rappel de coupe, carte armée, jauge */
  --ar-link:      #97BAFE; /* texte accent */
  --ar-pri:       #2C64DF; /* bouton principal */
  --ar-sel:       #0B204F; /* fond de la carte armée */
  --ar-md:        #DD9C3D;
}

/* Coupe 60° du téléphone : même construction que les COINS COUPÉS de style.css (fond en ::before,
   trait de 1 px en ::after), locale à cette page. */
.ar-cut {
  --c: 9px;
  --v: calc(var(--c) * 1.732);
  --cut: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--v), 100% calc(100% - var(--v)), calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--v)), 0 var(--v));
  --ring: polygon(evenodd, var(--c) 0, calc(100% - var(--c)) 0, 100% var(--v), 100% calc(100% - var(--v)), calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--v)), 0 var(--v), var(--c) 0,
    calc(var(--c) + .58px) 1px, calc(100% - var(--c) - .58px) 1px, calc(100% - 1px) calc(var(--v) + .27px), calc(100% - 1px) calc(100% - var(--v) - .27px), calc(100% - var(--c) - .58px) calc(100% - 1px), calc(var(--c) + .58px) calc(100% - 1px), 1px calc(100% - var(--v) - .27px), 1px calc(var(--v) + .27px), calc(var(--c) + .58px) 1px);
  --fill: transparent;
  --edge: transparent;
  --rappel: transparent;
  position: relative;
  isolation: isolate;
}
.ar-cut::before, .ar-cut::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: var(--z-fond);
  pointer-events: none;
  transition: background-color var(--d-fast);
}
.ar-cut::before { clip-path: var(--cut); background-color: var(--fill); }
.ar-cut::after { clip-path: var(--ring); background-color: var(--edge);
  background-image: linear-gradient(var(--rappel), var(--rappel)), linear-gradient(var(--rappel), var(--rappel));
  background-position: top left, bottom right; background-size: calc(var(--c) + 1px) calc(var(--v) + 1px); background-repeat: no-repeat; }

/* ── HERO ────────────────────────────────────────────────────── */
.project-hero {
  padding: var(--section-pad) var(--col-gap) calc(var(--section-pad) * 0.6);
  max-width: var(--max-w);
  margin-inline: auto;
}
.project-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  color: var(--fg-muted);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color var(--d-fast);
  font-weight: 500;
}
.project-hero__back:hover { color: var(--accent-text); }
.project-hero__eyebrow { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.project-hero__eyebrow .mono-label + .mono-label { color: var(--fg-muted); }
.project-hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.project-hero__title em { font-style: normal; color: var(--pri); } /* charte-ok : très grand titre */ /* Déclic n'a pas d'italique : la lettre reste droite, seule la couleur la distingue */
.project-hero__desc {
  max-width: 58ch;
  color: var(--fg-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}
.project-hero__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.ar-tag {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--fg-muted);
  padding: 2px 8px;
  font-weight: 500;
}
.project-hero__links { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ── PROBLÈME ────────────────────────────────────────────────── */
.project-quote {
  padding: 0 var(--col-gap) var(--section-pad);
  max-width: var(--max-w);
  margin-inline: auto;
}
/* Deux équerres coupées aux coins opposés d'un cadre fictif (composant de radar.css) : bras vertical, biais
   à 60°, bras horizontal, bouts coupés parallèlement au biais. Bas droite = même forme tournée à 180°. */
.project-quote__inner {
  --c: 14px;
  --v: calc(var(--c) * 1.732);
  --av: 14px;
  --ah: calc(var(--av) + var(--v) - var(--c));
  --t: 6px;
  position: relative;
  padding: calc(var(--v) + var(--av) * .5 + .75rem) 1.75rem;
  max-width: 62ch;
}
.project-quote__inner::before,
.project-quote__inner::after {
  content: '';
  position: absolute;
  width: calc(var(--c) + var(--ah));
  height: calc(var(--v) + var(--av));
  background: var(--pri);
  clip-path: polygon(0 100%, 0 var(--v), var(--c) 0, 100% 0, calc(100% - var(--t) * .577) var(--t),
    calc(var(--c) + var(--t) * .577) var(--t), var(--t) calc(var(--v) + var(--t) * .268), var(--t) calc(100% - var(--t) * 1.732));
}
.project-quote__inner::before { left: 0; top: 0; }
.project-quote__inner::after { right: 0; bottom: 0; transform: rotate(180deg); }
.project-quote__inner p { color: var(--fg-muted); line-height: 1.8; font-size: 1.05rem; }
.project-quote__inner p + p { margin-top: 1rem; }

/* ── DÉMO : téléphone + scénarios ────────────────────────────── */
.ar-demo {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: var(--section-pad) var(--col-gap);
  border-top: var(--border);
}
.ar-demo__head { max-width: 60ch; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.ar-demo__head p.ar-demo__hint { font-family: var(--font-mono); font-size: var(--t-sm); font-weight: 500; color: var(--accent-text); }
.ar-demo__head p { color: var(--fg-muted); line-height: 1.75; margin-top: 1rem; font-size: 0.95rem; }
.ar-demo__grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: clamp(2rem, 7vw, 6rem);
  align-items: start;
}

.ar-phone-col { position: sticky; top: 5.5rem; }
/* Silhouette de téléphone arrondie, comme les maquettes .device--phone (exception aux coins coupés,
   voir AGENTS.md) ; l'écran, lui, suit la charte de l'app. */
.ar-phone {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin-inline: auto;
  aspect-ratio: 9 / 18.5;
  max-height: calc(100vh - 8rem);
  background: var(--ar-bg);
  border: 1px solid var(--device-edge);
  border-radius: 34px; /* charte-ok : cadre d’appareil arrondi, voulu (AGENTS.md) */
  box-shadow: 0 0 0 6px var(--device-body), 0 0 0 7px var(--device-edge), 0 24px 80px rgba(0,0,0,0.45);
  overflow: hidden;
  color: var(--ar-text);
  font-family: var(--font-body);
  font-stretch: 110%;
  isolation: isolate;
}
.ar-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }
.ar-screen {
  position: relative;
  z-index: var(--z-dessus);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 2rem 1rem 0.9rem;
}
.ar-status {
  display: flex;
  justify-content: center;
  min-height: 1.2rem;
  font-size: var(--t-xs);
  font-weight: 500;
  color: var(--ar-md);
  opacity: 0;
  transition: opacity 0.4s;
}
.ar-status.on { opacity: 1; }

.ar-reply-zone {
  flex: 0 0 auto;
  height: 40%;
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  text-align: center;
}
.ar-heard { color: var(--ar-muted); font-size: var(--t-xs); line-height: 1.45; min-height: 1.1em; }
.ar-heard.absorbed { animation: ar-absorb 540ms cubic-bezier(.5, 0, .3, 1) both; } /* charte-ok : mouvement propre à Ariane, repris de l'app */
@keyframes ar-absorb {
  0%   { transform: none; opacity: 1; }
  45%  { transform: translateY(18px) scale(0.96); opacity: 0.2; }
  100% { transform: none; opacity: 0.9; }
}
.ar-reply { font-size: 1.15rem; line-height: 1.45; min-height: 1.45em; text-wrap: pretty; }
.ar-reply .w { display: inline; animation: ar-word 240ms ease-out both; } /* charte-ok : mot à mot, repris de l'app */
@keyframes ar-word { from { opacity: 0; } to { opacity: 1; } }
.ar-reply.hint { color: var(--ar-muted); font-size: var(--t-sm); }
.ar-voice {
  font-size: var(--t-xs);
  font-weight: 500;
  color: var(--ar-link);
  opacity: 0;
  transition: opacity 0.4s;
}
.ar-voice.on { opacity: 1; }

/* Bas de l'écran, comme dans l'app : la jauge du jour (segments, jamais de chiffre) et la barre de saisie */
.ar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 0.8rem; }
.ar-gauge { display: flex; gap: 4px; justify-content: center; }
.ar-gauge i { width: 18px; height: 4px; background: var(--ar-border); clip-path: polygon(2.3px 0, 100% 0, calc(100% - 2.3px) 100%, 0 100%); }
.ar-gauge i.on { background: var(--ar-acc); }
.ar-sbar {
  --c: 5.4px;
  --fill: var(--ar-card);
  --edge: var(--ar-stroke);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 4px 4px 4px 0.85rem;
  font-size: var(--t-xs);
  color: var(--ar-muted);
}
.ar-sbar > span:first-child { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-send {
  --c: 4.5px;
  --fill: var(--ar-pri);
  display: grid;
  place-items: center;
  width: 44px;
  height: 30px;
  flex: none;
  color: #fff;
}
.ar-send svg { width: 16px; height: 16px; transform: rotate(90deg); }

/* La proposition qui se glisse : carte à geste de la charte (.gc), coupée, avec son rappel */
.ar-card {
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: 36%;
  z-index: calc(var(--z-dessus) + 1);
  opacity: 0;
  transform: translateY(8px);
  transition: transform var(--d-slow), opacity var(--d-slow);
  pointer-events: none;
}
.ar-card.on { opacity: 1; transform: none; }
.ar-card.go-left  { opacity: 0; transform: translateX(-60px); }
.ar-card.go-right { opacity: 0; transform: translateX(60px); }
.ar-gc {
  --fill: var(--ar-card);
  --edge: var(--ar-stroke);
  --rappel: var(--ar-acc);
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.4;
}
.ar-card.armed .ar-gc { --fill: var(--ar-sel); --edge: var(--ar-acc); }
.ar-gc-hint {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 0.6rem;
  font-size: var(--t-xs);
  color: var(--ar-muted);
  white-space: nowrap;
}
.ar-gc-hint span { display: inline-flex; align-items: center; gap: 3px; transition: color var(--d-fast); }
.ar-gc-hint span.on { color: var(--ar-link); font-weight: 500; }
.ar-gc-hint svg { width: 1em; height: 1em; flex: none; }

/* Le souvenir d'une étoile */
.ar-memory {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 42%;
  z-index: calc(var(--z-dessus) + 1);
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s, transform 0.5s;
  pointer-events: none;
}
.ar-memory.on { opacity: 1; transform: none; }
.ar-memory small { display: block; color: var(--ar-muted); font-size: var(--t-xs); margin-top: 3px; }

/* Légende sous le téléphone */
.ar-phone__hint {
  margin-top: 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  color: var(--fg-muted);
}

/* Scénarios (colonne de droite) */
.ar-steps { display: flex; flex-direction: column; gap: clamp(3rem, 14vh, 9rem); padding-bottom: 20vh; }
/* Étape hors champ : atténuée par la couleur du titre et du numéro, pas par l'opacité,
   pour que le texte garde un contraste lisible (WCAG AA) */
.ar-step {
  border-left: 2px solid var(--border-c);
  padding: 0.25rem 0 0.25rem 1.5rem;
  transition: border-color 0.4s;
}
.ar-step.is-active { border-left-color: var(--pri); }
.ar-step__num { font-family: var(--font-mono); font-size: var(--t-sm); font-weight: 500; color: var(--fg-muted); transition: color 0.4s; }
.ar-step.is-active .ar-step__num { color: var(--accent-text); }
.ar-step__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 0.9rem;
  color: var(--fg-muted);
  transition: color 0.4s;
}
.ar-step.is-active .ar-step__title { color: var(--fg); }
.ar-step__desc { color: var(--fg-muted); line-height: 1.75; font-size: 0.95rem; max-width: 52ch; }
.ar-step__desc code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-surface);
  border: var(--border);
  padding: 0.05em 0.35em;
}
.ar-step__desc + .ar-step__desc { margin-top: 0.8rem; }
.ar-replay {
  margin-top: 1.1rem;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  transition: color var(--d-fast), border-color var(--d-fast);
  font-weight: 500;
}
.ar-replay:hover, .ar-replay:focus-visible { color: var(--accent-text); border-color: var(--pri); }

/* ── PRINCIPES ───────────────────────────────────────────────── */
.ar-principles {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: var(--section-pad) var(--col-gap);
  border-top: var(--border);
}
.ar-principles__intro { margin-top: 1.25rem; max-width: 60ch; color: var(--fg-muted); line-height: 1.75; font-size: 0.95rem; }
.ar-principles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem 2.5rem;
  margin-top: 2rem;
}
.ar-principle h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--t-xl); margin-bottom: 0.6rem; }
.ar-principle p { color: var(--fg-muted); line-height: 1.7; font-size: 0.92rem; }

/* ── STACK ───────────────────────────────────────────────────── */
.ar-stack-section {
  padding: var(--section-pad) var(--col-gap);
  max-width: var(--max-w);
  margin-inline: auto;
  border-top: var(--border);
}
/* bloc « Stack & outils » de l'accueil, plus le rôle de chaque couche (comme radar.css) */
.ar-stack-section .stack-grid { margin-top: 2rem; }
.stack-group__role {
  font-size: var(--t-sm);
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.ar-stack-section .stack-group li { color: var(--fg); }
.ar-note { margin-top: 2rem; color: var(--fg-muted); font-size: 0.88rem; line-height: 1.7; max-width: 62ch; }
.ar-note a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 0.2em; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 839.98px) {
  .ar-demo__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .ar-phone-col {
    top: 3.6rem;
    z-index: var(--z-dessus); /* au-dessus du texte qui défile, sous la barre du site (--z-collant) */
    padding: 0.5rem 0;
    background: var(--bg);
  }
  .ar-phone { max-width: 210px; max-height: 44vh; border-radius: 26px; box-shadow: 0 0 0 4px var(--device-body), 0 0 0 5px var(--device-edge), 0 12px 40px rgba(0,0,0,0.4); }
  .ar-screen { padding: 1.2rem 0.7rem 0.6rem; }
  .ar-reply { font-size: 0.9rem; }
  .ar-reply.hint { font-size: var(--t-xs); }
  .ar-gc { font-size: 0.85rem; padding: 0.55rem 0.7rem; }
  .ar-gc-hint { gap: 0.5rem; }
  .ar-gc-hint span:nth-child(2) { display: none; } /* trop étroit : « plus besoin » ne tient pas */
  .ar-card { left: 0.7rem; right: 0.7rem; }
  .ar-bottom { gap: 0.5rem; }
  .ar-sbar { padding-left: 0.6rem; }
  .ar-send { width: 34px; height: 24px; }
  .ar-phone__hint { display: none; }
  .ar-steps { gap: 3rem; padding-bottom: 40vh; }
}

@media (prefers-reduced-motion: reduce) {
  .ar-heard.absorbed, .ar-reply .w { animation: none; }
  .ar-card, .ar-memory { transition: none; }
}
