/* Formation follows the existing QCM history table and score components.
   Score colors come from aero-qcm-score / data-score-state in shared styles. */
.aerobot-portail .aero-formation-table{min-width:940px}
.aerobot-portail .aero-formation-table thead th{white-space:normal;line-height:1.5!important;text-align:center!important}
.aerobot-portail .aero-formation-table thead tr:first-child th{padding:13px 15px!important;font-size:13px!important;text-align:center!important}
.aerobot-portail .aero-formation-table thead .aero-formation-group-spacer{background:var(--aero-surface,#fff)!important}
.aerobot-portail .aero-formation-table thead tr:nth-child(2) th{font-size:12px!important;padding:12px 15px!important}
.aerobot-portail .aero-formation-table thead tr:nth-child(2) th:first-child{text-align:left!important}
.aerobot-portail .aero-formation-table tbody .aero-formation-row>td{padding:13px 15px!important;font-size:14px!important;line-height:1.55!important;text-align:center!important;vertical-align:middle}
.aerobot-portail .aero-formation-table tbody .aero-formation-row>td:first-child{min-width:185px;max-width:260px;text-align:left!important;font-weight:600;white-space:normal}
.aerobot-portail .aero-formation-module-name{font-size:14px;font-weight:600;line-height:1.55;letter-spacing:normal}
.aerobot-portail .aero-formation-table tbody td.aero-formation-metric{width:auto!important;min-width:105px!important;border-left:0;font-variant-numeric:tabular-nums}
.aerobot-portail .aero-formation-table tbody td.aero-formation-learning{min-width:125px!important}
.aerobot-portail .aero-formation-metric>strong{display:inline-block;width:auto!important;min-width:67px;max-width:100%;margin:0;padding:6px 10px;border:1px solid var(--aero-line,#e4e7ee);border-radius:7px;background:var(--aero-bg,#f6f7fb);color:var(--aero-muted,#596176);font-size:14px!important;font-weight:600;line-height:1.55!important;letter-spacing:normal;text-align:center;font-variant-numeric:tabular-nums;white-space:nowrap}
.aerobot-portail .aero-formation-metric>.aero-score-empty{font-weight:450}
.aerobot-portail .aero-formation-learning small{display:block;font-size:12px;line-height:1.55;color:var(--aero-muted,#596176);margin-top:4px;white-space:normal;text-align:center}
.aerobot-portail .aero-formation-table tbody td.aero-formation-course-cell{width:auto!important;min-width:100px;border-left:0;text-align:center!important}
.aerobot-portail .aero-formation-course-cell .aero-formation-courses{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:max-content;max-width:100%;min-height:36px;margin:0;padding:6px 10px;border:1px solid var(--aero-line,#e4e7ee);border-radius:8px;background:var(--aero-surface,#fff);color:var(--aero-blue,#2d30d8);font-size:14px;font-weight:550;line-height:1.55;text-decoration:none;white-space:nowrap}
.aerobot-portail .aero-formation-course-cell .aero-formation-courses strong{font-size:inherit;font-weight:550;line-height:inherit;letter-spacing:normal;color:inherit;font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0}
.aerobot-portail .aero-formation-course-cell .aero-formation-courses:hover{background:var(--aero-soft,#eeefff);border-color:var(--aero-blue,#2d30d8)}
.aerobot-portail .aero-formation-courses:focus-visible,.aerobot-portail .aero-formation-table button.tentative:focus-visible{outline:2px solid var(--aero-blue,#2d30d8);outline-offset:3px}
.aerobot-portail .aero-formation-table tbody td.aero-formation-attempts{min-width:178px!important;padding-inline:10px!important;border-left:1px solid var(--aero-line,#e4e7ee);white-space:nowrap}
.aerobot-portail .aero-formation-table td>button.tentative{width:36px;height:40px;min-width:36px;min-height:40px;margin-right:3px!important;font-size:14px}
.aerobot-portail .aero-formation-table td>button.tentative:last-child{margin-right:0!important}
.aerobot-portail .aero-formation-table tbody td.aero-formation-date{width:160px!important;min-width:150px!important;text-align:center!important}
.aerobot-portail .aero-formation-table td.aero-formation-date>div{justify-content:center!important}
.aerobot-portail .aero-formation-table td.aero-formation-date .form-control{min-width:125px;min-height:40px;font-size:13px!important;text-align:center;font-variant-numeric:tabular-nums}
/* Use the dashboard's discreet information button, scoped to Formation. */
.aerobot-portail .aero-formation-page .aero-context-trigger{position:relative;width:28px;height:28px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--aero-muted,#596176);font:600 12px/1 var(--aero-font,Inter,sans-serif)}
.aerobot-portail .aero-formation-page .aero-context-trigger::before{content:'';position:absolute;inset:6px;border:1px solid currentColor;border-radius:50%}
.aerobot-portail .aero-formation-page .aero-context-trigger:hover,.aerobot-portail .aero-formation-page .aero-context-trigger[aria-expanded="true"]{color:var(--aero-blue,#2d30d8);background:var(--aero-soft,#eeefff)}

@media(max-width:900px){
 .aerobot-portail .aero-formation-page .aero-formation-table-wrap{max-height:none!important;overflow:visible!important;border:1px solid var(--aero-line,#e4e7ee)!important;border-radius:11px;background:var(--aero-surface,#fff)!important}
 .aerobot-portail .aero-formation-table-wrap .aero-formation-table{display:block;width:100%!important;max-width:100%;min-width:0!important}
 .aerobot-portail .aero-formation-table thead{display:none}
 .aerobot-portail .aero-formation-table tbody{display:block;width:100%;min-width:0}
 .aerobot-portail .aero-formation-table tbody .aero-formation-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px;width:100%;min-width:0;margin:0;padding:18px;height:auto!important;border:0;border-bottom:1px solid var(--aero-line,#e4e7ee);border-radius:0;background:transparent;box-shadow:none}
 .aerobot-portail .aero-formation-table tbody .aero-formation-row:last-child{border-bottom:0}
 .aerobot-portail .aero-formation-table tbody .aero-formation-row>td{display:block;grid-column:auto!important;width:auto!important;min-width:0!important;max-width:none!important;padding:0!important;border:0!important;background:transparent!important;text-align:center!important;white-space:normal}
 .aerobot-portail .aero-formation-table tbody .aero-formation-row>td:first-child{grid-column:1/-1!important;text-align:left!important;overflow-wrap:anywhere;font-size:15px!important}
 .aerobot-portail .aero-formation-module-name{font-size:15px}
 .aerobot-portail .aero-formation-table tbody .aero-formation-row>td:not(:first-child)::before{content:attr(data-label);display:block;min-height:1.55em;margin-bottom:6px;color:var(--aero-muted,#596176);font-size:12px;font-weight:400;line-height:1.55;text-align:center}
 .aerobot-portail .aero-formation-table tbody .aero-formation-metric>strong{min-width:62px;padding:5px 9px;font-size:13px!important}
 .aerobot-portail .aero-formation-learning small{font-size:12px}
 .aerobot-portail .aero-formation-course-cell .aero-formation-courses{min-height:32px;font-size:13px;padding:5px 9px}
 .aerobot-portail .aero-formation-table tbody .aero-formation-row>td.aero-formation-attempts,.aerobot-portail .aero-formation-table tbody .aero-formation-row>td.aero-formation-date{grid-column:1/-1!important}
 .aerobot-portail .aero-formation-table tbody .aero-formation-row>td.aero-formation-attempts{white-space:nowrap}
 .aerobot-portail .aero-formation-table tbody .aero-formation-row>td.aero-formation-date>div{width:100%!important;min-width:0;justify-content:center!important}
 .aerobot-portail .aero-formation-table tbody .aero-formation-row>td.aero-formation-date .form-control{width:100%;max-width:230px;min-width:0;font-size:16px!important}
}
@media(min-width:701px) and (max-width:900px){
 .aerobot-portail .aero-formation-table tbody .aero-formation-row{grid-template-columns:repeat(4,minmax(0,1fr))}
 .aerobot-portail .aero-formation-table tbody .aero-formation-row>td.aero-formation-attempts,.aerobot-portail .aero-formation-table tbody .aero-formation-row>td.aero-formation-date{grid-column:span 2!important}
}
@media(min-width:601px) and (max-width:700px){
 .aerobot-portail .aero-formation-table tbody .aero-formation-row>td.aero-formation-attempts,.aerobot-portail .aero-formation-table tbody .aero-formation-row>td.aero-formation-date{grid-column:auto!important}
}
@media(max-width:360px){
 .aerobot-portail .aero-formation-table tbody .aero-formation-row>td.aero-formation-metric::before,.aerobot-portail .aero-formation-table tbody .aero-formation-row>td.aero-formation-course-cell::before{min-height:3.1em}
}
@media(pointer:coarse){
 .aerobot-portail .aero-formation-course-cell .aero-formation-courses{min-height:44px}
 .aerobot-portail .aero-formation-table td>button.tentative{width:44px;min-width:44px;height:44px;min-height:44px}
 .aerobot-portail .aero-formation-table tbody td.aero-formation-attempts{min-width:210px!important}
 .aerobot-portail .aero-formation-page .aero-context-trigger{width:44px;height:44px}
 .aerobot-portail .aero-formation-page .aero-context-trigger::before{inset:14px}
}

/* Keep all desktop badges on one center line; the sample size is a caption. */
@media(min-width:901px){
 .aerobot-portail .aero-formation-table tbody .aero-formation-row{height:80px!important}
 .aerobot-portail .aero-formation-table tbody td.aero-formation-learning{position:relative}
 .aerobot-portail .aero-formation-learning small{position:absolute;inset-inline:4px;top:calc(50% + 19px);margin:0;line-height:18px;white-space:nowrap}
}
