/* Cléo se présente : trois propositions pour la page d’accueil (24 novembre).
   Tout s’appuie sur les variables et les polices de accueil.css. Préfixe « ca- ». */

/* ── Le texte qui s’écrit, mot à mot ── */
/* Les mots restent dans le fil du texte (pas de bloc) : les coupures de ligne sont celles du texte fini. */
.ca-mot { opacity: 0; filter: blur(5px); transition: opacity 0.2s ease-out, filter 0.28s ease-out; }
.ca-mot.vu { opacity: 1; filter: none; }
.ca-sort .ca-mot { opacity: 0; filter: blur(5px); transition-duration: 0.22s; }
.ca-caret { position: relative; }
.ca-caret::after { content: ""; position: absolute; left: 0.14em; bottom: 0.02em; width: max(2px, 0.075em); height: 1.04em; border-radius: 2px; background: currentColor; box-shadow: 0 0 14px currentColor; animation: ca-clignote 0.9s steps(1) infinite; }
.ca-cle { -webkit-box-decoration-break: clone; box-decoration-break: clone; background-image: linear-gradient(90deg, var(--ca-trait-1, #b9a6ff), var(--ca-trait-2, #7ef0b8)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0% 2px; padding-bottom: 3px; transition: background-size 0.9s var(--sortie) 0.15s; }
.ca-cle.fini { background-size: 100% 2px; }
.ca-sort .ca-cle, .ca-sort .ca-cle.fini { background-size: 0% 2px !important; transition: none; }
@keyframes ca-clignote { 50% { opacity: 0; } }
@keyframes ca-lueur { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes ca-souffle { 0%, 100% { box-shadow: 0 0 0 0 rgba(126, 240, 184, 0.55); } 60% { box-shadow: 0 0 0 9px rgba(126, 240, 184, 0); } }
@keyframes ca-arrive { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
@keyframes ca-point { 0%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* ══ 1. En haut de page : Cléo se présente dans sa carte, puis prend une mission ══ */
.h-cleo.ca-presente .h-suivi { display: none; }
.h-cleo.ca-presente .h-cleo__tete img { animation: ca-souffle 1.7s ease-out infinite; }
.h-cleo.ca-presente .h-fil { align-content: start; padding-top: 8px; }
.ca-nom { font-size: 27px; line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; color: #fff; }
.ca-nom .ca-cle { --ca-trait-1: #ffffff; --ca-trait-2: #7ef0b8; }
.ca-dit { min-height: 4.65em; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, 0.94); }
@media (max-width: 760px) { .ca-nom { font-size: 32px; } .ca-dit { font-size: 18px; line-height: 1.5; min-height: 4.5em; } }
.h-choix.ca-missions { align-content: start; min-height: 130px; }
.ca-mission { opacity: 0.4; transition: opacity 0.5s ease, background 0.25s, box-shadow 0.25s, transform 0.35s var(--sortie); }
.ca-missions.ouvert .ca-mission { opacity: 1; animation: ca-eveil 0.6s var(--sortie) backwards; }
.ca-missions.ouvert .ca-mission:nth-child(2) { transition-delay: 0.12s; animation-delay: 0.12s; }
.ca-missions.ouvert .ca-mission:nth-child(3) { transition-delay: 0.24s; animation-delay: 0.24s; }
.ca-mission.ca-choisie { opacity: 1; background: rgba(255, 255, 255, 0.28); box-shadow: inset 0 0 0 1.5px #fff, 0 10px 26px rgba(20, 12, 60, 0.26); transform: scale(0.97); }
@keyframes ca-eveil { 0% { transform: translateY(4px) scale(0.97); } 55% { transform: translateY(-1px) scale(1.025); } }

/* ══ 2. Une fiche qui s’écrit, juste sous le haut de page ══ */
.ca-fiche { padding: 64px 16px 8px; }
.ca-fiche__carte { position: relative; max-width: 1240px; margin: 0 auto; padding: 30px 24px 26px; border-radius: 34px; overflow: hidden; color: #fff; isolation: isolate;
  background:
    radial-gradient(420px 300px at 8% 0%, rgba(139, 111, 240, 0.5), transparent 70%),
    radial-gradient(520px 340px at 100% 100%, rgba(21, 156, 146, 0.26), transparent 70%),
    linear-gradient(180deg, #1f1757 0%, #140c30 100%);
  box-shadow: 0 30px 80px rgba(28, 20, 80, 0.26); }
.ca-fiche__tete { display: flex; align-items: center; gap: 14px; }
.ca-fiche__portrait { flex: none; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: rgba(255, 255, 255, 0.94); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08); }
.ca-fiche__portrait img { width: 52px; height: 52px; }
.ca-fiche.ecrit .ca-fiche__portrait { animation: ca-souffle 1.7s ease-out infinite; }
.ca-fiche__etat { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 500; color: rgba(255, 255, 255, 0.78); }
.ca-fiche__etat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #7ef0b8; }
.ca-fiche__titre { margin-top: 20px; font-family: var(--sans); font-size: clamp(42px, 11.8vw, 92px); font-weight: 500; line-height: 0.98; letter-spacing: -0.05em; color: #fff; text-wrap: balance; }
.ca-fiche__titre > span, .ca-fiche__titre > em { display: block; min-height: 1em; }
.ca-fiche__titre em { padding: 0 0 0.1em; font-style: normal; font-weight: 500; letter-spacing: -0.05em; background: none; -webkit-text-fill-color: currentColor; color: #c9bbff; }
.ca-fiche__lignes { margin: 22px 0 0; }
.ca-ligne { padding: 12px 0 13px; border-top: 1px solid rgba(255, 255, 255, 0.13); }
.ca-ligne dt { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.6); opacity: 0; transform: translateY(6px); transition: opacity 0.4s, transform 0.5s var(--sortie); }
.ca-ligne.la dt { opacity: 1; transform: none; }
.ca-ligne dd { position: relative; margin: 3px 0 0; font-size: 18.5px; line-height: 1.35; letter-spacing: -0.012em; color: #fff; text-wrap: pretty; }
.ca-ligne dd::before, .ca-ligne dd::after { content: ""; position: absolute; left: 0; height: 0.72em; border-radius: 0.4em; opacity: 0; pointer-events: none; transition: opacity 0.25s; background: linear-gradient(90deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.07)); background-size: 200% 100%; animation: ca-lueur 1.1s linear infinite; }
.ca-ligne dd::before { top: 0.34em; width: min(86%, 420px); }
.ca-ligne dd::after { top: 1.7em; width: min(52%, 250px); }
.ca-ligne.pense dd::before, .ca-ligne.pense dd::after { opacity: 1; }
.ca-ligne--courte dd::after { display: none; }
.ca-ligne--regle dd { display: flex; align-items: baseline; gap: 10px; font-weight: 600; }
.ca-ligne--regle dd i { flex: none; align-self: center; width: 10px; height: 10px; border-radius: 50%; background: #7ef0b8; opacity: 0; transform: scale(0.3); transition: opacity 0.3s, transform 0.5s var(--sortie); }
.ca-ligne--regle.dit dd i { opacity: 1; transform: none; box-shadow: 0 0 0 5px rgba(126, 240, 184, 0.18); }
.ca-fiche__bouton { width: 100%; margin-top: 16px; opacity: 0; transform: translateY(8px); transition: opacity 0.5s, transform 0.6s var(--sortie), background 0.2s; }
.ca-fiche.fini .ca-fiche__bouton { opacity: 1; transform: none; }
@media (min-width: 900px) {
  .ca-fiche { padding: 96px 24px 0; }
  .ca-fiche__carte { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); column-gap: 72px; align-items: start; padding: 60px 64px 56px; border-radius: 44px; }
  .ca-fiche__titre { margin-top: 34px; }
  .ca-fiche__lignes { margin-top: 6px; }
  .ca-ligne { padding: 20px 0 22px; }
  .ca-ligne:first-child { border-top: 0; }
  .ca-ligne dd { font-size: 23px; }
  .ca-fiche__bouton { width: auto; margin-top: 36px; }
}

/* ══ 3. Dans la section Cléo : on lui pose la question, elle répond ══ */
.ca-demande__scene { width: 100%; max-width: 880px; margin: 34px auto 0; }
.ca-barre { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 8px 9px 8px 12px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--bord-2), 0 18px 44px rgba(80, 56, 190, 0.16); text-align: left; }
.ca-barre img { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--fond-2); }
.ca-barre__texte { flex: 1; min-width: 0; font-size: 17.5px; font-weight: 500; color: var(--encre); white-space: nowrap; overflow: hidden; }
.ca-barre__texte .ca-caret { color: var(--acc); }
.ca-barre__texte .ca-caret::after { box-shadow: none; }
.ca-barre__envoi { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--acc); color: #fff; box-shadow: 0 8px 20px rgba(109, 79, 232, 0.34); transition: transform 0.18s var(--sortie), background 0.2s; }
.ca-barre__envoi.presse { transform: scale(0.86); background: var(--acc-sombre); }
.ca-reponse { position: relative; margin: 30px auto 0; font-size: clamp(29px, 7.9vw, 56px); line-height: 1.13; font-weight: 500; letter-spacing: -0.04em; color: var(--encre); text-wrap: balance; }
.ca-reponse .ca-cle { --ca-trait-1: var(--acc-2); --ca-trait-2: var(--teal); color: var(--acc); padding-bottom: 0.04em; background-size: 0% 0.07em; }
.ca-reponse .ca-cle.fini { background-size: 100% 0.07em; }
.ca-reponse .ca-caret { color: var(--acc); }
.ca-reponse .ca-caret::after { box-shadow: none; }
.ca-points { position: absolute; left: 50%; top: 0.2em; display: flex; gap: 7px; transform: translateX(-50%); }
.ca-points i { width: 9px; height: 9px; border-radius: 50%; background: var(--acc); animation: ca-point 1s ease-in-out infinite; }
.ca-points i:nth-child(2) { animation-delay: 0.14s; }
.ca-points i:nth-child(3) { animation-delay: 0.28s; }
.ca-questions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 30px; }
.ca-q { position: relative; height: 42px; padding: 0 17px; border: 0; border-radius: 999px; overflow: hidden; background: #fff; color: var(--encre-2); font: inherit; font-size: 15.5px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--bord-2); cursor: pointer; transition: background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.2s var(--sortie); }
.ca-q:hover { background: var(--fond-2); }
.ca-q[aria-selected="true"] { background: var(--nuit); color: #fff; box-shadow: 0 10px 24px rgba(20, 12, 48, 0.24); }
.ca-q::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--acc-2), #7ef0b8); transform: scaleX(0); transform-origin: 0 50%; }
.ca-q.attend::after { transform: scaleX(1); transition: transform var(--ca-attente, 2.6s) linear; }
.ca-accord { display: inline-flex; align-items: center; gap: 9px; margin-top: 24px; font-size: 15.5px; font-weight: 500; color: var(--encre-2); }
.ca-accord span { width: 9px; height: 9px; border-radius: 50%; background: #2fbf8a; box-shadow: 0 0 0 4px rgba(47, 191, 138, 0.18); }
.ca-demande .actions { margin-top: 30px; }
@media (min-width: 900px) {
  .ca-demande__scene { margin-top: 48px; }
  .ca-barre { max-width: 620px; min-height: 70px; margin: 0 auto; padding: 10px 11px 10px 16px; border-radius: 24px; }
  .ca-barre__texte { font-size: 20px; }
  .ca-reponse { margin-top: 44px; }
  .ca-questions { margin-top: 40px; }
}

/* Pour la relecture seulement : passer d’une proposition à l’autre. Ne fait pas partie de la page. */
.ca-relire { position: fixed; z-index: 90; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; gap: 4px; padding: 5px; border-radius: 999px; transform: translateX(-50%); background: rgba(20, 12, 48, 0.9); box-shadow: 0 14px 40px rgba(20, 12, 48, 0.4); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ca-relire button { height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: rgba(255, 255, 255, 0.82); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.ca-relire button[aria-pressed="true"] { background: #fff; color: var(--nuit); }

@media (prefers-reduced-motion: reduce) {
  .ca-mot { opacity: 1; filter: none; transition: none; }
  .ca-caret, .ca-points { display: none; }
  .ca-cle { background-size: 100% 2px; transition: none; }
  .ca-ligne dt, .ca-fiche__bouton, .ca-ligne--regle dd i { opacity: 1; transform: none; transition: none; }
  .ca-mission, .h-cleo.ca-presente .h-cleo__tete img, .ca-fiche.ecrit .ca-fiche__portrait { animation: none; }
}
