/* Cartes cadeaux (2/12/2026, pré-production) : page d'achat A (/offrir/), page « merci » et enveloppe B (/cadeau/),
   d'après les maquettes https://claude.ai/artifact/2AzEmi6WhfYhKubAtSQRq6. Couleurs de la charte. */
.cg { --cg-rouge: #8c3c39; --cg-or: #c59b6c; --cg-or-t: #8a6638; --cg-encre: #1c1917; --cg-texte: #3a3431; --cg-gris: #5c5550;
  --cg-beige: #f5f2ef; --cg-rose: #f6edec; --cg-trait: #e5e0db; --cg-bord: #8c847e; --cg-or-clair: #e8c99f;
  color: var(--cg-texte); font-size: 16px; line-height: 1.6; }
.cg *, .cg *::before, .cg *::after { box-sizing: border-box; }
.cg h1, .cg h2, .cg p { margin: 0; }
.cg h1 { font-family: Buda, Georgia, serif; font-weight: 700; text-wrap: balance; }
.cg-largeur { max-width: 1104px; margin: 0 auto; padding-left: clamp(16px, 4vw, 32px); padding-right: clamp(16px, 4vw, 32px); }
.cg-sur { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--cg-or-t); }
.cg-gris { font-size: 14px; color: var(--cg-gris); }
.cg-masque { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#content.cx-refonte .cg-bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px;
  border: 0; border-radius: 4px; background: var(--cg-rouge); color: #fff; font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.2;
  text-decoration: none; cursor: pointer; }
#content.cx-refonte .cg-bouton:disabled { opacity: .6; cursor: not-allowed; }
#content.cx-refonte .cg-bouton.cg-or { background: var(--cg-or); color: var(--cg-encre); }
#content.cx-refonte .cg-bouton.cg-trait { background: #fff; color: var(--cg-encre); box-shadow: inset 0 0 0 1px var(--cg-bord); }
#content.cx-refonte .cg-lien { background: none; border: 0; padding: 8px 4px; min-height: 44px; font: inherit; font-size: 15px; color: var(--cg-gris); text-decoration: underline; cursor: pointer; }

