/* =====================================================================
   EduLink Learning — V9.3 : offres commerciales (formation complète, niveaux, pack)
   Charte : violet nuit #302044 · lavande #F1EBFC · blanc · texte #17151B / #514466 · bordures #E4DFEA
   Utilisé par l'espace formateur, la validation administrative et l'espace étudiant.
   ===================================================================== */
.tf { --tf-night:#302044; --tf-lav:#F1EBFC; --tf-white:#FFFFFF; --tf-text:#17151B; --tf-mut:#514466; --tf-line:#E4DFEA;
      --tf-ok:#126B4E; --tf-ok-bg:#E7F4EE; --tf-warn:#8A5A00; --tf-warn-bg:#FFF4DE; --tf-err:#A8261D; --tf-err-bg:#FBECEA; color:var(--tf-text); }
.tf * { box-sizing:border-box; }
.tf-mut { color:var(--tf-mut); }
.tf-small { font-size:13px; }

/* Choix du mode commercial */
.tf-modes { display:grid; grid-template-columns:repeat(auto-fit, minmax(230px, 1fr)); gap:12px; border:0; padding:0; margin:0 0 14px; }
.tf-modes legend { font-weight:700; color:var(--tf-night); margin-bottom:10px; padding:0; }
.tf-mode { display:flex; gap:12px; align-items:flex-start; padding:14px 16px; border:1.5px solid var(--tf-line); border-radius:14px; background:var(--tf-white); cursor:pointer; }
.tf-mode:has(input:checked) { border-color:var(--tf-night); background:var(--tf-lav); }
.tf-mode input { width:18px; height:18px; margin:3px 0 0; accent-color:var(--tf-night); flex-shrink:0; }
.tf-mode b { display:block; color:var(--tf-night); margin-bottom:3px; }
.tf-mode span span { display:block; font-size:13px; color:var(--tf-mut); line-height:1.45; }
.tf-box { border:1px solid var(--tf-line); border-radius:14px; padding:14px 16px; margin:0 0 14px; background:var(--tf-white); }
.tf-box h3 { margin:0 0 10px; font-size:15px; color:var(--tf-night); }
.tf-status { display:flex; flex-wrap:wrap; gap:6px 14px; font-size:13px; color:var(--tf-mut); margin-top:6px; }
.tf-status b { color:var(--tf-text); }
.tf-note { padding:10px 12px; border-radius:10px; font-size:13px; line-height:1.5; margin:8px 0 0; }
.tf-note--warn { background:var(--tf-warn-bg); color:var(--tf-warn); }
.tf-note--err { background:var(--tf-err-bg); color:var(--tf-err); }
.tf-note--ok { background:var(--tf-ok-bg); color:var(--tf-ok); }
.tf-note--info { background:var(--tf-lav); color:var(--tf-night); }
.tf [hidden] { display:none !important; }

/* Liste des niveaux (gestion) */
.tf-levels { list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.tf-level { border:1px solid var(--tf-line); border-radius:14px; padding:12px 14px; background:var(--tf-white); }
.tf-level-hd { display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; justify-content:space-between; }
.tf-level-hd h4 { margin:0; font-size:15px; color:var(--tf-night); }
.tf-level-hd .n { display:inline-grid; place-items:center; width:26px; height:26px; border-radius:8px; background:var(--tf-lav); color:var(--tf-night); font-weight:700; font-size:13px; margin-right:8px; }
.tf-level-meta { display:flex; flex-wrap:wrap; gap:4px 14px; font-size:13px; color:var(--tf-mut); margin-top:6px; }
.tf-level details { margin-top:8px; }
.tf-level summary { cursor:pointer; font-size:13px; font-weight:600; color:var(--tf-night); }
.tf-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:10px; }
.tf-acts { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.tf-table { width:100%; border-collapse:collapse; font-size:13.5px; }
.tf-table th, .tf-table td { padding:8px 10px; border-bottom:1px solid var(--tf-line); text-align:left; vertical-align:middle; }
.tf-table th { font-size:12px; color:var(--tf-mut); font-weight:600; }
.tf-table select { max-width:100%; }
.tf-wrap { overflow-x:auto; }

/* Offres côté étudiant : comparaison des niveaux et du pack */
.tf-offers { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:14px; margin:0; padding:0; list-style:none; }
.tf-offer { display:flex; flex-direction:column; gap:8px; border:1px solid var(--tf-line); border-radius:16px; padding:16px; background:var(--tf-white); }
.tf-offer--pack { border:2px solid var(--tf-night); background:var(--tf-lav); }
.tf-offer h3 { margin:0; font-size:16px; color:var(--tf-night); line-height:1.3; }
.tf-offer .tf-kicker { font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--tf-mut); }
.tf-offer p { margin:0; font-size:14px; color:var(--tf-mut); line-height:1.5; }
.tf-offer .tf-price { font-size:22px; font-weight:800; color:var(--tf-night); }
.tf-offer .tf-price s { font-size:14px; font-weight:500; color:var(--tf-mut); margin-left:6px; }
.tf-offer .tf-foot { margin-top:auto; display:flex; flex-direction:column; gap:8px; }
.tf-offer ul { margin:0; padding-left:18px; font-size:13.5px; color:var(--tf-mut); }
.tf-buy { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:46px; padding:0 18px; border-radius:12px; border:1px solid var(--tf-night); background:var(--tf-night); color:#fff; font:600 15px/1.2 inherit; cursor:pointer; text-decoration:none; width:100%; }
.tf-buy:hover { background:#21162F; }
.tf-buy--ghost { background:var(--tf-white); color:var(--tf-night); }
.tf-buy--ghost:hover { background:var(--tf-lav); }
.tf-buy[disabled] { opacity:.55; cursor:not-allowed; }
.tf-tag { display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:600; background:var(--tf-lav); color:var(--tf-night); max-width:100%; line-height:1.4; }
.tf-tag--ok { background:var(--tf-ok-bg); color:var(--tf-ok); }
.tf-tag--warn { background:var(--tf-warn-bg); color:var(--tf-warn); }
.tf-saving { font-size:13px; color:var(--tf-ok); font-weight:600; }

/* Mobile : les boutons d'achat restent pleine largeur, la comparaison passe en une colonne */
@media (max-width:640px) {
  .tf-offers { grid-template-columns:minmax(0, 1fr); }
  .tf-offer { padding:14px; }
  .tf-modes { grid-template-columns:minmax(0, 1fr); }
  .tf-table thead { display:none; }
  .tf-table tr { display:grid; grid-template-columns:minmax(0, 1fr); padding:8px 0; border-bottom:1px solid var(--tf-line); }
  .tf-table td { border:0; padding:3px 0; }
}

/* Lisibilité : descriptions en graisse normale, montants jamais coupés */
.tf .tf-mode span span, .tf .fx-check span span { font-weight:400; }
.tf .tf-status b, .tf .tf-small b { white-space:nowrap; }
.tf-offer .tf-price { white-space:normal; }

/* Espace étudiant : les boutons génériques (body.eu button) sont neutres — les boutons d'achat gardent la charte */
body.eu .tf button.tf-buy, .tf button.tf-buy { background:#302044; color:#FFFFFF; border:1px solid #302044; min-height:46px; width:100%; border-radius:12px; font-weight:600; }
body.eu .tf button.tf-buy:hover, .tf button.tf-buy:hover { background:#21162F; color:#FFFFFF; }
body.eu .tf button.tf-buy:focus-visible { outline:3px solid #302044; outline-offset:2px; }
form.tf-form-offres { display:flex; flex-direction:column; gap:16px; }
/* Texte réservé aux lecteurs d'écran, quel que soit l'espace */
.tf .sr, .tf .fx-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
/* V9.9 : programme des niveaux et modules */
.tf-prog { margin:6px 0 8px; padding-inline-start:18px; font-size:13px; color:#17151B; line-height:1.5; }
.tf-prog li { margin:1px 0; }
/* V10 : trois choix simples en tête de la page de formation */
.tf-choix-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; }
.tf-choix-c { position:relative; display:flex; flex-direction:column; gap:6px; padding:18px; border:2px solid #E4DFEA; border-radius:18px; background:#fff; color:#302044; text-decoration:none; transition:border-color .2s, transform .2s; }
.tf-choix-c:hover { border-color:#302044; transform:translateY(-2px); }
.tf-choix-c.is-reco { border-color:#BE7268; background:#FFF8F6; }
.tf-choix-c b { font-size:17px; } .tf-choix-c span { font-size:13px; color:#6B5C78; }
.tf-choix-c strong { font-size:20px; margin-top:4px; } .tf-choix-c em { font-style:normal; font-size:12.5px; font-weight:700; color:#126B4E; }
.tf-choix-badge { position:absolute; top:-11px; left:14px; background:#BE7268; color:#fff; font:700 11px/1 Inter, sans-serif; padding:5px 9px; border-radius:999px; letter-spacing:.04em; }
.tf-choix-go { font-style:normal; font-size:13px; font-weight:700; color:#5B3FA0; margin-top:auto; display:inline-flex; align-items:center; gap:6px; }
.tf-choix-go svg { width:14px; height:14px; }
.tf-det { margin:6px 0 8px; } .tf-det summary { cursor:pointer; font-size:13px; font-weight:700; color:#5B3FA0; }
@media (max-width:760px) { .tf-choix-grid { grid-template-columns:minmax(0, 1fr); } }
html { scroll-behavior:smooth; } [id="off-h"], [id="mod-h"], #offre-complete { scroll-margin-top:90px; }
