@charset "UTF-8";
/* ==========================================================================
   Article « Coup de pouce chauffage : du charbon au bois »
   Complète css/article-foyer-ouvert.css (scène, chiffres, réflexes, aides),
   css/article-aides-bois.css, css/article-faux-ramoneur.css,
   css/article-ramonage-frequence.css, css/article-detecteur-co.css et
   css/article-fonds-air-bois.css (panneaux à onglets, étapes numérotées) :
   scène d'ouverture cpc-*, coefficients avant/après, plafonds de revenus
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Scène d'ouverture (cycle de 12 s)
      0-20 %    un vieux poêle au charbon enfume la maison
      20-30 %   le Coup de pouce multiplie le forfait (blocs ×1 à ×5)
      30-45 %   l'appareil au charbon est déposé
      45-56 %   un poêle à bois performant le remplace
      56-72 %   le ramoneur ramone le conduit
      72-100 %  fumée légère, liste du chantier cochée
   -------------------------------------------------------------------------- */
.cpc-scene {
  background: linear-gradient(180deg, #D6E9F5 0%, #EEF5FA 62%, #F6F2EA 62%, #F6F2EA 100%);
}

.cpc-ancien, .cpc-depose, .cpc-nouveau, .cpc-buches, .cpc-label, .cpc-flamme, .cpc-noir circle,
.cpc-fumee circle, .cpc-ramoneur, .cpc-prime, .cpc-bloc, .cpc-fois, .cpc-liste, .cpc-coche {
  transform-box: fill-box;
}

.cpc-ancien   { transform-origin: 50% 100%; animation: cpc-ancien 12s cubic-bezier(0.5, 0, 0.3, 1) infinite; }
.cpc-braise   { animation: cpc-braise 0.9s ease-in-out infinite alternate; }
.cpc-depose   { animation: cpc-depose 12s ease infinite; }
.cpc-depose rect:first-child { animation: cpc-pointilles 0.9s linear infinite; }
.cpc-nouveau  { transform-origin: 50% 100%; animation: cpc-nouveau 12s cubic-bezier(0.2, 0.7, 0.2, 1) infinite; }
.cpc-buches   { transform-origin: 50% 100%; animation: cpc-buches 12s cubic-bezier(0.3, 1.5, 0.5, 1) infinite; }
.cpc-flamme   { transform-origin: 50% 100%; animation: cpc-flamme 0.7s ease-in-out infinite alternate; }
.cpc-label    { transform-origin: 0 50%; animation: cpc-label 12s cubic-bezier(0.3, 1.6, 0.5, 1) infinite; }
.cpc-noir     { animation: cpc-noir-cycle 12s step-end infinite; }
.cpc-noir circle { transform-origin: 50% 50%; opacity: 0; animation: cpc-noir 2.4s ease-out infinite; }
.cpc-noir circle:nth-child(2) { animation-delay: -0.6s; }
.cpc-noir circle:nth-child(3) { animation-delay: -1.2s; }
.cpc-noir circle:nth-child(4) { animation-delay: -1.8s; }
.cpc-fumee    { animation: cpc-fumee-cycle 12s step-end infinite; }
.cpc-fumee circle { transform-origin: 50% 50%; opacity: 0; animation: cpc-clair 2.6s ease-out infinite; }
.cpc-fumee circle:nth-child(2) { animation-delay: -0.87s; }
.cpc-fumee circle:nth-child(3) { animation-delay: -1.74s; }
.cpc-brume    { animation: cpc-brume 12s ease-in-out infinite; }
.cpc-ramoneur { transform-origin: 50% 100%; animation: cpc-ramoneur 12s cubic-bezier(0.2, 0.7, 0.2, 1) infinite; }
.cpc-cable    { animation: cpc-cable 12s step-end infinite; }
.cpc-herisson { animation: cpc-herisson 12s ease-in-out infinite; }
.cpc-prime    { transform-origin: 50% 100%; animation: cpc-prime 12s cubic-bezier(0.2, 0.7, 0.2, 1) infinite; }
.cpc-bloc     { transform-origin: 50% 100%; animation: cpc-bloc-1 12s cubic-bezier(0.3, 1.6, 0.5, 1) infinite; }
.cpc-bloc--2  { animation-name: cpc-bloc-2; }
.cpc-bloc--3  { animation-name: cpc-bloc-3; }
.cpc-bloc--4  { animation-name: cpc-bloc-4; }
.cpc-bloc--5  { animation-name: cpc-bloc-5; }
.cpc-fois     { transform-origin: 0 50%; animation: cpc-fois 12s cubic-bezier(0.3, 1.6, 0.5, 1) infinite; }
.cpc-liste    { transform-origin: 50% 100%; animation: cpc-liste 12s cubic-bezier(0.2, 0.7, 0.2, 1) infinite; }
.cpc-coche    { stroke-dasharray: 16; stroke-dashoffset: 16; animation: cpc-coche-1 12s ease infinite; }
.cpc-coche--2 { animation-name: cpc-coche-2; }
.cpc-coche--3 { animation-name: cpc-coche-3; }

/* L'ancien poêle et le seau de charbon s'affaissent et disparaissent */
@keyframes cpc-ancien {
  0%, 31%   { opacity: 1; transform: none; }
  34%       { opacity: 1; transform: translateY(-8px); }
  40%       { opacity: 0; transform: translateY(-8px) scale(0.9); }
  97%       { opacity: 0; transform: none; }
  100%      { opacity: 1; transform: none; }
}

@keyframes cpc-braise {
  from { opacity: 0.55; }
  to   { opacity: 1; }
}

/* Le contour pointillé « DÉPOSE » marque l'emplacement libéré */
@keyframes cpc-depose {
  0%, 32%   { opacity: 0; }
  35%, 45%  { opacity: 1; }
  48%, 100% { opacity: 0; }
}

@keyframes cpc-pointilles {
  to { stroke-dashoffset: -14; }
}

@keyframes cpc-nouveau {
  0%, 45%   { opacity: 0; transform: translateY(-60px); }
  50%       { opacity: 1; transform: translateY(3px); }
  52%, 96%  { opacity: 1; transform: none; }
  99%, 100% { opacity: 0; transform: none; }
}

@keyframes cpc-buches {
  0%, 49%   { opacity: 0; transform: scale(0.3); }
  53%, 96%  { opacity: 1; transform: none; }
  99%, 100% { opacity: 0; transform: none; }
}

@keyframes cpc-label {
  0%, 52%   { opacity: 0; transform: scale(0.4); }
  55%, 96%  { opacity: 1; transform: none; }
  99%, 100% { opacity: 0; transform: none; }
}

@keyframes cpc-flamme {
  from { transform: scale(0.85, 0.8); }
  to   { transform: scale(1.05, 1.15); }
}

@keyframes cpc-noir-cycle  { 0% { opacity: 1; } 34% { opacity: 0; } }
@keyframes cpc-fumee-cycle { 0% { opacity: 0; } 73% { opacity: 1; } 98% { opacity: 0; } }

@keyframes cpc-noir {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.6); }
  20%  { opacity: 0.95; }
  100% { opacity: 0; transform: translate(60px, -6px) scale(2.8); }
}

