html, body { overflow-x: hidden; }
.ykvapp { --bleu: #2B1A4F; --bleu2: #4A2E83; --orange: #E8622B; --orange-f: #C9501F; --beton: #F2F3F4; --trait: #DDE1E6; --gris: #5F6670; --encre: #1B1F24; --blanc: #FFFFFF;
  position: relative; z-index: 1; background: var(--beton); color: var(--encre); font-family: "Open Sans", Arial, sans-serif; font-size: 16px; line-height: 1.6; min-height: 70vh; }
.ykvapp *, .ykv-dlg *, .ykv-toast { box-sizing: border-box; }
.ykvapp h1, .ykvapp h2, .ykvapp h3, .ykv-dlg h2, .ykv-dlg h3 { font-family: "Barlow", Arial, sans-serif; line-height: 1.15; margin: 0; color: inherit; }
.ykvapp p { margin: 0; }
.ykv-cadre { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.ykv-charge { padding: 160px 20px 80px; text-align: center; color: var(--gris); }

/* Boutons */
.ykvapp .ykv-btn, .ykv-dlg .ykv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: "Barlow", Arial, sans-serif; font-weight: 700; font-size: 16px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.1; background: none; }
.ykv-btn:disabled { opacity: .55; cursor: wait; }
.ykv-btn-o { background: var(--orange) !important; color: var(--blanc) !important; }
.ykv-btn-o:hover { background: var(--orange-f) !important; }
.ykv-btn-b { border-color: rgba(255,255,255,.75) !important; color: var(--blanc) !important; }
.ykv-btn-b:hover { background: rgba(255,255,255,.12) !important; }
.ykv-btn-n { border-color: var(--bleu) !important; color: var(--bleu) !important; }
.ykv-btn-n:hover { background: var(--bleu) !important; color: var(--blanc) !important; }
.ykv-btn-l { border-color: var(--trait) !important; color: var(--encre) !important; padding: 8px 16px !important; font-size: 15px !important; }
.ykv-btn-p { border-color: var(--trait) !important; color: var(--bleu) !important; padding: 7px 14px !important; font-size: 14px !important; }
.ykv-btn-p:hover { border-color: var(--bleu) !important; }
.ykvapp a:focus-visible, .ykvapp button:focus-visible, .ykv-dlg a:focus-visible, .ykv-dlg button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

/* En-tête */
.ykv-tete { background: linear-gradient(120deg, var(--bleu) 0%, var(--bleu2) 100%); color: var(--blanc); padding: 150px 0 34px; }
.ykv-tete-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.ykv-marque { display: flex; align-items: center; gap: 18px; }
.ykv-logo { width: 72px; height: 72px; border-radius: 50%; background: var(--blanc); padding: 6px; object-fit: contain; box-shadow: 0 0 0 6px rgba(255,255,255,.14); }
.ykv-tete h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.ykv-tete p { color: rgba(255,255,255,.8); margin-top: 4px; }
.ykv-qui { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ykv-role { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 7px 16px; font-weight: 600; font-size: 15px; }

/* Onglets */
.ykv-onglets { background: var(--blanc); border-bottom: 1px solid var(--trait); position: sticky; top: 0; z-index: 5; }
.ykv-onglets-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.ykv-onglets button { flex: none; background: none !important; border: 0; border-bottom: 4px solid transparent; padding: 16px 16px 12px; font-family: "Barlow", Arial, sans-serif; font-weight: 700; font-size: 16px; color: var(--gris) !important; cursor: pointer; border-radius: 0; }
.ykv-onglets button[aria-selected="true"] { color: var(--bleu) !important; border-bottom-color: var(--orange); }
.ykv-badge { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--orange); color: var(--blanc); font-size: 13px; text-align: center; }

/* Corps */
.ykv-corps { padding-top: 32px; padding-bottom: 72px; }
.ykv-carte { background: var(--blanc); border: 1px solid var(--trait); border-radius: 16px; padding: 28px; }
.ykv-carte h2 { font-size: 26px; font-weight: 800; color: var(--bleu); margin-bottom: 8px; }
.ykv-carte-sombre { background: var(--bleu); color: var(--blanc); border-color: var(--bleu); }
.ykv-carte-sombre h2 { color: var(--blanc); }
.ykv-carte-sombre p { margin-top: 10px; color: rgba(255,255,255,.85); }
.ykv-carte-sombre .ykv-btn { margin-top: 18px; }
.ykv-carte-sombre a { color: rgba(255,255,255,.75); }
.ykv-vide { text-align: center; color: var(--gris); }
.ykv-merci .ykv-ref { font-family: "Barlow", Arial, sans-serif; font-size: 22px; color: var(--orange); }
.ykv-merci p { margin-top: 10px; }
.ykv-grille2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.ykv-doux { color: var(--gris); }
.ykv-petit { font-size: 14px; margin-top: 18px !important; }

