/* ══════════════════════════════════════════════════════════════════════════
   LA TOOLBOX — /app/toolbox et la lettre de motivation (05/12/2026)
   La maquette validée : héros violet foncé, bandeau « mis en avant », légende
   des accès, groupes de cards (titre, étiquette d'accès, trait, description,
   bouton). Aucun style en ligne : les couleurs passent par des classes.
   ══════════════════════════════════════════════════════════════════════════ */

.wtb { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* ── Héros ── */
.wtb-hero {
  border-radius: 26px; padding: 30px 34px; color: #fff;
  background: radial-gradient(circle at 80% 10%, #4B2E83 0, #2E1A47 65%);
}
.wtb-hero__badge {
  display: inline-block; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.12);
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.wtb-hero h1 { background: none; box-shadow: none; text-decoration: none; padding: 0; margin: 12px 0 8px; font-size: 34px; line-height: 1.15; letter-spacing: -.02em; color: #fff; }
.wtb-hero p { margin: 0; max-width: 620px; color: #E4D8F5; font-size: 16px; line-height: 1.55; }

/* ── Bandeau « mis en avant » ── */
.wtb-avant {
  display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; padding: 18px 22px; border-radius: 20px;
  background: #fff; border: 2px solid #CDBAE8; text-decoration: none; color: #1E1530;
  transition: box-shadow .15s, transform .15s;
}
.wtb-avant:hover { box-shadow: 0 10px 28px rgba(46,26,71,.12); transform: translateY(-1px); color: #1E1530; }
.wtb-avant__ico { width: 46px; height: 46px; border-radius: 14px; background: #F3EEFF; color: #6B46A8; display: grid; place-items: center; flex: none; }
.wtb-avant__ico svg { width: 24px; height: 24px; }
.wtb-avant__txt { flex: 1 1 320px; min-width: 0; }
.wtb-avant__txt strong { display: block; font-size: 16px; }
.wtb-avant__txt small { color: #5C566B; font-size: 14px; }
.wtb-avant__reste { padding: 7px 12px; border-radius: 999px; background: #ECFDF5; color: #047857; font-size: 13px; font-weight: 800; }
.wtb-avant__reste--vide { background: #FFF4E5; color: #8A4B00; }
.wtb-avant__go { padding: 12px 18px; border-radius: 12px; background: #8A63C0; color: #fff; font-weight: 800; font-size: 15px; }

/* ── Légende ── */
.wtb-legende { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13.5px; color: #5C566B; }

/* ── Étiquettes d'accès ── */
.wtb-et { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.wtb-et::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.wtb-et--gratuit { color: #047857; } .wtb-et--gratuit::before { background: #10B981; }
.wtb-et--limite { color: #8A4B00; } .wtb-et--limite::before { background: #F59E0B; }
.wtb-et--credits { color: #6B46A8; } .wtb-et--credits::before { background: #8A63C0; }
.wtb-legende .wtb-et { font-size: 13.5px; }

/* ── Groupes et cards ── */
.wtb-groupe { display: flex; flex-direction: column; gap: 12px; }
.wtb-groupe__tete { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.wtb-groupe__tete h2 { margin: 0; font-size: 20px; color: #2E1A47; }
.wtb-groupe__tete span { color: #6E6880; font-size: 14px; }
.wtb-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }

.wtb-card {
  display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 18px; background: #fff;
  border: 1px solid #EDE5F7; text-decoration: none; color: #1E1530; min-height: 132px;
  transition: box-shadow .15s, transform .15s;
}
a.wtb-card:hover { box-shadow: 0 10px 28px rgba(46,26,71,.12); transform: translateY(-2px); color: #1E1530; }
.wtb-card__titre { font-size: 16px; line-height: 1.3; }
.wtb-card__ets { display: flex; flex-direction: column; gap: 3px; margin-top: -4px; }
.wtb-card__trait { display: block; width: 40px; height: 3px; border-radius: 3px; background: #E4DEEC; }
.wtb-card__trait--gratuit { background: #A7F3D0; }
.wtb-card__trait--limite { background: #FCD34D; }
.wtb-card__trait--credits { background: #CDBAE8; }
.wtb-card__desc { color: #5C566B; font-size: 14px; line-height: 1.5; flex: 1; }
.wtb-card__cta {
  align-self: flex-start; padding: 9px 14px; border-radius: 10px; background: #F3EEFF; color: #6B46A8;
  font-size: 14px; font-weight: 700; transition: background .15s, color .15s, box-shadow .15s;
}
a.wtb-card:hover .wtb-card__cta, .wtb-card__cta:hover { background: #8A63C0; color: #fff; box-shadow: 0 6px 16px rgba(46,26,71,.18); }

/* « Bientôt » : grisée, pas de lien. */
.wtb-card--bientot { background: #F6F5F8; border: 1px dashed #D9D4E0; color: #8C8698; cursor: default; }
.wtb-card--bientot .wtb-card__titre { color: #6E6880; }
.wtb-card--bientot .wtb-card__ets { opacity: .8; }
.wtb-card--bientot .wtb-card__trait { background: #DDD8E4; }
.wtb-card--bientot .wtb-card__desc { color: #8C8698; }
.wtb-card--bientot .wtb-card__cta, .wtb-card--bientot .wtb-card__cta:hover { background: #ECEAF0; color: #9A94A6; box-shadow: none; }
.wtb-card__tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wtb-bientot { flex: none; padding: 3px 9px; border-radius: 999px; background: #E9E6EE; color: #5C566B; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }

.wtb-vide { padding: 26px; border-radius: 18px; background: #fff; border: 1px dashed #E4D8F5; color: #5C566B; text-align: center; }

/* ══════════════════════════ LA LETTRE ══════════════════════════ */
.wtb-retour { align-self: flex-start; font-size: 14px; font-weight: 700; text-decoration: none; color: #6B46A8; }
.wtb-l-tete { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; justify-content: space-between; }
.wtb-l-tete > div:first-child { flex: 1 1 480px; min-width: 0; }
.wtb-l-tete h1 { margin: 0 0 6px; font-size: 32px; letter-spacing: -.02em; }
.wtb-l-tete p { margin: 0; color: #5C566B; font-size: 16px; line-height: 1.55; }
.wtb-quota { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: #fff; border: 1px solid #EDE5F7; }
.wtb-quota__n { width: 38px; height: 38px; border-radius: 12px; background: #ECFDF5; color: #047857; display: grid; place-items: center; font-weight: 800; }
.wtb-quota--vide .wtb-quota__n { background: #FFF4E5; color: #8A4B00; }
.wtb-quota span:last-child { display: flex; flex-direction: column; }
.wtb-quota strong { font-size: 14.5px; }
.wtb-quota small { color: #6E6880; font-size: 13px; }

.wtb-l-corps { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.wtb-l-form { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.wtb-l-bloc { background: #fff; border: 1px solid #EDE5F7; border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.wtb-l-bloc h2 { margin: 0; font-size: 17px; display: flex; gap: 10px; align-items: center; }
.wtb-l-num { width: 26px; height: 26px; border-radius: 50%; background: #F3EEFF; color: #6B46A8; display: grid; place-items: center; font-size: 13px; flex: none; }
.wtb-l-cv { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; background: #FAF7FF; border: 1px solid #EDE5F7; }
.wtb-l-cv__doc { width: 44px; height: 54px; border-radius: 6px; background: #fff; border: 1px solid #E4D8F5; display: grid; place-items: center; color: #8A63C0; font-weight: 800; font-size: 12px; flex: none; }
.wtb-l-cv__txt { flex: 1; min-width: 0; }
.wtb-l-cv__txt strong { display: block; font-size: 15px; }
.wtb-l-cv__txt small { color: #6E6880; font-size: 13px; }
.wtb-l-cv a { font-size: 14px; font-weight: 700; }

.wtb-l-modes { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: #F3EEFF; align-self: flex-start; flex-wrap: wrap; border: 0; margin: 0; }
.wtb-l-modes legend, .wtb-l-tons legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wtb-l-modes label { position: relative; }
.wtb-l-modes input, .wtb-l-tons input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.wtb-l-modes span { display: block; padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 14px; color: #2E1A47; cursor: pointer; }
.wtb-l-modes input:checked + span { background: #fff; box-shadow: 0 1px 3px rgba(46,26,71,.12); }
.wtb-l-modes input:focus-visible + span, .wtb-l-tons input:focus-visible + span { outline: 2px solid #8A63C0; outline-offset: 2px; }

.wtb-l-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .wtb-l-2 { grid-template-columns: 1fr; } }
.wtb-l-champ { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; color: #5C566B; }
.wtb-l-champ input, .wtb-l-champ textarea, .wtb-l-champ select {
  padding: 11px 12px; border-radius: 10px; border: 1px solid #E4D8F5; background: #FAF7FF; font: inherit; font-weight: 400;
  font-size: 15px; color: #1E1530; width: 100%; box-sizing: border-box;
}
.wtb-l-champ textarea { resize: vertical; font-size: 14.5px; }
.wtb-l-form[data-mode="spontanee"] [data-si-offre] { display: none; }

.wtb-l-tons { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; }
.wtb-l-tons label { position: relative; }
.wtb-l-tons span { display: block; padding: 9px 14px; border-radius: 999px; border: 1.5px solid #E4D8F5; background: #fff; color: #2E1A47; font-weight: 700; font-size: 14px; cursor: pointer; }
.wtb-l-tons input:checked + span { background: #8A63C0; border-color: #8A63C0; color: #fff; }

.wtb-l-go { padding: 16px 20px; border-radius: 16px; border: 0; background: #8A63C0; color: #fff; font-weight: 800; font-size: 16px; cursor: pointer; font-family: inherit; }
.wtb-l-go:hover { background: #6B46A8; }
.wtb-l-go[disabled] { background: #C9BCE0; cursor: not-allowed; }
.wtb-l-go[aria-busy="true"] { opacity: .75; cursor: progress; }
.wtb-l-note { margin: 0; color: #6E6880; font-size: 13px; line-height: 1.5; }

.wtb-l-res { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.wtb-l-attente {
  min-height: 460px; border-radius: 20px; border: 2px dashed #E4D8F5; background: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; padding: 30px; text-align: center; color: #6E6880;
}
.wtb-l-attente svg { width: 44px; height: 44px; color: #B9A8D6; }
.wtb-l-attente strong { color: #2E1A47; font-size: 17px; }
.wtb-l-attente span { font-size: 14.5px; max-width: 380px; line-height: 1.5; }
.wtb-l-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wtb-l-actions .wtb-l-pret { padding: 6px 12px; border-radius: 999px; background: #ECFDF5; color: #047857; font-size: 13px; font-weight: 800; margin-right: auto; }
.wtb-l-btn { padding: 10px 14px; border-radius: 12px; border: 1px solid #E4D8F5; background: #fff; font-weight: 700; font-size: 14px; cursor: pointer; color: #2E1A47; font-family: inherit; }
.wtb-l-btn:hover { border-color: #8A63C0; color: #6B46A8; }
.wtb-l-texte {
  width: 100%; box-sizing: border-box; min-height: 560px; background: #fff; border: 1px solid #EDE5F7; border-radius: 16px;
  padding: 36px 40px; box-shadow: 0 10px 30px rgba(46,26,71,.08); font-family: Georgia, 'Times New Roman', serif;
  font-size: 15.5px; line-height: 1.65; color: #1E1E24; resize: vertical;
}
@media (max-width: 560px) { .wtb-l-texte { padding: 20px; } .wtb-hero { padding: 24px; } .wtb-hero h1 { font-size: 27px; } }

@media print {
  body * { visibility: hidden !important; }
  .wtb-l-imprimer, .wtb-l-imprimer * { visibility: visible !important; }
  .wtb-l-imprimer { position: absolute; inset: 0; white-space: pre-wrap; font: 12pt/1.6 Georgia, serif; padding: 2cm; }
}
.wtb-l-imprimer { display: none; }
@media print { .wtb-l-imprimer { display: block; } }
.wtb-l-actions form { display: contents; }
.wtb-hero h1::before, .wtb-hero h1::after { content: none; display: none; }

/* Un outil « bientôt » mis en avant : le bandeau, grisé, sans lien. */
.wtb-avant--bientot { background: #F6F5F8; border: 2px dashed #D9D4E0; color: #6E6880; cursor: default; }
.wtb-avant--bientot:hover { box-shadow: none; transform: none; color: #6E6880; }
.wtb-avant--bientot .wtb-avant__ico { background: #ECEAF0; color: #9A94A6; }

/* ── La Toolbox publique (visiteurs) : onglets et appels dans le héros ── */
.wtb-hero--visiteur { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: flex-end; }
.wtb-hero__txt { flex: 1 1 420px; min-width: 0; }
.wtb-hero__actions { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 18px; }
.wtb-hero__cta { padding: 12px 18px; border-radius: 12px; background: #fff; color: #2E1A47; font-weight: 800; font-size: 15px; text-decoration: none; }
.wtb-hero__cta:hover { background: #F3EEFF; color: #2E1A47; }
.wtb-hero__lien { color: #E4D8F5; font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.wtb-hero__lien:hover { color: #fff; }
.wtb-onglets { display: flex; gap: 6px; padding: 6px; border-radius: 16px; background: rgba(255,255,255,.1); }
.wtb-onglets a { padding: 11px 18px; border-radius: 12px; font-weight: 700; font-size: 15px; color: #E4D8F5; text-decoration: none; }
.wtb-onglets a:hover { color: #fff; background: rgba(255,255,255,.08); }
.wtb-onglets a[aria-current="page"] { background: #fff; color: #2E1A47; }
.wtb-card__compte { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #6E6880; }
.wtb-card__compte svg { width: 13px; height: 13px; flex: none; }