@keyframes cpc-clair {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.5); }
  25%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(24px, -10px) scale(1.8); }
}

@keyframes cpc-brume {
  0%, 34%   { opacity: 1; }
  50%, 97%  { opacity: 0; }
  100%      { opacity: 1; }
}

@keyframes cpc-ramoneur {
  0%, 56%   { opacity: 0; transform: translateY(-30px); }
  59%       { opacity: 1; transform: translateY(2px); }
  60%, 70%  { opacity: 1; transform: none; }
  73%, 100% { opacity: 0; transform: translateY(-30px); }
}

@keyframes cpc-cable {
  0%   { opacity: 0; }
  60%  { opacity: 1; }
  70%  { opacity: 0; }
}

@keyframes cpc-herisson {
  0%, 59.5% { opacity: 0; transform: none; }
  60%       { opacity: 1; transform: none; }
  62%       { opacity: 1; transform: translateY(16px); }
  64%       { opacity: 1; transform: none; }
  66%       { opacity: 1; transform: translateY(18px); }
  68%       { opacity: 1; transform: none; }
  69.5%     { opacity: 1; transform: translateY(16px); }
  70%, 100% { opacity: 0; transform: none; }
}

@keyframes cpc-prime {
  0%, 16%   { opacity: 0; transform: translateY(24px); }
  20%       { opacity: 1; transform: translateY(-3px); }
  22%, 96%  { opacity: 1; transform: none; }
  99%, 100% { opacity: 0; transform: none; }
}

