/* ==========================================================================
   PROGRESSER EN RANKED (maquette client « progresser-en-ranked »)

   Page jumelle du mode triche et du crosshair. Elle réutilise donc quatre
   feuilles déjà en place : agent.css pour le reset et le fil d'Ariane,
   listing.css pour le bandeau et ses pastilles, guide.css pour la mise en page
   à deux colonnes, le sommaire, les chapitres et le bloc « Pour aller plus
   loin », et mode-triche.css pour la barre de progression, les encadrés et la
   FAQ en questions ouvertes.

   Ne restent ici que ses blocs propres : les neuf rangs, les tableaux, les
   cinq boîtes d'erreurs avec leur correctif, et le protocole numéroté.
   ========================================================================== */

  .ranked-page .intro-p { font-size: 0.98rem !important; }

  /* ===== FIGURE ===== */
  .ranked-page figure { margin: 0 0 26px; }
  .ranked-page figure img { width: 100%; height: auto; display: block; border-radius: 16px; border: 1px solid #ececec; }

  /* ===== LES NEUF RANGS =====
     Le badge est dessiné en CSS, sa couleur vient de la vue : aucune image de
     rang n'est nécessaire, rien à rapatrier. */
  .ranks { display: grid; gap: 8px; margin: 22px 0; }
  .rank {
    display: flex; align-items: center; gap: 14px; padding: 13px 18px; background: var(--white);
    border: 1px solid #ececec; border-radius: 12px; transition: all 0.2s;
  }
  .rank:hover { transform: translateX(3px); box-shadow: 0 6px 20px rgba(0,0,0,0.04); }
  .rank .r-badge {
    width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center;
    justify-content: center; font-family: 'Bebas Neue', sans-serif; font-size: 0.8rem;
    color: rgba(255,255,255,0.95); letter-spacing: 0.5px;
  }
  .rank .r-name { font-size: 0.9rem; font-weight: 700; color: var(--dark); width: 96px; flex-shrink: 0; }
  .rank .r-tiers { font-size: 0.68rem; font-weight: 700; color: #c0c0c0; width: 66px; flex-shrink: 0; }
  .rank .r-desc { font-size: 0.83rem; color: var(--text-light); line-height: 1.55; }

  /* ===== TABLEAUX ===== */
  /* Légende posée AU-DESSUS du cadre, plus en caption : calibrage des tableaux
     de trouver sa sensibilité et de souris. Le bandeau sombre est ainsi le
     premier élément du cadre arrondi, d'où le border-top retiré. */
  .ranked-page .table-note { margin: 22px 0 0; text-align: left; font-size: 0.76rem;
    color: var(--text-light); font-style: italic; }
  .ranked-page .table-note + .table-wrap { margin-top: 10px; }
  .ranked-page .table-wrap { border: 1px solid #ececec; border-top: 0; border-radius: 16px; overflow: hidden; background: var(--white); margin: 22px 0; }
  .ranked-page table { width: 100%; border-collapse: collapse; }
  /* Intitulés de colonnes au calibrage du carrefour : à 0,72 rem et 55 % de
     blanc ils se lisaient mal sur le bleu nuit. */
  .ranked-page table thead th {
    background: var(--dark); color: rgba(255,255,255,0.85); font-family: 'Bebas Neue', sans-serif;
    font-size: 0.95rem; letter-spacing: 1.6px; text-transform: uppercase; text-align: left;
    padding: 13px 20px; font-weight: 400;
  }
  .ranked-page table thead th:first-child { color: rgba(255,255,255,0.95); }
  .ranked-page table tbody tr { border-top: 1px solid #f2f2f2; transition: background 0.2s; }
  .ranked-page table tbody tr:hover { background: #fdf7f8; }
  .ranked-page table th[scope="row"] { text-align: left; padding: 14px 20px; font-size: 0.85rem; font-weight: 700; color: var(--dark); white-space: nowrap; }
  .ranked-page table td { padding: 14px 20px; font-size: 0.82rem; color: var(--text-light); line-height: 1.65; }
  .ranked-page table td.num { font-family: 'Bebas Neue', sans-serif; font-size: 1rem; color: var(--dark); letter-spacing: 0.5px; }

  /* ===== LES CINQ ERREURS =====
     Chaque boîte porte son numéro et son correctif. L'emoji du correctif est
     retiré, aucun visuel du projet ne dit ce sujet, le libellé porte le sens. */
  .errs { display: grid; gap: 16px; margin-top: 22px; }
  .errbox { background: var(--white); border: 1px solid #ececec; border-radius: 16px; overflow: hidden; transition: all 0.24s; }
  .errbox:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.06); }
  .errbox-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px 15px; border-bottom: 1px solid #f2f2f2; }
  .errbox-head .e-n {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; background: #fdeceb; color: #b83c37;
    font-family: 'Bebas Neue', sans-serif; font-size: 1rem;
    display: flex; align-items: center; justify-content: center; letter-spacing: 0.5px;
  }
  .errbox-head h3 { margin: 0; font-size: 1rem; }
  .errbox-body { padding: 18px 22px 20px; }
  .ranked-page .errbox-body p { margin-bottom: 12px; }
  .ranked-page .errbox-body p:last-child { margin-bottom: 0; }

  .fix { margin-top: 14px; padding: 14px 16px; border-radius: 11px; background: #eefaf7; border-left: 3px solid #4cc9b0; }
  .fix .f-t { font-size: 0.63rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; color: #38a892; margin-bottom: 6px; }
  .ranked-page .fix p { margin: 0 !important; font-size: 0.85rem !important; color: #2f6659 !important; line-height: 1.72 !important; }

  /* ===== LE PROTOCOLE ===== */
  .proto { position: relative; margin: 22px 0; padding-left: 44px; }
  .proto::before { content: ''; position: absolute; left: 15px; top: 14px; bottom: 14px; width: 2px; background: #ececec; }
  .pstep { position: relative; margin-bottom: 22px; }
  .pstep:last-child { margin-bottom: 0; }
  .pstep::before {
    content: attr(data-n); position: absolute; left: -44px; top: 0; width: 32px; height: 32px;
    border-radius: 10px; background: var(--coral); color: white;
    font-family: 'Bebas Neue', sans-serif; font-size: 0.95rem;
    display: flex; align-items: center; justify-content: center; letter-spacing: 0.5px;
    box-shadow: 0 0 0 4px var(--bg);
  }
  .pstep h3 { margin: 4px 0 8px; }
  .ranked-page .pstep p { margin-bottom: 0; }

  @media (max-width: 1024px) {
    .rank { flex-wrap: wrap; }
    .rank .r-desc { width: 100%; }
  }

  @media (max-width: 768px) {
    .proto { padding-left: 38px; }
    .pstep::before { left: -38px; width: 28px; height: 28px; font-size: 0.85rem; }

    .ranked-page table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .ranked-page table tbody tr { display: block; padding: 14px 18px; }
    .ranked-page table th[scope="row"] { display: block; padding: 0 0 8px; }
    .ranked-page table td { display: block; padding: 3px 0; }
    .ranked-page table td::before {
      content: attr(data-label) " : "; font-weight: 700; color: #bbb; font-size: 0.68rem;
      text-transform: uppercase; letter-spacing: 0.5px;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .rank, .errbox { transition: none; }
  }