/* Formulaires */
.ykv-form { display: grid; gap: 14px; margin-top: 16px; }
.ykv-form2 { grid-template-columns: 1fr 1fr; }
.ykv-large { grid-column: 1 / -1; }
.ykvapp label, .ykv-dlg label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.ykvapp input, .ykvapp select, .ykvapp textarea, .ykv-dlg input, .ykv-dlg select, .ykv-dlg textarea { width: 100%; font: inherit; font-weight: 400; padding: 11px 14px; border: 1px solid #C9CFD6; border-radius: 10px; background: var(--blanc); color: var(--encre); }
.ykvapp input:focus, .ykvapp select:focus, .ykvapp textarea:focus, .ykv-dlg input:focus, .ykv-dlg select:focus, .ykv-dlg textarea:focus { outline: none; border-color: var(--bleu2); box-shadow: 0 0 0 3px rgba(74,46,131,.15); }
.ykv-code-saisie { font-family: "Barlow", Arial, sans-serif !important; font-size: 26px !important; letter-spacing: 10px; text-align: center; }
.ykv-piege { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; }
.ykv-case { display: flex !important; align-items: center; gap: 10px !important; font-weight: 500 !important; }
.ykv-case input { width: auto !important; }

/* Listes */
.ykv-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.ykv-outils input, .ykv-outils select { width: auto; flex: 1 1 220px; }
.ykv-liste { display: grid; gap: 10px; }
.ykv-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: var(--blanc) !important; color: var(--encre) !important; border: 1px solid var(--trait); border-left: 5px solid var(--bleu2); border-radius: 12px; padding: 16px 20px; cursor: pointer; font: inherit; }
.ykv-ligne:hover { border-left-color: var(--orange); box-shadow: 0 8px 24px rgba(43,26,79,.08); }
.ykv-ligne-a { display: grid; }
.ykv-ligne-a b { font-family: "Barlow", Arial, sans-serif; font-size: 19px; }
.ykv-ligne small { color: var(--gris); font-size: 14px; }
.ykv-ligne-b { display: grid; justify-items: end; gap: 4px; }