/* Les blocs du forfait s'empilent un par un : ×1, puis ×2 à ×5 */
@keyframes cpc-bloc-1 { 0%, 21% { opacity: 0; transform: scale(0.2); } 23%, 96% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; } }
@keyframes cpc-bloc-2 { 0%, 23.5% { opacity: 0; transform: scale(0.2); } 25.5%, 96% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; } }
@keyframes cpc-bloc-3 { 0%, 25% { opacity: 0; transform: scale(0.2); } 27%, 96% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; } }
@keyframes cpc-bloc-4 { 0%, 26.5% { opacity: 0; transform: scale(0.2); } 28.5%, 96% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; } }
@keyframes cpc-bloc-5 { 0%, 28% { opacity: 0; transform: scale(0.2); } 30%, 96% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; } }

@keyframes cpc-fois {
  0%, 29%   { opacity: 0; transform: scale(0.5); }
  32%, 96%  { opacity: 1; transform: none; }
  99%, 100% { opacity: 0; }
}

@keyframes cpc-liste {
  0%, 31%   { opacity: 0; transform: translateY(24px); }
  35%       { opacity: 1; transform: translateY(-3px); }
  37%, 96%  { opacity: 1; transform: none; }
  99%, 100% { opacity: 0; transform: none; }
}

/* Les cases se cochent : dépose, pose, ramonage */
@keyframes cpc-coche-1 { 0%, 39% { stroke-dashoffset: 16; } 42%, 96% { stroke-dashoffset: 0; } 99%, 100% { stroke-dashoffset: 16; } }
@keyframes cpc-coche-2 { 0%, 53% { stroke-dashoffset: 16; } 56%, 96% { stroke-dashoffset: 0; } 99%, 100% { stroke-dashoffset: 16; } }
@keyframes cpc-coche-3 { 0%, 69% { stroke-dashoffset: 16; } 72%, 96% { stroke-dashoffset: 0; } 99%, 100% { stroke-dashoffset: 16; } }

/* --------------------------------------------------------------------------
   2. Coefficients avant / depuis le 16 novembre
   -------------------------------------------------------------------------- */
.cpc-condition {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--texte);
}

.cpc-legende__avant,
.cpc-legende__apres {
  display: inline-block;
  width: 18px;
  height: 10px;
  border-radius: 4px;
}