/* --- Page d'achat --- */
.cg-haut { background: var(--cg-rouge); color: #fff; }
.cg-haut .cg-largeur { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.cg-haut-texte { display: flex; flex-direction: column; gap: 16px; }
.cg-haut .cg-sur { color: var(--cg-or-clair); }
.cg-haut h1 { font-size: clamp(36px, 4.4vw, 52px); line-height: 1.08; color: #fff; }
.cg-haut p.cg-chapeau { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; color: var(--cg-rose); max-width: 560px; }
.cg-haut-env { display: flex; justify-content: center; }
.cg-haut-env .cg-env { transform: rotate(-4deg); }
.cg-etapes { display: flex; flex-direction: column; gap: 44px; padding-top: 48px; padding-bottom: 72px; }
.cg-etape { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cg-etape-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.cg-etape-titre { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; color: #000; }
.cg-etape-titre i { font-style: normal; width: 30px; height: 30px; border-radius: 999px; background: var(--cg-rouge); color: #fff; display: inline-grid; place-items: center; font-size: 14px; flex: none; }
.cg-onglets { display: inline-flex; padding: 4px; border-radius: 6px; background: var(--cg-beige); gap: 4px; }
.cg-onglets button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 4px; background: transparent; font: inherit; font-weight: 700; font-size: 15px; color: var(--cg-gris); cursor: pointer; }
.cg-onglets button[aria-pressed="true"] { background: #fff; color: var(--cg-rouge); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.cg-formations { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.cg-formation { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; white-space: normal; border-radius: 6px; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 1px var(--cg-trait); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.cg-formation:hover { box-shadow: 0 0 0 1px var(--cg-bord); }
.cg-formation[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--cg-rouge); }
.cg-formation:disabled { cursor: not-allowed; }
.cg-formation:disabled img { filter: grayscale(1); opacity: .55; }
.cg-formation img { width: 100%; height: 132px; object-fit: cover; display: block; }
.cg-formation span.cg-f-texte { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.cg-formation b { font-size: 15px; line-height: 1.3; color: #000; }
.cg-formation small { font-size: 13px; line-height: 1.4; color: var(--cg-gris); }
.cg-formation strong { font-family: Buda, Georgia, serif; font-size: 20px; line-height: 1.2; color: var(--cg-rouge); }
.cg-formation em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--cg-rouge); }
.cg-coche { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 999px; background: var(--cg-rouge); color: #fff; display: grid; place-items: center; }
.cg-montants { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cg-montants button { min-width: 88px; min-height: 52px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--cg-bord); background: #fff; font: inherit; font-weight: 700; font-size: 17px; color: #000; cursor: pointer; }
.cg-montants button[aria-pressed="true"] { background: var(--cg-rouge); border-color: var(--cg-rouge); color: #fff; }
.cg-autre { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: #000; }
.cg-autre input { width: 120px; }
.cg-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: end; }
.cg-champs .cg-large { grid-column: 1 / -1; }
.cg label.cg-champ { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: #000; min-width: 0; }
.cg label.cg-champ em { font-style: normal; font-weight: 400; color: var(--cg-gris); }
.cg input[type="text"], .cg input[type="email"], .cg input[type="tel"], .cg input[type="number"], .cg input[type="date"], .cg textarea {
  min-height: 48px; width: 100%; border: 1px solid var(--cg-bord); border-radius: 4px; padding: 11px 14px; font: inherit; font-size: 16px; font-weight: 400; color: #000; background: #fff; }
.cg textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.cg input:focus-visible, .cg textarea:focus-visible, .cg button:focus-visible { outline: 3px solid var(--cg-or); outline-offset: 2px; }
.cg-quand { display: flex; flex-direction: column; gap: 10px; }
.cg-choix { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; border-radius: 6px; box-shadow: 0 0 0 1px var(--cg-trait); cursor: pointer; flex-wrap: wrap; }
.cg-choix:has(input:checked) { box-shadow: 0 0 0 2px var(--cg-rouge); }
.cg-choix input[type="radio"] { width: 20px; height: 20px; accent-color: var(--cg-rouge); margin: 0; flex: none; }
.cg-choix span { font-weight: 700; color: #000; }
.cg-choix small { font-size: 14px; color: var(--cg-gris); }
.cg-choix input[type="date"] { width: auto; min-height: 44px; padding: 6px 10px; }
.cg-payer { display: flex; flex-direction: column; gap: 24px; }
.cg-payer-gauche { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 640px; }
.cg-resume { border-radius: 6px; box-shadow: 0 0 0 1px var(--cg-trait); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.cg-resume p { display: flex; justify-content: space-between; gap: 16px; }
.cg-resume b { color: #000; }
.cg-resume .cg-gris { font-size: 14px; }
.cg-apercu { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 24px; border-radius: 8px; background: var(--cg-beige); }
.cg-apercu-zone { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
.cg-apercu-zone > .cg-carte:only-child { max-width: 400px; }
.cg-erreur { padding: 12px 16px; border-radius: 6px; background: var(--cg-rose); color: var(--cg-rouge); font-weight: 700; font-size: 15px; }
.cg-info { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 6px; background: var(--cg-beige); font-size: 14px; line-height: 1.5; }
.cg-piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#content.cx-refonte .cg-payer .cg-bouton { width: 100%; min-height: 56px; font-size: 17px; }

/* --- La carte cadeau --- */
/* Format fixe d'une vraie carte cadeau (format carte bancaire, 85,6 × 54 mm ; 4/12/2026, demande de Nicolas) : la
   hauteur suit la largeur, quel que soit le contenu ; le bas (code, validité) reste collé en bas. */
.cg-carte { position: relative; box-sizing: border-box; aspect-ratio: 85.6 / 53.98; border-radius: 12px; background: var(--cg-rouge); color: #fff; padding: 22px 24px; display: flex; flex-direction: column; gap: 10px;
  overflow: hidden; box-shadow: 0 18px 40px rgba(58,52,49,.28); text-align: left; }
.cg-carte::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 999px; border: 2px solid rgba(197,155,108,.45); pointer-events: none; }
.cg-carte img { width: 170px; height: auto; }
.cg-carte .cg-lbl { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--cg-or-clair); }
.cg-carte .cg-quoi { font-family: Buda, Georgia, serif; font-weight: 700; font-size: 26px; line-height: 1.15; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cg-carte .cg-quoi.cg-somme { font-size: 40px; }
.cg-carte .cg-msg { font-size: 14px; line-height: 1.5; color: var(--cg-rose); font-style: italic; overflow-wrap: anywhere; }
.cg-carte .cg-bas { margin-top: auto; display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--cg-or-clair); border-top: 1px solid rgba(232,201,159,.35); padding-top: 10px; }
.cg-env .cg-carte { padding: 16px 18px; gap: 6px; border-radius: 8px; }
.cg-env .cg-carte img { width: 110px; }
.cg-env .cg-carte .cg-lbl { font-size: 9px; }
.cg-env .cg-carte .cg-quoi { font-size: 18px; }
.cg-env .cg-carte .cg-quoi.cg-somme { font-size: 32px; }
.cg-env .cg-carte .cg-msg { font-size: 11px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cg-env .cg-carte .cg-bas { font-size: 9px; padding-top: 6px; }

/* --- L'enveloppe : le rabat bascule, puis la carte sort --- */
.cg-env { position: relative; width: 340px; height: 230px; perspective: 900px; filter: drop-shadow(0 22px 26px rgba(0,0,0,.38)) drop-shadow(0 4px 6px rgba(0,0,0,.25)); flex: none; }
.cg-env .cg-fond { position: absolute; inset: 0; border-radius: 8px; background: linear-gradient(180deg, #5e2523 0%, #742f2c 100%); }
.cg-env .cg-devant { position: absolute; inset: 0; border-radius: 8px; z-index: 3; overflow: hidden;
  background: linear-gradient(to top right, transparent 49.6%, rgba(0,0,0,.18) 50%, transparent 52%) left / 50% 100% no-repeat,
    linear-gradient(to top left, transparent 49.6%, rgba(0,0,0,.18) 50%, transparent 52%) right / 50% 100% no-repeat,
    linear-gradient(to top right, #8a3a37 0%, #7a3330 49.8%, transparent 50%) left / 50% 100% no-repeat,
    linear-gradient(to top left, #8a3a37 0%, #7a3330 49.8%, transparent 50%) right / 50% 100% no-repeat; }
.cg-env .cg-devant::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 58%; clip-path: polygon(0 100%, 50% 0, 100% 100%);
  background: linear-gradient(180deg, #8f3e3a 0%, #a8524d 55%, #b45b55 100%); }
.cg-env .cg-devant::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60%; z-index: 1; clip-path: polygon(0 100%, 50% 0, 100% 100%, 98% 100%, 50% 4%, 2% 100%); background: rgba(0,0,0,.22); }
.cg-env .cg-rabat { position: absolute; left: 0; right: 0; top: 0; height: 60%; z-index: 4; clip-path: polygon(0 0, 100% 0, 50% 100%); clip-path: path("M 8 0 H 332 Q 340 0 333.8 5 L 180.9 129.2 Q 170 138 159.1 129.2 L 6.2 5 Q 0 0 8 0 Z");
  background: linear-gradient(180deg, #b85d57 0%, #a24c47 45%, #8c3c39 100%); transform-origin: top; transition: transform .9s cubic-bezier(.4,.1,.2,1), z-index 0s .45s; }
.cg-env .cg-rabat::after { content: ""; position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 50% 100%, 50% 96%, 96% 2%, 4% 2%, 50% 96%, 50% 100%);
  clip-path: path(evenodd, "M 8 0 H 332 Q 340 0 333.8 5 L 180.9 129.2 Q 170 138 159.1 129.2 L 6.2 5 Q 0 0 8 0 Z M 20 2.8 H 320 Q 326.4 2.8 321.5 7 L 179.5 124.8 Q 170 132.5 160.5 124.8 L 18.5 7 Q 13.6 2.8 20 2.8 Z"); background: rgba(255,255,255,.14); }
.cg-env .cg-ombre-rabat { position: absolute; left: 0; right: 0; top: 0; height: 66%; z-index: 3; clip-path: polygon(0 0, 100% 0, 50% 100%);
  clip-path: path("M 8 0 H 332 Q 340 0 334 5.3 L 180.4 142.5 Q 170 151.8 159.6 142.5 L 6 5.3 Q 0 0 8 0 Z"); background: rgba(0,0,0,.28); filter: blur(2px); transition: opacity .4s; }
.cg-env .cg-cachet { position: absolute; left: 50%; top: 58%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 999px; z-index: 5; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #e2bf91 0%, #c59b6c 55%, #a57d50 100%); box-shadow: 0 6px 12px rgba(0,0,0,.35), inset 0 -3px 6px rgba(0,0,0,.18), inset 0 2px 3px rgba(255,255,255,.35); transition: opacity .3s, transform .4s; }
.cg-env .cg-cachet img { width: 44px; height: 44px; object-fit: contain; }
.cg-env .cg-sortie { position: absolute; left: 14px; right: 14px; bottom: 10px; z-index: 2; opacity: 0; transition: transform 1.1s cubic-bezier(.2,.8,.2,1) .7s, opacity .2s .6s; }
/* Rabat aux bords arrondis (pointe et coins, 4/12/2026) : tracé en pixels, l'enveloppe mesure toujours 340 × 230
   (les tailles d'écran la mettent à l'échelle). */
/* Rabat ouvert : il bascule autour du bord de l'enveloppe et reste à sa place, sans aucun calage ensuite (4/12/2026,
   demande de Nicolas). Ses coins arrondis évitent les pointes à côté de la carte. */
.cg-env.cg-ouvert .cg-rabat { transform: rotateX(180deg); z-index: 1; }
.cg-env.cg-ouvert .cg-ombre-rabat { opacity: 0; }
.cg-env.cg-ouvert .cg-cachet { opacity: 0; transform: scale(.6); }
/* La carte reste derrière le devant de l'enveloppe du début à la fin et sort jusqu'au bord : plus de saut de ses angles
   du bas en fin de course (4/12/2026). « Revoir l'ouverture » referme d'un coup (cg-sans-anim) avant de rouvrir. */
.cg-env.cg-ouvert .cg-sortie { opacity: 1; transform: translateY(-205px); transition: transform 1.1s cubic-bezier(.2,.8,.2,1) .7s, opacity .2s .6s; }
.cg-env.cg-sans-anim, .cg-env.cg-sans-anim * { transition: none !important; }
.cg-env.cg-creme .cg-fond { background: linear-gradient(180deg, #cdbda6 0%, #ddcfbb 100%); }
.cg-env.cg-creme .cg-rabat { background: linear-gradient(180deg, #faf4ec 0%, #f0e6d8 50%, #e2d4c0 100%); }
.cg-env.cg-creme .cg-devant { background: linear-gradient(to top right, transparent 49.6%, rgba(0,0,0,.12) 50%, transparent 52%) left / 50% 100% no-repeat,
    linear-gradient(to top left, transparent 49.6%, rgba(0,0,0,.12) 50%, transparent 52%) right / 50% 100% no-repeat,
    linear-gradient(to top right, #efe4d4 0%, #e3d5c1 49.8%, transparent 50%) left / 50% 100% no-repeat,
    linear-gradient(to top left, #efe4d4 0%, #e3d5c1 49.8%, transparent 50%) right / 50% 100% no-repeat; }
.cg-env.cg-creme .cg-devant::after { background: linear-gradient(180deg, #e6d9c6 0%, #f4ebdf 55%, #faf4ec 100%); }
.cg-env.cg-creme .cg-devant::before { background: rgba(0,0,0,.14); }
.cg-env.cg-creme .cg-ombre-rabat { background: rgba(0,0,0,.16); }
.cg-env.cg-creme .cg-cachet { background: radial-gradient(circle at 35% 30%, #b0524d 0%, #8c3c39 55%, #6d2c29 100%); }
.cg-env.cg-creme .cg-cachet img { filter: brightness(0) invert(.92) sepia(.4); }

/* --- La page de l'enveloppe (nuit étoilée) --- */
#content.cx-refonte .cg-nuit { position: relative; overflow: hidden; min-height: max(760px, calc(100vh - 120px)); display: flex; flex-direction: column; align-items: center;
  padding: 36px 20px 40px; gap: 10px; color: #fff; text-align: center; background: radial-gradient(ellipse at 50% 30%, #3a2a26 0%, #1c1917 65%); }
.cg-nuit .cg-sur { color: var(--cg-or-clair); position: relative; }
.cg-nuit h1 { position: relative; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; color: #fff; max-width: 820px; }
.cg-nuit .cg-de { position: relative; font-size: 17px; color: #c9c2bb; }
.cg-scene { position: relative; margin-top: 240px; transform: scale(1.15); transform-origin: top center; }
.cg-nuit .cg-actions { position: relative; margin-top: 70px; display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 560px; }
.cg-nuit .cg-actions p { font-size: 16px; line-height: 1.5; color: #e5e0db; }
.cg-nuit .cg-boutons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cg-nuit .cg-lien { color: #c9c2bb !important; }
.cg-nuit .cg-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 22px; letter-spacing: .12em; color: #fff; padding: 10px 18px; border: 1px dashed var(--cg-or-clair); border-radius: 6px; }
@keyframes cg-scintille { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.cg-etoile { position: absolute; width: 4px; height: 4px; border-radius: 99px; background: var(--cg-or-clair); animation: cg-scintille 3s ease-in-out infinite; }
@keyframes cg-flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.cg-flotte { animation: cg-flotte 3.2s ease-in-out infinite; }
@keyframes cg-apparait { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.cg-apres { animation: cg-apparait .7s ease 1.7s both; }
.cg-confirmer { position: relative; width: 100%; max-width: 560px; margin-top: 8px; padding: 22px; border-radius: 8px; background: #fff; color: var(--cg-texte); text-align: left; display: flex; flex-direction: column; gap: 14px; }
.cg-confirmer h2 { font-family: Buda, Georgia, serif; font-size: 24px; line-height: 1.2; color: var(--cg-rouge); }
.cg-confirmer .cg-champs { gap: 12px; }
.cg-case { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.cg-case input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--cg-rouge); flex: none; }
@media (prefers-reduced-motion: reduce) {
  .cg-env .cg-rabat, .cg-env .cg-sortie, .cg-env .cg-cachet, .cg-env .cg-ombre-rabat { transition-duration: .01s !important; transition-delay: 0s !important; }
  .cg-etoile, .cg-flotte { animation: none; }
  .cg-apres { animation-duration: .01s; animation-delay: 0s; }
}

/* --- Page « merci » --- */
.cg-merci { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; padding-top: 64px; padding-bottom: 80px; max-width: 680px; margin: 0 auto; }
.cg-merci h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; color: var(--cg-rouge); }
.cg-merci .cg-env { margin: 10px 0 18px; }

/* --- Téléphone --- */
@media (max-width: 860px) {
  .cg-haut .cg-largeur { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 36px; padding-bottom: 44px; }
  .cg-haut-env .cg-env { transform: rotate(-4deg) scale(.82); margin: -12px 0; }
  .cg-payer { grid-template-columns: minmax(0, 1fr); }
  .cg-apercu-zone { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .cg-champs { grid-template-columns: minmax(0, 1fr); }
  .cg-apercu { padding: 16px; }
  .cg-resume p.cg-gris { flex-direction: column; gap: 2px; }
  .cg-etapes { gap: 36px; padding-top: 32px; }
  .cg-onglets { width: 100%; }
  .cg-onglets button { flex: 1; padding: 0 10px; }
  .cg-formation { flex-direction: row; }
  .cg-formation img { width: 104px; height: auto; min-height: 104px; flex: none; }
  .cg-formation span.cg-f-texte { padding: 10px 44px 10px 12px; }
  .cg-coche { top: auto; bottom: 10px; }
  .cg-scene { margin-top: 225px; transform: scale(1.02); }
  .cg-env-fixe { transform: scale(.9); }
  .cg-merci .cg-env { transform: scale(.85); }
}
@media (max-width: 380px) {
  .cg-scene { transform: scale(.92); }
}

/* --- Onglet « Cartes cadeaux » du suivi des formations courtes (composants/SuiviCadeaux.tsx) --- */
.cg-suivi { display: flex; flex-direction: column; gap: 20px; }
.cg-suivi-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.cg-suivi-chiffres div { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 4px; background: #f5f2ef; }
.cg-suivi-chiffres b { font-size: 26px; line-height: 1.1; color: #8c3c39; font-variant-numeric: tabular-nums; }
.cg-suivi-chiffres span { font-weight: 700; color: #000; font-size: 14px; }
.cg-suivi-chiffres small { font-size: 13px; color: #5c5550; }
.cg-suivi-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cg-suivi-liste > li { padding: 16px 18px; border-radius: 4px; box-shadow: 0 0 0 1px #e5e0db; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cg-suivi-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cg-suivi-tete b { font-size: 17px; color: #000; }
.cg-suivi-tete code { font-size: 13px; letter-spacing: .06em; color: #5c5550; }
.cg-suivi-liste dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; font-size: 14px; }
.cg-suivi-liste dl div { display: contents; }
.cg-suivi-liste dt { color: #5c5550; }
.cg-suivi-liste dd { margin: 0; overflow-wrap: anywhere; }
.cg-suivi-util { display: block; }
.cg-suivi-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
#content.cx-refonte .cg-suivi-actions button, #content.cx-refonte .cg-suivi-form button, #content.cx-refonte .cg-suivi-essais button {
  min-height: 40px; padding: 0 14px; border: 1px solid #8c3c39; border-radius: 4px; background: #fff; color: #8c3c39; font-size: 14px; font-weight: 700; cursor: pointer; }
.cg-suivi-actions a { font-size: 14px; font-weight: 700; color: #8c3c39; }
.cg-suivi-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding: 12px; border-radius: 4px; background: #f5f2ef; }
.cg-suivi-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; min-width: 0; }
.cg-suivi-form input { min-height: 40px; padding: 6px 10px; border: 1px solid #8c847e; border-radius: 4px; font: inherit; font-size: 15px; font-weight: 400; }
.cg-suivi-essais { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px; border: 1px dashed #8c847e; border-radius: 4px; }
@media (max-width: 600px) { .cg-suivi-liste dl { grid-template-columns: minmax(0, 1fr); } .cg-suivi-liste dt { margin-top: 6px; } }

/* Le thème WordPress d'origine colore tout bouton survolé ou cliqué (rose) : chaque bouton de ces pages garde ses couleurs. */
#content.cx-refonte .cg-formation, #content.cx-refonte .cg-formation:hover, #content.cx-refonte .cg-formation:focus { background: #fff; color: inherit; }
#content.cx-refonte .cg-onglets button, #content.cx-refonte .cg-onglets button:hover, #content.cx-refonte .cg-onglets button:focus { background: transparent; color: #5c5550; }
#content.cx-refonte .cg-onglets button[aria-pressed="true"], #content.cx-refonte .cg-onglets button[aria-pressed="true"]:hover, #content.cx-refonte .cg-onglets button[aria-pressed="true"]:focus { background: #fff; color: #8c3c39; }
#content.cx-refonte .cg-montants button, #content.cx-refonte .cg-montants button:hover, #content.cx-refonte .cg-montants button:focus { background: #fff; color: #000; }
#content.cx-refonte .cg-montants button[aria-pressed="true"], #content.cx-refonte .cg-montants button[aria-pressed="true"]:hover, #content.cx-refonte .cg-montants button[aria-pressed="true"]:focus { background: #8c3c39; color: #fff; }
#content.cx-refonte .cg-bouton:hover, #content.cx-refonte .cg-bouton:focus { background: #73302d; color: #fff; }
#content.cx-refonte .cg-bouton.cg-or:hover, #content.cx-refonte .cg-bouton.cg-or:focus { background: #b48a5b; color: #1c1917; }
#content.cx-refonte .cg-bouton.cg-trait:hover, #content.cx-refonte .cg-bouton.cg-trait:focus { background: #f5f2ef; color: #1c1917; }
#content.cx-refonte .cg-lien:hover, #content.cx-refonte .cg-lien:focus { background: none; color: #3a3431; }
#content.cx-refonte .cg-suivi-actions button:hover, #content.cx-refonte .cg-suivi-actions button:focus, #content.cx-refonte .cg-suivi-form button:hover,
#content.cx-refonte .cg-suivi-form button:focus, #content.cx-refonte .cg-suivi-essais button:hover, #content.cx-refonte .cg-suivi-essais button:focus { background: #f6edec; color: #8c3c39; }

/* Démonstration en pré-production (4/12/2026) : /cadeau/?demo=montant ou ?demo=formation */
.cg-demo { position: relative; z-index: 1; margin: 0 auto 8px; padding: 6px 12px; border-radius: 4px; background: rgba(255,255,255,.12); color: #fff; font-size: 13px; font-weight: 700; text-align: center; }

/* Le choix « atelier ou montant » en deux grandes cartes (4/12/2026, proposition 1A) */
.cg-sortes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
#content.cx-refonte .cg-sorte { position: relative; display: flex; align-items: center; gap: 18px; padding: 20px 52px 20px 22px; border: 0; border-radius: 8px;
  background: #fff; box-shadow: 0 0 0 1px var(--cg-bord); text-align: left; font: inherit; color: inherit; cursor: pointer; }
#content.cx-refonte .cg-sorte:hover { box-shadow: 0 0 0 2px var(--cg-bord); background: #fff; color: inherit; }
#content.cx-refonte .cg-sorte[aria-pressed="true"] { background: var(--cg-rose); box-shadow: 0 0 0 3px var(--cg-rouge); }
.cg-sorte-rond { flex: none; width: 56px; height: 56px; border-radius: 999px; display: grid; place-items: center; background: var(--cg-beige); color: var(--cg-rouge); }
.cg-sorte[aria-pressed="true"] .cg-sorte-rond { background: var(--cg-rouge); color: #fff; }
.cg-sorte-texte { display: flex; flex-direction: column; gap: 4px; min-width: 0; white-space: normal; }
.cg-sorte-texte b { font-family: Buda, Georgia, serif; font-size: 24px; line-height: 1.15; color: var(--cg-encre); }
.cg-sorte[aria-pressed="true"] .cg-sorte-texte b { color: var(--cg-rouge); }
.cg-sorte-texte span { font-size: 15px; line-height: 1.45; color: var(--cg-gris); }
.cg-sorte .cg-coche { top: 12px; right: 12px; width: 28px; height: 28px; }
@media (max-width: 700px) {
  .cg-sortes { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #content.cx-refonte .cg-sorte { padding: 16px 48px 16px 16px; gap: 14px; }
  .cg-sorte-rond { width: 48px; height: 48px; }
  .cg-sorte-texte b { font-size: 21px; }
  .cg-sorte-texte span { font-size: 14px; }
  .cg-sorte .cg-coche { top: 50%; bottom: auto; margin-top: -14px; }
}

/* La lettre du mot (proposition 2B) : à côté de l'enveloppe sur ordinateur, dessous sur téléphone ; elle apparaît quand
   la carte est sortie. */
.cg-lettre { margin: 0; width: 380px; max-width: 100%; box-sizing: border-box; padding: 28px 30px 24px; border-radius: 4px; background: #faf4ec;
  color: var(--cg-encre); text-align: left; box-shadow: 0 18px 36px rgba(0,0,0,.4); transform: rotate(2deg); display: flex; flex-direction: column; gap: 12px; }
.cg-lettre img { width: 40px; height: auto; }
.cg-lettre figcaption { font-family: Buda, Georgia, serif; font-weight: 700; font-size: 26px; line-height: 1.2; color: var(--cg-rouge); overflow-wrap: anywhere; }
.cg-lettre blockquote { margin: 0; font-size: 18px; line-height: 1.65; font-style: italic; color: var(--cg-texte); overflow-wrap: anywhere; }
.cg-lettre-de { align-self: flex-end; font-family: Buda, Georgia, serif; font-weight: 700; font-size: 26px; line-height: 1.2; color: var(--cg-rouge); }
.cg-apercu .cg-lettre { width: auto; transform: none; box-shadow: 0 4px 14px rgba(58,52,49,.12); padding: 18px 20px; gap: 8px; }
.cg-apercu .cg-lettre img { width: 30px; }
.cg-apercu .cg-lettre figcaption, .cg-apercu .cg-lettre-de { font-size: 20px; }
.cg-apercu .cg-lettre blockquote { font-size: 15px; }
.cg-scene-ligne { position: relative; display: flex; align-items: center; justify-content: center; gap: 72px; width: 100%; }
.cg-scene-ligne .cg-lettre { opacity: 0; visibility: hidden; transform: rotate(2deg) translateY(14px); transition: opacity .2s, visibility 0s .2s; }
.cg-scene-ligne .cg-lettre.cg-visible { opacity: 1; visibility: visible; transform: rotate(2deg); transition: opacity .7s ease 1.6s, transform .7s ease 1.6s, visibility 0s 1.6s; }
@media (max-width: 900px) {
  .cg-scene-ligne { flex-direction: column; gap: 64px; }
  .cg-scene-ligne .cg-lettre { width: 100%; max-width: 420px; transform: rotate(1.5deg) translateY(14px); }
  .cg-scene-ligne .cg-lettre:not(.cg-visible) { display: none; }
  .cg-scene-ligne .cg-lettre.cg-visible { transform: rotate(1.5deg); }
  @starting-style { .cg-scene-ligne .cg-lettre.cg-visible { opacity: 0; transform: rotate(1.5deg) translateY(14px); } }
}
@media (prefers-reduced-motion: reduce) { .cg-scene-ligne .cg-lettre { transition-duration: .01s !important; transition-delay: 0s !important; } }