/* Statuts */
.ykv-puce { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #E8ECF2; color: var(--bleu); white-space: nowrap; }
.ykv-s-recu { background: #FCE9E1; color: #B8481C; }
.ykv-s-devis { background: #FFF1D6; color: #8A5A00; }
.ykv-s-attente { background: #FFF1D6; color: #8A5A00; }
.ykv-s-cours { background: #ECE7F6; color: #4A2E83; }
.ykv-s-finalise { background: #ECE7F6; color: #4A2E83; }
.ykv-s-rapport { background: #DFF5E7; color: #1D7A45; }
.ykv-s-clos { background: #ECEEF0; color: #5F6670; }

/* Tableau */
.ykv-tableau { overflow-x: auto; background: var(--blanc); border: 1px solid var(--trait); border-radius: 14px; }
.ykv-tableau table { width: 100%; border-collapse: collapse; margin: 0; }
.ykv-tableau th, .ykv-tableau td { padding: 12px 14px; border: 0; border-bottom: 1px solid var(--trait); text-align: left; vertical-align: middle; font-size: 15px; }
.ykv-tableau th { font-family: "Barlow", Arial, sans-serif; color: var(--gris); font-weight: 700; background: var(--beton); }
.ykv-tableau small { color: var(--gris); }
.ykv-act { white-space: nowrap; }
.ykv-act .ykv-btn { margin: 2px; }
.ykv-etabs { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.ykv-etabs li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--trait); border-radius: 10px; }
.ykv-journal { list-style: none; padding: 0; margin: 0; background: var(--blanc); border: 1px solid var(--trait); border-radius: 14px; }
.ykv-journal li { display: grid; grid-template-columns: 200px 180px 1fr; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--trait); font-size: 15px; }
.ykv-journal small { color: var(--gris); }

/* Fenêtre */
.ykv-dlg { width: min(860px, 94vw); max-height: 90vh; border: 0; border-radius: 18px; padding: 0; color: #1B1F24; font-family: "Open Sans", Arial, sans-serif; font-size: 16px; line-height: 1.6; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.ykv-dlg::backdrop { background: rgba(30,18,55,.6); }
.ykv-dlg-tete { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #2B1A4F; color: #fff; padding: 16px 24px; }
.ykv-dlg-tete h2 { font-size: 22px; font-weight: 800; }
.ykv-dlg-tete .ykv-btn-l { border-color: rgba(255,255,255,.5) !important; color: #fff !important; }
.ykv-dlg-corps { padding: 24px; }
.ykv-dlg h3 { font-size: 20px; font-weight: 800; color: #2B1A4F; margin: 28px 0 12px; }
.ykv-dlg p { margin: 0 0 10px; }
.ykv-dlg .ykv-doux { color: #5F6670; }
.ykv-etapes { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ykv-etapes li { font-size: 12px; line-height: 1.3; color: #8A929B; }
.ykv-etapes li span { display: block; height: 6px; border-radius: 999px; background: #DDE1E6; margin-bottom: 6px; }
.ykv-etapes li.fait span { background: #4A2E83; }
.ykv-etapes li.ici span { background: #E8622B; }
.ykv-etapes li.ici { color: #1B1F24; font-weight: 700; }
.ykv-statut-actuel { margin-bottom: 14px; }
.ykv-infos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; margin: 0; }
.ykv-infos div { margin: 0; }
.ykv-infos dt { font-size: 13px; color: #5F6670; font-weight: 600; }
.ykv-infos dd { margin: 2px 0 0; }
.ykv-infos a, .ykv-fichiers a { color: #4A2E83; font-weight: 600; }
.ykv-gestion { background: #F2F3F4; border-radius: 14px; padding: 4px 18px 18px; margin-top: 22px; }
.ykv-gestion h3 { margin-top: 14px !important; }
.ykv-fichiers { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.ykv-fichiers li { display: grid; padding: 10px 14px; border: 1px solid #DDE1E6; border-radius: 10px; }
.ykv-fichiers li.rapport { border-color: #1D7A45; background: #F1FBF5; }
.ykv-fichiers small { color: #5F6670; font-size: 13px; }
.ykv-envoi { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px; border: 2px dashed #C9CFD6; border-radius: 12px; }
.ykv-envoi input[type=file] { flex: 1 1 240px; border: 0; padding: 0; }
.ykv-hist { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.ykv-hist li { padding: 12px 16px; border-radius: 12px; background: #F2F3F4; }
.ykv-hist li.bureau { background: #F1EDF8; }
.ykv-hist li.statut { border-left: 4px solid #E8622B; }
.ykv-hist small { margin-left: 8px; color: #5F6670; font-size: 13px; }
.ykv-hist p { margin: 4px 0 0; }
.ykv-code { font-family: "Barlow", Arial, sans-serif; font-size: 52px; font-weight: 800; letter-spacing: 12px; color: #2B1A4F; text-align: center; margin: 18px 0 !important; }
.ykv-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Notification */
.ykv-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: #2B1A4F; color: #fff; padding: 12px 22px; border-radius: 999px; font: 600 15px "Open Sans", Arial, sans-serif; box-shadow: 0 12px 30px rgba(0,0,0,.25); z-index: 100000; transition: transform .25s ease; max-width: 92vw; text-align: center; }
.ykv-toast.visible { transform: translate(-50%, 0); }
.ykv-toast.erreur { background: #B8481C; }

@media (max-width: 800px) {
  .ykv-grille2, .ykv-form2, .ykv-infos { grid-template-columns: 1fr; }
  .ykv-tete { padding-top: 120px; }
  .ykv-etapes { grid-template-columns: repeat(4, 1fr); }
  .ykv-journal li { grid-template-columns: 1fr; gap: 2px; }
  .ykv-ligne-b { justify-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  .ykv-toast { transition: none; }
}

/* Espace étudiant et ressources */
.ykv-form3 { grid-template-columns: repeat(3, 1fr); }
.ykv-gauche { justify-content: flex-start !important; margin-top: 14px; }
.ykv-sous { font-size: 20px; font-weight: 800; color: var(--bleu); margin: 26px 0 12px !important; }
.ykv-pass { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--blanc); border: 1px solid var(--trait); border-left: 5px solid var(--orange); border-radius: 12px; padding: 14px 18px; margin-bottom: 24px; }
.ykv-pass.ok { border-left-color: #1D7A45; background: #F1FBF5; }
.ykv-matiere { margin-bottom: 30px; }
.ykv-matiere h2 { font-size: 24px; font-weight: 800; color: var(--bleu); margin-bottom: 14px; }
.ykv-res-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ykv-res { display: flex; flex-direction: column; gap: 8px; background: var(--blanc); border: 1px solid var(--trait); border-top: 5px solid var(--bleu2); border-radius: 14px; padding: 18px; }
.ykv-res.ferme { border-top-color: var(--orange); }
.ykv-res h3 { font-size: 19px; font-weight: 800; display: flex; align-items: flex-start; gap: 8px; }
.ykv-res .ykv-btn { margin-top: auto; align-self: flex-start; }
.ykv-res-cat { font-size: 13px; font-weight: 700; color: var(--gris); }
.ykv-cadenas { flex: none; width: 14px; height: 12px; margin-top: 7px; border-radius: 2px; background: var(--orange); position: relative; }
.ykv-cadenas::before { content: ""; position: absolute; left: 2px; top: -7px; width: 10px; height: 9px; border: 2px solid var(--orange); border-bottom: 0; border-radius: 6px 6px 0 0; box-sizing: border-box; }
.ykv-prix-gros { font-family: "Barlow", Arial, sans-serif; font-size: 40px; font-weight: 800; color: #E8622B; margin: 6px 0 12px !important; }
.ykv-etabs-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 16px 0; }
.ykv-etab { border: 1px solid var(--trait); border-radius: 14px; padding: 16px; display: grid; gap: 10px; }
.ykv-etab-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ykv-etab-tete b { font-family: "Barlow", Arial, sans-serif; font-size: 19px; color: var(--bleu); }
@media (max-width: 800px) { .ykv-form3 { grid-template-columns: 1fr; } }

/* Base de données */
.ykv-chiffres { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 14px; }
.ykv-chiffre { background: var(--blanc); border: 1px solid var(--trait); border-top: 5px solid var(--bleu2); border-radius: 14px; padding: 16px 18px; display: grid; }
.ykv-chiffre span { font-weight: 700; color: var(--gris); font-size: 14px; }
.ykv-chiffre b { font-family: "Barlow", Arial, sans-serif; font-size: 36px; font-weight: 800; color: var(--bleu); line-height: 1.1; }
.ykv-chiffre small { color: var(--gris); font-size: 13px; }
.ykv-note { font-size: 14px; margin: 0 0 18px !important; }
.ykv-choix { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; }

/* Le thème ne change plus la casse ni l'espacement des textes */
.ykvapp, .ykvapp *, .ykv-dlg, .ykv-dlg *, .ykv-toast { text-transform: none !important; }
.ykvapp h1, .ykvapp h2, .ykvapp h3, .ykvapp button, .ykvapp .ykv-btn, .ykv-dlg h2, .ykv-dlg h3, .ykv-dlg button, .ykv-dlg .ykv-btn { letter-spacing: normal !important; }
.ykvapp .ykv-code-saisie { letter-spacing: 10px !important; }
.ykv-dlg .ykv-code { letter-spacing: 12px !important; }

.ykv-ajout { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 4px 0 18px; max-width: 640px; }
.ykv-ajout input { flex: 1 1 260px; width: auto; }

/* Notes */
.ykvapp .ykv-note, .ykv-dlg .ykv-note { width: 110px; text-align: center; font-family: "Barlow", Arial, sans-serif; font-size: 18px; font-weight: 700; padding: 8px 10px; }
.ykv-moy { font-family: "Barlow", Arial, sans-serif; font-weight: 800; color: #2B1A4F; white-space: nowrap; }
.ykv-moy-badge { background: #2B1A4F; color: #fff; border-radius: 999px; padding: 6px 16px; font-family: "Barlow", Arial, sans-serif; font-weight: 800; }
.ykv-notes-mat { margin-bottom: 18px; }
.ykv-notes-mat h2 { margin: 0 !important; }
.ykv-notes-mat .ykv-tableau { margin-top: 14px; }
.ykv-dlg .ykv-tableau { max-height: 55vh; overflow: auto; }
.ykv-espace-haut { margin-top: 20px; }
