/* ============================================================
   ATELIKIA : page du diagnostic (diagnostic.html)
   Se charge après style.css, atelikia.css et workflows.css.
   ============================================================ */

.diag { max-width: 900px; margin: 0 auto; padding: clamp(140px, 18vh, 190px) var(--pad) clamp(70px, 10vh, 110px); min-height: 80vh; }
.diag__screen[hidden] { display: none; }
.diag h1 { font-size: clamp(36px, 5vw, 68px); line-height: 1.06; letter-spacing: -0.02em; color: var(--fg); margin: 0; max-width: 18ch; }
.diag h1 em { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-weight: 400; color: var(--accent); }
.diag__go { margin-top: 36px; }
.diag__fine { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.diag__fine a { color: var(--fg); }

/* ---- Questions ---- */
.diag__progress { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.diag__bar { display: block; height: 100%; width: 0; background: var(--action); transition: width .35s var(--ease); }
.diag__count { margin: 16px 0 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 700; }

.q { margin: 0; padding: 0; border: 0; min-width: 0; animation: qIn .35s var(--ease); }
@keyframes qIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.q legend { padding: 0; margin: 18px 0 28px; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.25; font-weight: 600; color: var(--fg); letter-spacing: -0.01em; }
.q__options { display: grid; gap: 12px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span {
  display: block; padding: 18px 22px; border: 1px solid rgba(242,237,228,0.2); border-radius: 6px;
  color: var(--fg-soft); font-size: 17px; line-height: 1.45; background: rgba(242,237,228,0.02);
  transition: border-color .16s var(--ease), color .16s var(--ease), background .16s var(--ease), transform .16s var(--ease);
}
@media (hover: hover) and (pointer: fine) { .opt:hover span { border-color: rgba(0,162,233,0.6); color: var(--fg); } }
.opt input:checked + span { border-color: var(--action); color: var(--fg); background: rgba(0,162,233,0.12); }
.opt input:focus-visible + span { outline: 2px solid var(--action); outline-offset: 3px; }
.q__text { width: 100%; padding: 16px 18px; font: inherit; font-size: 17px; color: var(--fg); background: rgba(242,237,228,0.04); border: 1px solid rgba(242,237,228,0.2); border-radius: 6px; }
.q__text:focus { outline: none; border-color: var(--action); }
.q__hint { margin: -16px 0 22px; font-size: 14px; color: var(--muted); }

.diag__nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; }
.diag__back { background: none; border: 0; padding: 8px 0; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.diag__back:hover { color: var(--fg); }
.diag__back[disabled] { visibility: hidden; }
.diag__next[hidden] { display: none; }

/* ---- Résultat ---- */
.diag__result:focus { outline: none; }
.diag__text { font-size: clamp(17px, 1.35vw, 20px); color: var(--fg-soft); max-width: 62ch; margin: 26px 0 0; }

.gauges { margin: 44px 0 0; padding: clamp(22px, 3vw, 32px); background: var(--bg-3); border-radius: 6px; }
.gauges__title { margin: 0 0 18px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.gauges__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.gauge { display: grid; grid-template-columns: minmax(110px, 160px) 1fr 64px; align-items: center; gap: 14px; font-size: 15px; color: var(--fg-soft); }
.gauge.is-main { color: var(--fg); font-weight: 600; }
.gauge__track { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; }
.gauge__fill { display: block; height: 100%; width: 0; border-radius: 8px; background: var(--muted); transition: width .8s var(--ease); }
.gauge--moyen .gauge__fill { background: var(--accent); }
.gauge--fort .gauge__fill { background: var(--action); }
.gauge__level { font-size: 13px; text-align: right; color: var(--muted); }
.gauge--fort .gauge__level { color: var(--fg); }
.gauges__note { margin: 16px 0 0; font-size: 13px; color: var(--muted); }

.diag__grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(24px, 4vw, 48px); margin-top: 44px; align-items: start; }
.diag__form-title { margin: 0; font-size: clamp(21px, 2vw, 26px); line-height: 1.3; color: var(--fg); letter-spacing: -0.01em; }
.diag__form-sub { margin: -12px 0 0; font-size: 15px; color: var(--muted); }

.consent { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; cursor: pointer; font-size: 14px; color: var(--fg-soft); line-height: 1.5; }
.consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent__box { width: 20px; height: 20px; margin-top: 1px; border: 1px solid rgba(242,237,228,0.35); border-radius: 4px; display: grid; place-items: center; transition: background .16s var(--ease), border-color .16s var(--ease); }
.consent input:checked + .consent__box { background: var(--action); border-color: var(--action); }
.consent input:checked + .consent__box::after { content: ""; width: 10px; height: 5px; border: 2px solid var(--ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.consent input:focus-visible + .consent__box { outline: 2px solid var(--action); outline-offset: 3px; }
.consent a { color: var(--fg); }
.consent.is-invalid .consent__box { border-color: #F2A65A; }

.diag__side { display: flex; flex-direction: column; gap: 22px; }
.diag__wf { font-size: 15px; }
.diag__preaudit { padding: 24px; border: 1px solid var(--line); border-radius: 6px; }
.diag__preaudit p { margin: 0 0 18px; font-size: 15px; color: var(--fg-soft); }
.diag__preaudit .btn { white-space: normal; text-align: center; }
.diag__preaudit small { display: block; margin-top: 12px; font-size: 12px; color: var(--muted); }
.diag__preaudit[hidden] { display: none; }
.diag__restart { align-self: flex-start; }

@media (max-width: 760px) {
  .diag__grid { grid-template-columns: 1fr; }
  .gauge { grid-template-columns: 1fr 56px; }
  .gauge__track { grid-column: 1 / -1; grid-row: 2; }
  .opt span { padding: 16px 18px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .q { animation: none; }
  .diag__bar, .gauge__fill { transition: none; }
}

/* ---- Case « être rappelé pour un pré-audit » (12 nov. 2026) ---- */
.diag__rappel { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; border: 1px solid rgba(201, 169, 110, 0.4); border-radius: 6px; background: rgba(201, 169, 110, 0.05); }
.diag__rappel[hidden], #diagTel[hidden] { display: none; }
.diag__rappel strong { color: var(--fg); }

/* ---- Moins de 5 salariés : pas de formulaire de rappel (12 nov. 2026) ---- */
.diag__moins5 { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: clamp(24px, 3vw, 40px); background: var(--bg-3); border-radius: 6px; }
.diag__moins5[hidden], .diag__form[hidden] { display: none; }
.diag__moins5 p { margin: 0; font-size: 15px; color: var(--fg-soft); }
.diag__form .form__fine a { color: var(--fg); }

/* Encadré « réservé à partir de 5 salariés » sous le titre du formulaire (12 nov. 2026) ;
   masqué quand « Moins de 5 » est choisi, puisque le même message apparaît alors plus bas */
.diag__reserve { margin-top: -4px; }
form.is-moins5 .diag__reserve { display: none; }

/* ---- 12 nov. 2026 (Lydie : « présente comme ceci, c'est mieux réparti ») ----
   Fin du diagnostic disposée comme le pré-audit de l'accueil : le cadre sombre prend la largeur des autres pages ;
   le titre, la phrase et l'encadré à gauche, le formulaire seul à droite. L'accueil du diagnostic et les questions
   gardent leur largeur d'avant, centrées dans le cadre. */
main.diag { max-width: none; }
.diag__start, .diag__quiz { max-width: calc(900px - 2 * var(--pad)); margin-left: auto; margin-right: auto; }
.diag__result .gauges { max-width: 820px; }
.diag__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); margin-top: clamp(56px, 8vh, 88px); }
.diag__grid.is-seul { grid-template-columns: 1fr; max-width: 760px; }
.diag__titre { margin: 0; }
.diag__accroche { margin-top: 22px; }
.diag__reserve { margin-top: 28px; }
.diag__grid.is-form-moins5 .diag__reserve { display: none; }
.diag__intro .diag__side { margin-top: 32px; }
@media (max-width: 1100px) {
  /* colonnes empilées : texte, puis formulaire, puis les liens « Voir l'exemple » et « Refaire le diagnostic » */
  .diag__grid { display: flex; flex-direction: column; gap: 40px; }
  .diag__intro { display: contents; }
  .diag__pitch, .diag__moins5 { order: 1; max-width: 640px; }
  .diag__form { order: 2; }
  .diag__intro .diag__side { order: 3; margin-top: 0; }
}

/* ---- 19 nov. 2026 (Lydie) : le calcul fait partie du parcours (écrans diagDouleur → diagCout, assets/js/diagnostic-chiffrage.js) ---- */
.calc { max-width: calc(900px - 2 * var(--pad)); margin-left: auto; margin-right: auto; }
.calc:focus { outline: none; }
.diag .calc__h1 { font-size: clamp(30px, 4vw, 52px); max-width: 22ch; margin-top: 14px; }
.diag .calc__h1--etape { font-size: clamp(26px, 3.2vw, 40px); max-width: none; }
.calc .diag__text { margin-top: 18px; }
.calc .diag__text strong { color: var(--fg); }
.calc__annonce { margin: 30px 0 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.calc__champ { display: block; margin-top: 26px; border: 0; padding: 0; min-width: 0; }
.calc__champ--court { max-width: 300px; }
.calc__label { display: block; margin-bottom: 10px; font-size: 17px; font-weight: 600; color: var(--fg); padding: 0; }
.calc__aide { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
.calc textarea, .calc input[type="text"], .calc input[type="number"] { width: 100%; padding: 14px 16px; font: inherit; font-size: 17px; color: var(--fg); background: rgba(242,237,228,0.04); border: 1px solid rgba(242,237,228,0.22); border-radius: 6px; }
.calc textarea:focus, .calc input:focus { outline: none; border-color: var(--action); }
.calc__unite { display: flex; align-items: center; gap: 10px; color: var(--fg-soft); font-size: 16px; }
.calc__unite input { max-width: 160px; }
.calc__erreur { margin: 14px 0 0; color: #F2A65A; font-size: 15px; }
.calc__erreur:empty { display: none; }
.calc__fine { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.calc__passer { display: block; margin: 18px 0 0 auto; }
.calc__tache { margin: 10px 0 0; padding: 18px 22px; border-left: 4px solid var(--accent); background: rgba(201,169,110,0.08); border-radius: 0 6px 6px 0; font-size: clamp(18px, 1.6vw, 22px); color: var(--fg); font-weight: 600; }
.calc .calc__methode-intro { margin-top: 10px; }
.calc__methode { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: met; display: grid; gap: 14px; }
.calc__methode li { counter-increment: met; position: relative; padding: 16px 18px 16px 62px; border: 1px solid rgba(242,237,228,0.14); border-radius: 6px; background: rgba(242,237,228,0.03); font-size: 16px; line-height: 1.5; color: var(--fg-soft); }
.calc__methode li::before { content: counter(met); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--action); color: #fff; font-weight: 700; }
.calc__methode strong { color: var(--fg); }
.calc__auto { margin-top: 24px; padding: 16px 18px; border: 1px solid rgba(201,169,110,0.5); border-radius: 6px; background: rgba(201,169,110,0.08); }
.calc__auto-k { display: block; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.calc .calc__auto input { font-weight: 600; background: transparent; border-color: rgba(201,169,110,0.35); }
.calc__auto-t { margin: 10px 0 0; font-size: 15px; color: var(--fg-soft); }
.calc__auto-t:empty { display: none; }
.calc__liste { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.calc__item { display: flex; align-items: center; gap: 10px; }
.calc__num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--action); color: #fff; font-weight: 700; }
.calc .calc__item input { font-weight: 600; }
.calc__suppr { flex: none; width: 40px; height: 40px; border-radius: 6px; border: 1px solid rgba(242,237,228,0.22); background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; }
.calc__suppr:hover { color: #F2A65A; border-color: #F2A65A; }
.calc__ajout { margin-top: 12px; width: 100%; padding: 13px; border: 1px dashed var(--action); border-radius: 6px; background: rgba(0,162,233,0.06); color: var(--action); font: inherit; font-weight: 700; cursor: pointer; }
.calc__ajout[hidden] { display: none; }
.calc__mesure { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.calc__freq { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.calc__freq legend { width: 100%; }
.calc__res { margin: 24px 0 0; font-size: 18px; font-weight: 600; color: var(--fg); }
.calc__part { margin: 10px 0 0; font-size: 15px; color: var(--accent); font-style: italic; }
.calc__part:empty { display: none; }
@media (max-width: 640px) { .calc__mesure { grid-template-columns: 1fr; } }

/* Résultat du calcul, en rose comme le total de l'outil d'entretiens */
.calc__resultat { max-width: 820px; margin-top: 36px; padding: clamp(20px, 2.6vw, 30px); border: 2px solid #E0559B; border-radius: 8px; background: linear-gradient(180deg, rgba(224,85,155,0.26), rgba(224,85,155,0.10)); }
.calc__resultat[hidden] { display: none; }
.calc__total-k { margin: 0 0 14px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: #FF8CC6; font-weight: 700; }
.calc__cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.calc__cases > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid rgba(224,85,155,0.55); border-radius: 6px; background: rgba(224,85,155,0.08); font-size: 13px; color: #f4d2e3; }
.calc__cases b { font-size: 28px; color: #FF8CC6; font-variant-numeric: tabular-nums; }
.calc__cases .is-fort { background: rgba(224,85,155,0.20); border-color: #E0559B; }
.calc__detail { margin-top: 16px; font-size: 14px; color: var(--fg-soft); }
.calc__detail summary { cursor: pointer; color: var(--fg); font-weight: 600; }
.calc__table { overflow-x: auto; margin-top: 10px; }
.calc__table table { width: 100%; border-collapse: collapse; }
.calc__table th, .calc__table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid rgba(242,237,228,0.12); vertical-align: top; }
.calc__table th { color: #FF8CC6; font-weight: 600; }
.calc__table td span { color: var(--muted); }
.calc__resultat .calc__fine { color: #e8c3d6; }
.calc__cta { margin-top: 20px; padding: 18px 20px; border-radius: 6px; background: var(--bg-3); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.calc__cta p { margin: 0; font-size: 16px; color: var(--fg-soft); max-width: 62ch; }
.calc__cta strong { color: var(--fg); }
/* 19 nov. 2026 : choix « c'est bien ça » / « c'est autre chose » sur l'écran du problème */
.calc__choix { margin-top: 26px; animation: none; }
.calc__choix[hidden], .calc__champ[hidden] { display: none; }
.calc__choix legend.calc__label { margin: 0 0 14px; }
.calc__choix .opt strong { color: var(--fg); }
.calc .calc__auto textarea { font-weight: 600; background: transparent; border-color: rgba(201,169,110,0.35); resize: vertical; min-height: 0; }
/* 19 nov. 2026 : écran de transition en gros pendant que l'IA découpe la tâche */
.calc--attente { min-height: 46vh; display: flex; align-items: center; }
.calc--attente[hidden] { display: none; }
.diag .calc__attente { font-size: clamp(34px, 5vw, 64px); max-width: 20ch; margin: 0; }
.calc__points span { display: inline-block; animation: calcPoint 1.2s infinite both; }
.calc__points span:nth-child(2) { animation-delay: .2s; }
.calc__points span:nth-child(3) { animation-delay: .4s; }
@keyframes calcPoint { 0%, 80%, 100% { opacity: .15; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .calc__points span { animation: none; } }
.calc .calc__pour { margin: 22px 0 0; font-weight: 600; color: var(--fg); }
/* 19 nov. 2026 : cadre des cinq postes sur l'écran « Ce que révèlent vos réponses », puis le point de douleur principal */
.calc .gauges { margin-top: 18px; }
.diag .calc__principal { font-size: clamp(26px, 3.4vw, 42px); max-width: 24ch; margin-top: 34px; }
/* 19 nov. 2026 : phrase entre le total et le formulaire */
.calc__imaginez { max-width: 820px; margin: 40px 0 0; font-size: clamp(24px, 2.8vw, 36px); line-height: 1.2; font-weight: 700; color: var(--fg); letter-spacing: -0.01em; }
.calc__imaginez[hidden] { display: none; }
.calc__imaginez em { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-weight: 400; color: var(--accent); }
#calcRefaire { margin-top: 10px; }
/* 19 nov. 2026 : écran « Automatisation envisagée pour ce problème » */
.calc #autoBloc[hidden], .calc__attente-petite[hidden] { display: none; }
.calc__attente-petite { margin: 30px 0 0; font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; color: var(--fg); }
.diag .calc__auto-titre { margin-top: 10px; font-size: clamp(32px, 4.4vw, 58px); max-width: 20ch; }
.diag .calc__auto-titre em { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-weight: 400; color: var(--accent); }
#autoSuite[disabled] { opacity: .45; cursor: default; }
#autoBloc .calc__annonce { font-size: clamp(18px, 2vw, 24px); letter-spacing: 0.08em; margin-top: 26px; }
/* 19 nov. 2026 : gain sur une fois, avant la semaine */
.calc__fois { margin: 24px 0 0; padding: 12px 16px; border-left: 4px solid var(--action); background: rgba(0,162,233,0.08); border-radius: 0 6px 6px 0; font-size: 17px; font-weight: 600; color: var(--fg); }
.calc__fois:empty { display: none; }
.calc__fois + .calc__res { margin-top: 12px; }
/* 19 nov. 2026 : tableau du détail avec chapeaux */
.calc__table th.calc__chapeau { text-align: center; border-bottom: 1px solid rgba(224,85,155,0.45); color: #FF8CC6; }
.calc__table thead tr:nth-child(2) th { color: #f4d2e3; font-weight: 600; }
.calc__table td b { color: var(--fg); font-weight: 700; white-space: nowrap; }
.calc__legende { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
/* 19 nov. 2026 : fin du parcours en pages */
.calc__fin-nav { max-width: 820px; }
.calc__choixfin { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 36px; }
.calc__choixfin--liens { margin-top: 18px; }
.calc--attente > div { width: 100%; }
.calc__non { font-size: 14px; }
.calc__non--bas { display: block; margin: 28px auto 0; }
#diagContact .diag__grid { margin-top: 0; }
/* 19 nov. 2026 : trait entre « Temps unitaire » et « Par semaine » */
.calc__table .calc__sep { border-left: 2px solid rgba(224,85,155,0.7); padding-left: 12px; }
/* 19 nov. 2026 : précision entre parenthèses sous les questions d'une étape ; champs alignés en bas */
.calc__hint { font-weight: 400; color: var(--muted); white-space: nowrap; }
.calc__mesure { align-items: end; }
.calc .calc__offre { margin-top: 26px; max-width: 60ch; font-size: clamp(17px, 1.4vw, 20px); }
.calc__offre strong { color: var(--fg); }
/* 19 nov. 2026 (Lydie) : petites animations — engrenages (recherche de l'automatisation), sablier (calcul), pièces (résultat) */
.anim { display: block; color: var(--action); }
.calc__attente-petite { display: flex; align-items: center; gap: 18px; }
.anim--engrenages { flex: none; width: 96px; height: 64px; }
.eng--1 { transform: translate(38px, 40px); animation: engTourne 3s linear infinite; }
.eng--2 { transform: translate(84px, 30px); color: var(--accent); animation: engTourneInverse 2.05s linear infinite; }
.eng--2 * { stroke: var(--accent); }
.eng--2 circle:last-child { fill: var(--accent); }
@keyframes engTourne { from { transform: translate(38px, 40px) rotate(0deg); } to { transform: translate(38px, 40px) rotate(360deg); } }
@keyframes engTourneInverse { from { transform: translate(84px, 30px) rotate(0deg); } to { transform: translate(84px, 30px) rotate(-360deg); } }

.anim--sablier { width: 54px; height: 82px; margin-bottom: 22px; color: var(--fg); }
.sab { transform-origin: 30px 45px; animation: sabRetourne 3s ease-in-out infinite; }
.sab__haut { transform-origin: 30px 36px; animation: sabHaut 3s linear infinite; }
.sab__bas { transform-origin: 30px 78px; animation: sabBas 3s linear infinite; }
.sab__filet { animation: sabFilet .5s linear infinite; }
@keyframes sabRetourne { 0%, 85% { transform: rotate(0deg); } 100% { transform: rotate(180deg); } }
@keyframes sabHaut { 0% { transform: scaleY(1); } 85%, 100% { transform: scaleY(0); } }
@keyframes sabBas { 0% { transform: scaleY(0); } 85%, 100% { transform: scaleY(1); } }
@keyframes sabFilet { to { stroke-dashoffset: -6; } }

.anim--pieces { width: 120px; height: 60px; margin-bottom: 14px; }
.piece { opacity: 0; animation: pieceTombe .6s cubic-bezier(.3,1.4,.5,1) forwards; }
.piece--1 { animation-delay: .1s; } .piece--2 { animation-delay: .35s; } .piece--3 { animation-delay: .6s; } .piece--4 { animation-delay: .9s; }
@keyframes pieceTombe { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .eng, .sab, .sab__haut, .sab__bas, .sab__filet { animation: none; }
  .eng--1 { transform: translate(38px, 40px); } .eng--2 { transform: translate(84px, 30px); }
  .piece { animation: none; opacity: 1; }
}
.anim--engrenages { width: 126px; height: 84px; }
.anim--sablier { width: 68px; height: 102px; }
.anim--pieces { width: 168px; height: 84px; }
/* ============================================================
   19 nov. 2026 (Lydie) : même écriture que la page d'accueil dans tout le diagnostic.
   Mots dorés des titres : même police que le titre (Plus Jakarta Sans, gras), plus d'italique Playfair,
   avec le soulignement doré « trait de pinceau » de l'accueil (--trait-or, reflet qui glisse),
   qui se trace de gauche à droite à l'arrivée de chaque écran.
   ============================================================ */
.diag h1 em, .diag h2 em, .diag .calc__imaginez em, .diag .calc__auto-titre em {
  font-family: inherit; font-style: normal; font-weight: inherit; letter-spacing: inherit; color: var(--accent);
  padding-bottom: 0.18em;
  background: var(--trait-or) no-repeat left bottom / 100% 0.42em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  animation: diagTrait 1.1s var(--ease) .55s both;
}
@keyframes diagTrait { from { background-size: 0% 0.42em; } to { background-size: 100% 0.42em; } }
.calc__part { font-style: normal; }
@media (prefers-reduced-motion: reduce) {
  .diag h1 em, .diag h2 em, .diag .calc__imaginez em, .diag .calc__auto-titre em { animation: none; background-image: var(--trait-or-fixe); }
}
/* 19 nov. 2026 (Lydie) : à la place du sablier, des pièces qui tombent sans arrêt (plus de mouvement que sur le résultat) */
.anim--pluie { width: 200px; height: 120px; margin-bottom: 18px; overflow: visible; }
.pl { animation: plTombe 2.4s cubic-bezier(.45,0,.55,1) infinite; opacity: 0; }
.pl--1 { animation-delay: 0s; } .pl--2 { animation-delay: .4s; } .pl--3 { animation-delay: .8s; }
.pl--4 { animation-delay: 1.2s; } .pl--5 { animation-delay: 1.6s; } .pl--6 { animation-name: plEuro; animation-delay: .6s; }
.pl-pile .pl { animation: none; opacity: 1; }
@keyframes plTombe {
  0% { opacity: 0; transform: translateY(-110px) rotate(-12deg); }
  12% { opacity: 1; }
  55% { transform: translateY(0) rotate(0deg); }
  63% { transform: translateY(-9px); }
  70% { transform: translateY(0); opacity: 1; }
  92%, 100% { transform: translateY(0); opacity: 0; }
}
@keyframes plEuro {
  0% { opacity: 0; transform: translateY(-100px) scale(.7); }
  15% { opacity: 1; }
  50% { transform: translateY(0) scale(1); }
  58% { transform: translateY(-8px) scale(1.05); }
  66%, 85% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .pl { animation: none; opacity: 1; } }
/* 19 nov. 2026 : trait qui montre le temps avant l'écran suivant (écran de l'automatisation) */
.calc__minuteur { margin-top: 26px; height: 3px; max-width: 320px; background: rgba(242,237,228,0.12); border-radius: 3px; overflow: hidden; }
.calc__minuteur span { display: block; height: 100%; width: 0; background: var(--accent); }

/* 19 nov. 2026 (Lydie) : un seul écran d'attente ; au bout de 3,5 s, les pièces remplacent les engrenages et la phrase avance */
.calc__attente-petite .anim--pluie { flex: none; width: 126px; height: 76px; margin: 0; display: none; }
.calc__attente-txt--2 { display: none; }
.calc__attente-txt--2 em { font-style: normal; color: var(--accent, #C9A96E); }
.calc__attente-petite.is-calcul .anim--engrenages, .calc__attente-petite.is-calcul .calc__attente-txt--1 { display: none; }
.calc__attente-petite.is-calcul .anim--pluie { display: block; }
.calc__attente-petite.is-calcul .calc__attente-txt--2 { display: inline; animation: attenteTxt .5s ease both; }
@keyframes attenteTxt { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .calc__attente-petite .anim--pluie { width: 96px; height: 58px; } }

/* 19 nov. 2026 (Lydie) : des pièces plus grandes, qu'on les voie bien tomber */
.calc__attente-petite .anim--pluie { width: 180px; height: 108px; }
@media (max-width: 600px) { .calc__attente-petite .anim--pluie { width: 120px; height: 72px; } }

/* 19 nov. 2026 (Lydie) : « Ensemble, calculons… » : un doigt tape sur une calculette, l'argent tombe dessus (boucle de 2,4 s) */
.anim--calculette { width: 210px; height: 173px; margin-bottom: 14px; overflow: visible; }
.ct-doigt { animation: ctDoigt 2.4s ease-in-out infinite; }
@keyframes ctDoigt {
  0% { transform: translate(178px, 128px); opacity: 0; } 6% { opacity: 1; }
  15% { transform: translate(91.5px, 88px); } 18% { transform: translate(91.5px, 91px); } 22% { transform: translate(91.5px, 88px); }
  35% { transform: translate(107px, 103px); } 38% { transform: translate(107px, 106px); } 42% { transform: translate(107px, 103px); }
  55% { transform: translate(122.5px, 118px); } 58% { transform: translate(122.5px, 121px); } 62% { transform: translate(122.5px, 118px); }
  76% { opacity: 1; } 82%, 100% { transform: translate(178px, 128px); opacity: 0; }
}
.ct-eclair { opacity: 0; animation: ctEclair 2.4s linear infinite; }
.ct-eclair--1 { animation-delay: .43s; } .ct-eclair--2 { animation-delay: .91s; } .ct-eclair--3 { animation-delay: 1.39s; }
@keyframes ctEclair { 0% { opacity: 0; } 2% { opacity: 1; } 12%, 100% { opacity: 0; } }
.ct-ecran--0 { animation: ctEcran0 2.4s linear infinite; }
.ct-ecran--1 { animation: ctEcran1 2.4s linear infinite; }
@keyframes ctEcran0 { 0%, 57% { opacity: 1; } 58%, 100% { opacity: 0; } }
@keyframes ctEcran1 { 0%, 57% { opacity: 0; } 58%, 96% { opacity: 1; } 100% { opacity: 0; } }
.ct-piece { opacity: 0; animation: ctPiece 2.4s cubic-bezier(.5, 0, .7, 1) infinite; }
.ct-piece--1 { animation-delay: 1.45s; } .ct-piece--2 { animation-delay: 1.6s; } .ct-piece--3 { animation-delay: 1.75s; } .ct-piece--4 { animation-delay: 1.9s; }
@keyframes ctPiece { 0% { opacity: 0; transform: translateY(-60px); } 8% { opacity: 1; } 30% { transform: translateY(0); } 34% { transform: translateY(-4px); } 38% { transform: translateY(0); } 70% { opacity: 1; } 85%, 100% { opacity: 0; transform: translateY(0); } }
@media (max-width: 600px) { .anim--calculette { width: 160px; height: 132px; } }
@media (prefers-reduced-motion: reduce) {
  .ct-doigt { animation: none; transform: translate(122.5px, 118px); }
  .ct-eclair, .ct-ecran--0 { animation: none; opacity: 0; }
  .ct-ecran--1, .ct-piece { animation: none; opacity: 1; transform: none; }
}

/* 19 nov. 2026 (Lydie : « l'automatisation ne ressort pas, tout est trop doré ») : le nom de l'automatisation en blanc, souligné en bleu */
.diag .calc__auto-titre em {
  color: #fff; padding-bottom: 0.1em;
  background: linear-gradient(#00A2E9, #00A2E9) no-repeat left bottom / 100% 0.09em;
  animation: diagTraitBleu 1.1s var(--ease) .4s both;
}
@keyframes diagTraitBleu { from { background-size: 0% 0.09em; } to { background-size: 100% 0.09em; } }
@media (prefers-reduced-motion: reduce) { .diag .calc__auto-titre em { animation: none; background-image: linear-gradient(#00A2E9, #00A2E9); } }

/* 19 nov. 2026 (Lydie) : « Continuer » seulement sur l'automatisation trouvée, jamais pendant la recherche (.btn imposait display) */
#autoSuite[hidden] { display: none !important; }

/* 25 nov. 2026 (Lydie) : coordonnées avant le résultat du diagnostic */
.calc input[type="email"] { width: 100%; padding: 14px 16px; font: inherit; font-size: 17px; color: var(--fg); background: rgba(242,237,228,0.04); border: 1px solid rgba(242,237,228,0.22); border-radius: 6px; }
.calc__coord { max-width: 520px; }
.calc__coord .calc__champ { margin-top: 18px; }
.calc__coord .calc__label { font-size: 15.5px; margin-bottom: 8px; }
.calc__rgpd { margin: 18px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.calc__envoye { margin: 22px 0 0; padding: 14px 18px; border-radius: 10px; border: 1px solid rgba(201, 169, 110, 0.4); background: rgba(201, 169, 110, 0.07); font-size: 15px; line-height: 1.5; color: var(--fg-soft); }
.calc__envoye b { color: var(--fg); }
.calc__envoi-ok { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 0 22px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); font-size: 30px; font-weight: 800; }
.calc__rien[hidden] { display: none; }
.calc__corriger { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.calc__corriger .diag__back { padding: 0; font-size: 14px; color: var(--fg-soft); }
.calc__pasrecu { margin-top: 22px; max-width: 520px; }
.calc__pasrecu[hidden] { display: none; }
.calc__pasrecu textarea { width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--fg); background: rgba(242,237,228,0.04); border: 1px solid rgba(242,237,228,0.22); border-radius: 6px; resize: vertical; }
.calc__pasrecu .btn { margin-top: 14px; }
.calc__pasrecu-ok { margin: 12px 0 0; font-size: 15px; color: var(--fg-soft); }
.calc__envoi-ok.is-souci { border-color: #E0559B; color: #E0559B; }
/* 25 nov. 2026 (Lydie : « écrit un peu petit, au même format que "Ensemble, calculons…" ») :
   « Nous cherchons l'automatisation la mieux adaptée… » en grand, l'animation au-dessus, comme l'écran du calcul */
.calc__attente-petite { flex-direction: column; align-items: flex-start; gap: 14px; margin: clamp(30px, 7vh, 80px) 0 clamp(20px, 4vh, 40px);
  max-width: 20ch; font-size: clamp(34px, 5vw, 64px); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.calc__attente-petite .anim--engrenages { width: 180px; height: 120px; }
@media (max-width: 600px) { .calc__attente-petite .anim--engrenages { width: 140px; height: 94px; } }

/* 26 nov. 2026 : passerelle vers le Diagnostic SEO local de Lydie */
.calc__passerelle { margin: 30px 0 0; font-size: 15px; color: var(--muted); }
.calc__passerelle a { color: var(--action); font-weight: 700; text-decoration: none; }
.calc__passerelle a:hover { text-decoration: underline; }
