/* ================================================
   Audit des charges « La chasse aux fuites »
   S'appuie sur /components/site/promptissime.css (couleurs, boutons, en-tête, pied de page).
   ================================================ */

[hidden] { display: none !important; }

.ac-section { padding: 40px 0 72px; }
.ac-wrap { max-width: 600px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; gap: 20px; }
.ac-actions { display: flex; justify-content: center; }
.ac-muted { font-size: 15px; color: var(--muted); }
.ac-fine { font-size: 13px; color: var(--muted); }
.ac-center { text-align: center; }
.ac-lead { font-size: 17px; }
.ac-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font: 600 14px Poppins, sans-serif; color: var(--navy); border-bottom: 2px solid var(--yellow);
}
.ac-link:disabled { visibility: hidden; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

/* ===== Accueil ===== */
.ac-consigne { font-size: 22px; font-weight: 600; text-align: center; }
.ac-sel-info { text-align: center; font-size: 15px; color: var(--muted); }
.ac-note { font-size: 15px; color: var(--muted); background: var(--bg-soft); border-radius: 10px; padding: 14px 16px; }
.ac-note b { color: var(--navy); }

/* ===== La maison ===== */
.ac-stage { width: 100%; max-width: 340px; margin: 0 auto; }
.ac-stage svg, .ac-mini svg { display: block; width: 100%; height: auto; }
.room-hit { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.room-hit:hover .room-bg { stroke-width: 4.5; }
.room-hit:focus-visible .room-bg { stroke: var(--navy); stroke-width: 6; }
.room-hit:active { transform-box: fill-box; transform-origin: center; transform: scale(.97); }

.ghost { opacity: 0; animation: ac-fantome 7s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes ac-fantome { 0%, 100% { opacity: 0; } 8%, 22% { opacity: .85; } 32% { opacity: 0; } }
.drop-new { transform-box: fill-box; transform-origin: 50% 100%; animation: ac-goutte .7s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes ac-goutte {
  0% { opacity: 0; transform: translateY(-16px) scale(.6); }
  60% { opacity: 1; transform: translateY(0) scale(1.1, .9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.lit { animation: ac-allume .5s ease both; animation-delay: var(--d, 0s); }
@keyframes ac-allume { from { fill: #FFFFFF; } }
.late { animation: ac-goutte .6s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: 50% 100%; }

/* ===== Questions ===== */
.ac-quiz-top, .ac-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ac-room-tag { font: 600 13px Poppins, sans-serif; color: var(--navy); background: var(--yellow-light); padding: 5px 12px; border-radius: 100px; }
.ac-qcount { font-size: 14px; color: var(--muted); }
.ac-counter {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px;
  border: 2px solid var(--navy); border-radius: 100px; font: 600 13px Poppins, sans-serif; color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.ac-counter.pop { animation: ac-pop .5s ease; }
@keyframes ac-pop { 40% { transform: scale(1.15); background: var(--yellow); } }
.ac-progress { height: 6px; background: var(--track); border-radius: 6px; overflow: hidden; margin-top: -12px; }
.ac-progress span { display: block; height: 100%; width: 0; background: var(--navy); transition: width .4s ease; }

/* Écran de question : tout tient dans la hauteur d'un téléphone (375 x 667), sans défilement */
.ac-section.ac-quiz { padding: 10px 0 16px; }
/* Pendant les questions, l'en-tête du site se fait plus discret pour laisser la place à la question */
body.ac-quiz-mode .header-logo img { width: 64px; }
body.ac-quiz-mode .header-inner { padding-top: 4px; padding-bottom: 4px; }
.ac-q.answered .ac-hint { display: none; }
.ac-next-row .btn { padding: 13px 22px; }
.ac-next-row .btn, .ac-next-row .ac-link { white-space: nowrap; }
.ac-feedback .ac-tag { display: inline-block; margin-right: 6px; }
.ac-quiz .ac-wrap { gap: 10px; }
.ac-quiz .ac-progress { margin-top: -4px; }
.ac-quiz-right { display: inline-flex; align-items: center; gap: 6px; }
.ac-qzone { position: relative; isolation: isolate; padding-top: 6px; }
.ac-watermark {
  position: absolute; z-index: -1; inset: 0 0 auto 0; margin: 0 auto;
  width: min(300px, 82%); opacity: .14; pointer-events: none;
}
.ac-q { display: flex; flex-direction: column; gap: 6px; }
.ac-brian {
  width: 40px; aspect-ratio: 1; flex: none; transform-origin: 50% 92%;
  background: url('https://www.promptissime.fr/wp-content/uploads/2025/06/hello-brian.png') center / contain no-repeat;
}
.ac-brian.rep { animation: ac-rep .75s ease-in-out; }
.ac-brian.alerte { animation: ac-alerte .8s ease-in-out; }
@keyframes ac-rep {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.06, .9); }
  60% { transform: translateY(-8%) scale(.96, 1.06); }
  80% { transform: scale(1.02, .98); }
  100% { transform: scale(1, 1); }
}
@keyframes ac-alerte {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-9deg) scale(1.04, .96); }
  40% { transform: rotate(8deg); }
  60% { transform: rotate(-5deg); }
  80% { transform: rotate(3deg); }
}

.ac-q h2 { font-size: 21px; font-weight: 600; line-height: 1.35; text-wrap: balance; outline: none; }
.ac-hint { color: var(--muted); font-size: 15px; line-height: 1.5; }
.ac-answers { display: grid; gap: 10px; margin-top: 10px; }
/* Une fois la réponse donnée, seule la réponse choisie reste : l'explication prend la place des autres */
.ac-answers.done .ac-answer:not(.picked), .ac-answers.done .ac-validate { display: none; }
.ac-answers.multi { grid-template-columns: 1fr 1fr; gap: 8px; }
.ac-answers.multi .ac-answer { padding: 10px 10px; font-size: 14px; gap: 8px; }
.ac-answers.multi .ac-validate { grid-column: 1 / -1; }
.ac-answers.multi.done { display: none; }
.ac-answer {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px 16px; border: 2px solid var(--border); border-radius: 10px; background: #fff;
  font: 600 16px Poppins, sans-serif; color: var(--navy); cursor: pointer; line-height: 1.35;
  transition: border-color .15s, background .15s, opacity .2s, transform .1s;
}
.ac-answer:hover { border-color: var(--navy); }
.ac-answer:active { transform: scale(.98); }
.ac-answer .key {
  flex: none; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-soft); font: 600 13px/24px Poppins, sans-serif; text-align: center; color: var(--muted);
}
.ac-answer .box {
  flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--navy);
  display: grid; place-items: center; background: #fff;
}
@media (hover: none) { .ac-answer .key { display: none; } }
.ac-answer.picked { border-color: var(--navy); background: var(--yellow-light); }
.ac-answer.picked .box { background: var(--navy); }
.ac-answers.done .ac-answer:not(.picked) { opacity: .5; }
.ac-validate { margin-top: 12px; align-self: flex-end; }

.ac-feedback {
  margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--bg-soft);
  display: flex; flex-direction: column; gap: 8px; animation: ac-monte .35s ease both;
}
@keyframes ac-monte { from { opacity: 0; transform: translateY(8px); } }
.ac-tag { align-self: flex-start; font: 600 12px Poppins, sans-serif; padding: 3px 10px; border-radius: 100px; }
.ac-tag.ok { background: var(--ok-bg); color: var(--ok); }
.ac-tag.warn { background: var(--warn-bg); color: var(--warn); }
.ac-tag.bad { background: var(--bad-bg); color: var(--bad); }
.ac-tag.doubt { background: #fff; color: var(--warn); box-shadow: inset 0 0 0 1.5px var(--warn); }
.ac-tag.off { background: var(--bg-soft); color: var(--muted); }
.ac-next-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }

/* ===== Le saviez-vous ===== */
.ac-fact { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; }
.ac-fact-label { font: 600 13px Poppins, sans-serif; letter-spacing: 3px; text-transform: uppercase; color: var(--yellow); }
.ac-fact-text { font: 600 20px/1.45 Poppins, sans-serif; text-wrap: balance; outline: none; }
.ac-fact-src { font-size: 13px; opacity: .75; }
.ac-fact .btn { align-self: flex-start; margin-top: 6px; }

/* ===== Résultat ===== */
.ac-result { gap: 28px; }
.ac-result-title { font-size: 38px; font-weight: 700; outline: none; }
.ac-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; font-size: 13px; color: var(--muted); margin-top: -12px; }
.ac-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ac-legend i { width: 14px; height: 14px; border-radius: 4px; border: 2px solid; display: inline-block; }
.lg-ok { background: var(--ok-bg); border-color: var(--ok) !important; }
.lg-warn { background: var(--warn-bg); border-color: var(--warn) !important; }
.lg-bad { background: var(--bad-bg); border-color: var(--bad) !important; }
.lg-off { background: #F1F2F4; border-color: #C3C9D2 !important; }
.ac-room-list { display: grid; gap: 8px; }
.ac-room-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
}
.ac-room-row b { font: 600 15px Poppins, sans-serif; color: var(--navy); }
.ac-room-row .sub { display: block; font-size: 13px; color: var(--muted); }

.ac-plan, .ac-copieur, .ac-report { display: flex; flex-direction: column; gap: 12px; }
.ac-plan h2, .ac-copieur h2, .ac-report h2 { font-size: 24px; font-weight: 600; }
.ac-plan ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ac-action { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.ac-action .num {
  grid-row: span 3; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow);
  display: grid; place-items: center; font: 700 16px Poppins, sans-serif; color: var(--navy);
}
.ac-action h3 { font-size: 17px; font-weight: 600; line-height: 1.35; min-width: 0; }
.ac-action p { font-size: 15px; min-width: 0; }
.ac-action .to { font-size: 13px; color: var(--muted); }
.ac-action .tools { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.ac-mail { display: flex; flex-direction: column; gap: 10px; }
.ac-email {
  margin: 0; white-space: pre-wrap; word-break: break-word; font: 500 14px/1.6 Mulish, sans-serif; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
}
.ac-copy { align-self: flex-start; padding: 10px 18px; font-size: 14px; }
.ac-clean { text-align: center; padding: 20px; border-radius: var(--radius); background: var(--ok-bg); color: var(--ok); font-weight: 700; }

.ac-copieur { background: var(--bg-soft); border-radius: var(--radius); padding: 22px; }
.ac-copieur .btn { align-self: flex-start; }
.ac-report { background: var(--yellow-light); border-radius: var(--radius); padding: 22px; }
.ac-report form { display: flex; gap: 8px; flex-wrap: wrap; }
.ac-report .input { flex: 1 1 220px; min-width: 0; width: auto; }
.ac-report-msg { font-size: 15px; font-weight: 700; color: var(--navy); }
.ac-report-msg.error { color: var(--bad); }

@media (max-width: 680px) {
  .ac-section { padding: 28px 0 56px; }
  .ac-result-title { font-size: 30px; }
  .ac-q h2 { font-size: 19px; }
  .ac-next-row .btn { width: auto; }
  .ac-fact .btn, .ac-copieur .btn, .ac-copy { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .ghost, .drop-new, .lit, .late, .ac-brian, .ac-counter, .ac-feedback { animation: none !important; }
  .ghost { opacity: 0; }
}