.cpc-legende__avant { background: #C9BFAF; }
.cpc-legende__apres { background: #16794C; }

.cpc-coefs {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cpc-coef {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(150px, 1.4fr) 7.5em;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--fond, #F6F2EA);
}

.cpc-coef__nom {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--encre);
}

.cpc-coef__aide {
  display: block;
  margin-top: 1px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--discret);
}

.cpc-coef__barres {
  display: grid;
  gap: 5px;
}

.cpc-coef__ligne {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.4em;
  align-items: center;
  gap: 10px;
}

.cpc-coef__piste {
  position: relative;
  height: 12px;
  border-radius: 6px;
  background: #E7E0D4;
  overflow: hidden;
}

.cpc-coef__barre {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 0 6px 6px 0;
  transform-origin: 0 50%;
}

.cpc-coef__barre--avant { width: var(--avant); background: #C9BFAF; }
.cpc-coef__barre--apres { width: var(--apres); background: #16794C; }

.cpc-coef__valeur {
  font-size: 15px;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--encre);
}

.cpc-coef__valeur--avant {
  font-size: 13px;
  font-weight: 700;
  color: var(--discret);
}

.cpc-coef__evolution {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}

.cpc-coef__evolution--stable { background: rgba(21, 23, 27, 0.06); color: var(--discret); }
.cpc-coef__evolution--baisse { background: #FBE7E4; color: #9B1C26; }

@media (max-width: 560px) {
  .cpc-coef {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  .cpc-coef__barres { grid-column: 1 / -1; grid-row: 2; }
}

/* Les barres se remplissent à chaque changement d'onglet : avant, puis depuis */
.foyer.anime-ok .cpc-coef {
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i) * 0.08s);
}

.foyer.anime-ok .cpc-coef__barre {
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(0.15s + var(--i) * 0.08s);
}

.foyer.anime-ok .cpc-coef__barre--apres { transition-delay: calc(0.65s + var(--i) * 0.08s); }

.foyer.anime-ok .cpc-coef__evolution {
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
  transition-delay: calc(1.3s + var(--i) * 0.08s);
}

.foyer.anime-ok .fab-regions__panneau:not(.est-anime) .cpc-coef { opacity: 0; transform: translateY(8px); }
.foyer.anime-ok .fab-regions__panneau:not(.est-anime) .cpc-coef__barre { transform: scaleX(0); }
.foyer.anime-ok .fab-regions__panneau:not(.est-anime) .cpc-coef__evolution { opacity: 0; transform: scale(0.6); }

/* --------------------------------------------------------------------------
   3. Plafonds de revenus (une barre par zone)
   -------------------------------------------------------------------------- */
.cpc-revenus__barre {
  display: flex;
  height: 40px;
  border-radius: 12px;
  background: #E7E0D4;
  overflow: hidden;
}

.cpc-revenus__part {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
}

.cpc-revenus__part--tm {
  flex: 0 0 var(--tm);
  background: #16794C;
  box-shadow: 2px 0 0 var(--blanc, #FFFFFF);
  color: #FFFFFF;
}

.cpc-revenus__part--pe {
  flex: 0 0 var(--pe);
  background: #86C5A4;
  box-shadow: 2px 0 0 var(--blanc, #FFFFFF);
  color: #0B4A2E;
}

.cpc-revenus__part--autres {
  flex: 1 1 auto;
  color: var(--encre);
}

.cpc-revenus__liste {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.cpc-revenus__liste li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--fond, #F6F2EA);
  font-size: 14px;
  color: var(--texte);
}

.cpc-revenus__liste strong { font-size: 14.5px; color: var(--encre); }
.cpc-revenus__liste span   { grid-column: 2; grid-row: 2; font-variant-numeric: tabular-nums; }
.cpc-revenus__liste em     { grid-column: 3; grid-row: 1 / span 2; font-style: normal; font-size: 18px; font-weight: 800; color: var(--encre); }

.cpc-revenus__pastille {
  grid-row: 1 / span 2;
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.cpc-revenus__pastille--tm     { background: #16794C; }
.cpc-revenus__pastille--pe     { background: #86C5A4; }
.cpc-revenus__pastille--autres { background: #E7E0D4; border: 1px solid #C9BFAF; }

.foyer.anime-ok .cpc-revenus__part--tm,
.foyer.anime-ok .cpc-revenus__part--pe {
  transition: flex-basis 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s;
}

.foyer.anime-ok .cpc-revenus__part--pe { transition-delay: 0.55s; }

.foyer.anime-ok .cpc-revenus__liste li {
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.foyer.anime-ok .cpc-revenus__liste li:nth-child(2) { transition-delay: 0.1s; }
.foyer.anime-ok .cpc-revenus__liste li:nth-child(3) { transition-delay: 0.2s; }

.foyer.anime-ok .fab-regions__panneau:not(.est-anime) .cpc-revenus__part--tm,
.foyer.anime-ok .fab-regions__panneau:not(.est-anime) .cpc-revenus__part--pe { flex-basis: 0; }
.foyer.anime-ok .fab-regions__panneau:not(.est-anime) .cpc-revenus__liste li { opacity: 0; transform: translateY(8px); }

/* --------------------------------------------------------------------------
   Mouvement réduit : image fixe, nouvel appareil installé
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .cpc-scene * { animation: none !important; }

  .cpc-ancien, .cpc-depose, .cpc-noir, .cpc-brume, .cpc-ramoneur, .cpc-cable, .cpc-herisson {
    opacity: 0 !important;
  }

  .cpc-nouveau, .cpc-buches, .cpc-label, .cpc-prime, .cpc-bloc, .cpc-fois, .cpc-liste {
    opacity: 1 !important;
    transform: none !important;
  }

  .cpc-coche { stroke-dashoffset: 0 !important; }
  .cpc-fumee { opacity: 1 !important; }
  .cpc-fumee circle { opacity: 0.7 !important; }
  .cpc-fumee circle:nth-child(2) { transform: translate(10px, -6px) scale(1.3) !important; }
  .cpc-fumee circle:nth-child(3) { transform: translate(20px, -10px) scale(1.6) !important; opacity: 0.4 !important; }

  .cpc-coef, .cpc-coef__barre, .cpc-coef__evolution, .cpc-revenus__part, .cpc-revenus__liste li {
    transition: none !important;
  }

  .foyer.anime-ok .fab-regions__panneau .cpc-coef,
  .foyer.anime-ok .fab-regions__panneau .cpc-coef__evolution,
  .foyer.anime-ok .fab-regions__panneau .cpc-revenus__liste li {
    opacity: 1 !important;
    transform: none !important;
  }

  .foyer.anime-ok .fab-regions__panneau .cpc-coef__barre { transform: none !important; }
  .foyer.anime-ok .fab-regions__panneau .cpc-revenus__part--tm { flex-basis: var(--tm) !important; }
  .foyer.anime-ok .fab-regions__panneau .cpc-revenus__part--pe { flex-basis: var(--pe) !important; }
}
