/* ============================================================
   « Vos codes — pack formateur » (11/10/2026, js/centre-codes.js)
   ------------------------------------------------------------
   Le même bloc dans l'espace Prépa TCF et dans le simulateur IELTS : il ne
   dépend d'AUCUNE classe de l'une ou l'autre (l'IELTS redéfinit .btn), et
   n'emploie que les variables de la charte du site (css/styles.css, chargée
   par les deux pages) — la nuit de la Prépa TCF suit d'elle-même.
   Un centre lit souvent ses codes au téléphone : tout tient à 375 px, et
   chaque bouton fait 44 px au doigt.
   ============================================================ */
[data-cc-monte][hidden] { display: none !important; }
.cc [hidden] { display: none !important; }
.cc { margin: 0 0 18px; }
/* L'IELTS pose ses bandeaux sur 1240 px, centrés : le bloc suit le bandeau d'accès. */
#ivCentre .cc { max-width: 1240px; margin: 16px auto 0; }
@media (max-width: 620px) { #ivCentre .cc { margin: 12px 14px 0; } }

.cc-entete h2 { font-family: Sora, sans-serif; font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.3; color: var(--navy-dark); margin: 0 0 4px; text-wrap: balance; }
.cc-entete p { margin: 0 0 12px; font-size: .875rem; line-height: 1.55; color: var(--muted); max-width: 70ch; }
.cc-entete b { color: var(--ink); font-weight: 600; }

.cc-pack { background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px 4px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.cc-tete { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 18px; }
.cc-titre { flex: 1 1 300px; min-width: 0; }
.cc-nomligne { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.cc-nomligne h3 { font-family: Sora, sans-serif; font-size: var(--fs-lg); font-weight: 700; line-height: 1.3;
  color: var(--navy-dark); margin: 0; overflow-wrap: anywhere; }
.cc-lien { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px; border: 0;
  background: none; color: var(--red-dark); font-family: inherit; font-size: .875rem; font-weight: 600; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.cc-lien:hover { text-decoration-thickness: 2px; }
.cc-lien svg { width: 15px; height: 15px; flex: none; }
.cc-meta { margin: 0; font-size: .875rem; line-height: 1.5; color: var(--muted); }
.cc-fin { margin: 2px 0 0; font-size: .875rem; line-height: 1.5; color: var(--ink); }
.cc-fin b { font-weight: 600; }
.cc-compte { flex: 0 0 auto; align-self: flex-start; margin: 6px 0 0; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: var(--r-pill); background: var(--bg); font-size: .875rem; line-height: 1.4; color: var(--muted); white-space: nowrap; }
.cc-compte b { font-family: Sora, sans-serif; font-size: 1rem; font-weight: 700; color: var(--red-dark);
  font-variant-numeric: tabular-nums; }

.cc-invite { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--blush);
  color: var(--red-ink); font-size: .875rem; line-height: 1.5; }

.cc-renommer { margin: 12px 0 0; padding: 12px 0 2px; border-top: 1px solid var(--line); }
.cc-renommer label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink); }
.cc-renommer-ligne { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.cc-renommer input { flex: 1 1 220px; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); background: var(--white); color: var(--ink); font-family: inherit; font-size: 1rem;
  caret-color: var(--red); transition: border-color .2s, box-shadow .2s; }
.cc-renommer input:focus { outline: none; border-color: var(--red); box-shadow: var(--ring); }
.cc-renommer input[aria-invalid="true"] { border-color: var(--red-dark); }
.cc-avis { margin: 6px 0 0; font-size: .875rem; line-height: 1.5; color: var(--red-ink); }
.cc-avis:empty { display: none; }

.cc-codes { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.cc-code { display: grid; grid-template-columns: minmax(9.75rem, auto) minmax(0, 1fr) auto; align-items: center;
  gap: 6px 18px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cc-code:last-child { border-bottom: 0; }
/* Le code se lit d'un coup d'œil et se dicte : grand, espacé, chiffres à chasse fixe.
   Ni 0, ni O, ni 1, ni I, ni L dans l'alphabet : la police du site suffit. */
.cc-code-val { font-family: Sora, sans-serif; font-size: var(--fs-lg); font-weight: 700; letter-spacing: .08em;
  font-variant-numeric: tabular-nums; color: var(--navy-dark); white-space: nowrap; }
.cc-code-val::selection, .cc-renommer input::selection { background: var(--red-fond); color: var(--sur-couleur); }
.cc-etat { font-size: .875rem; line-height: 1.4; color: var(--muted); }
.cc-libre .cc-etat { justify-self: start; padding: 3px 10px; border-radius: var(--r-pill); background: var(--teal-light);
  color: var(--teal-ink); font-weight: 600; }
.cc-utilise .cc-code-val, .cc-perdu .cc-code-val { color: var(--muted); }
.cc-annule .cc-code-val { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.cc-annule .cc-etat { color: var(--red-ink); font-weight: 600; }
.cc-actions { display: flex; gap: 8px; }

.cc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: transparent; color: var(--navy-dark);
  font-family: inherit; font-size: .875rem; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s; }
.cc-btn svg { width: 17px; height: 17px; flex: none; }
.cc svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cc-btn:hover { border-color: var(--navy-dark); background: var(--bg); color: var(--navy-dark); }
.cc-btn:active { transform: scale(.98); }
.cc-btn:focus-visible, .cc-lien:focus-visible, .cc-ailleurs a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
/* Blanc sur le vert foncé (pas --teal, à 4,3:1), comme .btn-whatsapp du site. */
.cc-btn-wa, .cc-btn-wa:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--sur-couleur); }
.cc-btn-wa:hover { box-shadow: inset 0 0 0 100vmax rgba(0, 0, 0, .14); }
.cc-btn-rouge { background: var(--red-fond); border-color: var(--red-fond); color: var(--sur-couleur); }
.cc-btn-rouge:hover { background: var(--red-deep); border-color: var(--red-deep); color: var(--sur-couleur); }
.cc-btn[disabled] { opacity: .65; cursor: progress; }
.cc-btn.cc-fait, .cc-btn.cc-fait:hover { border-color: var(--teal-dark); background: var(--teal-light); color: var(--teal-ink); }

.cc-termine { background: var(--bg); box-shadow: none; }
.cc-termine .cc-nomligne h3 { color: var(--muted); }
.cc-ailleurs { margin: 2px 0 0; font-size: .875rem; line-height: 1.5; color: var(--muted); }
.cc-ailleurs a { color: var(--red-dark); font-weight: 600; text-underline-offset: 3px; }
.cc-statut { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 600px) {
  .cc-pack { padding: 14px 14px 4px; }
  .cc-compte { margin-top: 2px; }
  .cc-code { grid-template-columns: minmax(9.75rem, auto) minmax(0, 1fr); gap: 8px 12px; padding: 12px 0; }
  .cc-actions { grid-column: 1 / -1; }
  .cc-actions .cc-btn { flex: 1 1 auto; gap: 6px; padding: 8px 10px; white-space: normal; text-align: center; }
}
/* Chez l'élève (simulateur IELTS) : « Access provided by … », une ligne discrète
   sous l'état de l'accès. L'espace TCF a la sienne (.etcf-acces small). */
.iv-acces-offert { display: block; margin-top: 2px; color: var(--muted); }
.iv-acces-offert b { color: var(--ink); font-weight: 600; }

@media (prefers-reduced-motion: reduce) { .cc-btn, .cc-renommer input { transition: none; } .cc-btn:active { transform: none; } }
