/*
 * Composants metier de la fiche athlete.
 * Contient les blocs de profil developpemental, axes, batteries,
 * graphiques, lecture coach et transferabilite.
 */
.global-profile-body {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 10px;
    align-items: stretch;
}

.global-main-column {
    display: grid;
    gap: 8px;
    align-content: start;
}

.global-bottom-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: start;
}

.global-profile-sidebar {
    display: grid;
    align-items: stretch;
}

.global-gauge-block {
    padding: 10px 12px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(21, 137, 149, 0.07), rgba(29, 77, 107, 0.03));
    border: 1px solid rgba(21, 137, 149, 0.12);
}

.gauge-label {
    display: inline-flex;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--profile-primary-dark);
}

.gauge-wrap {
    position: relative;
}

.gauge-track {
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(90deg, #d7eef0 0%, #8cd0d3 35%, #1f8e98 70%, #114f63 100%);
    box-shadow: inset 0 0 0 1px rgba(17, 79, 99, 0.08), 0 14px 24px rgba(17, 79, 99, 0.12);
}

.gauge-track.compact {
    height: 14px;
    box-shadow: inset 0 0 0 1px rgba(17, 79, 99, 0.08), 0 10px 18px rgba(17, 79, 99, 0.08);
}

.gauge-marker {
    position: absolute;
    top: -5px;
    width: 4px;
    height: 32px;
    border-radius: 999px;
    background: #10222d;
    transform: translateX(-50%);
}

.dimension-card .gauge-marker {
    top: -7px;
    height: 28px;
}

.gauge-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    color: var(--profile-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.global-reading-block {
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(245, 250, 251, 0.92);
    border: 1px solid rgba(21, 137, 149, 0.12);
}

.trend-details {
    border-radius: 14px;
    background: rgba(245, 250, 251, 0.92);
    border: 1px solid rgba(21, 137, 149, 0.12);
}

.trend-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    list-style: none;
    cursor: pointer;
}

.trend-summary::marker,
.trend-summary::-webkit-details-marker {
    display: none;
}

.trend-summary-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.trend-summary-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.comparison-chevron {
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--profile-primary-dark);
    border-bottom: 2px solid var(--profile-primary-dark);
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.trend-details[open] .comparison-chevron {
    transform: rotate(-135deg);
}

.trend-details-body {
    padding: 0 10px 10px;
}

.dimension-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.dimension-grid.dimension-grid-sidebar {
    margin-top: 8px;
    grid-template-columns: 1fr;
    gap: 8px;
}

.dimension-stack {
    display: grid;
    gap: 10px;
}

.dimension-stack-sidebar {
    margin-top: 8px;
    gap: 8px;
}

.dimension-strip {
    display: grid;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(21, 137, 149, 0.14);
}

.dimension-strip:first-child {
    padding-top: 0;
    border-top: 0;
}

.dimension-strip-copy {
    min-width: 0;
}

.dimension-strip-copy h3 {
    margin: 0;
    color: var(--profile-primary-dark);
    font-size: 0.94rem;
    line-height: 1.14;
}

.dimension-strip-status {
    margin: 3px 0 0;
    color: var(--profile-primary-dark);
    font-size: 0.84rem;
    line-height: 1.22;
    font-weight: 700;
}

.dimension-strip-bar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.dimension-strip-gauge {
    min-width: 0;
}

.dimension-strip-bar-row .help-icon {
    width: 16px;
    height: 16px;
    font-size: 0.62rem;
}

.dimension-tooltip-content {
    display: grid;
    gap: 6px;
}

.dimension-tooltip-content p {
    margin: 0;
}

.dimension-tooltip-label {
    font-weight: 700;
}

.dimension-card {
    min-height: 100%;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: start;
}

.dimension-grid.dimension-grid-sidebar .dimension-card {
    padding: 12px;
    gap: 8px;
    min-width: 0;
}

.dimension-grid.dimension-grid-sidebar .card-topline h3 {
    font-size: 0.92rem;
    line-height: 1.12;
}

.dimension-grid.dimension-grid-sidebar .dimension-status {
    min-height: 0;
    font-size: 0.82rem;
    line-height: 1.22;
}

.dimension-grid.dimension-grid-sidebar .dimension-status,
.dimension-grid.dimension-grid-sidebar .dimension-row-value {
    overflow-wrap: anywhere;
    hyphens: auto;
}

.dimension-grid.dimension-grid-sidebar .dimension-row {
    font-size: 0.78rem;
    line-height: 1.22;
}

.dimension-grid.dimension-grid-sidebar .dimension-row-label {
    font-size: 0.6rem;
}

.dimension-grid.dimension-grid-sidebar .dimension-details {
    padding-top: 6px;
}

.dimension-grid.dimension-grid-sidebar .dimension-toggle {
    margin-top: 4px;
    font-size: 0.7rem;
}

.card-topline {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.card-topline h3 {
    margin: 0;
    font-size: 0.98rem;
}

.dimension-status {
    margin: 0;
    color: var(--profile-primary-dark);
    font-weight: 700;
    min-height: 34px;
    display: flex;
    align-items: flex-start;
    font-size: 0.96rem;
}

.dimension-copy {
    display: grid;
    gap: 8px;
    padding-top: 8px;
}

.dimension-row {
    margin: 0;
    color: var(--profile-copy);
    line-height: 1.35;
    font-size: 0.92rem;
}

.dimension-row-label {
    display: inline;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--profile-muted);
}

.dimension-row-value {
    display: inline;
    color: var(--profile-copy);
    line-height: 1.35;
}

.dimension-details {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    border-top: 1px dashed rgba(21, 137, 149, 0.18);
    padding-top: 8px;
}

.dimension-details .dimension-copy {
    order: 1;
}

.dimension-toggle {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 6px;
    color: var(--profile-primary-dark);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.dimension-toggle::marker,
.dimension-toggle::-webkit-details-marker {
    display: none;
}

.dimension-toggle-label {
    display: inline-flex;
    align-items: center;
}

.dimension-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--profile-primary-dark);
    border-bottom: 2px solid var(--profile-primary-dark);
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.dimension-details[open] .dimension-chevron {
    transform: rotate(-135deg);
}

.comparison-delta {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(21, 137, 149, 0.12);
    color: var(--profile-primary-dark);
    font-weight: 800;
    font-size: 0.84rem;
}

.comparison-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.comparison-grid-compact {
    margin-top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.battery-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.battery-grid-sidebar {
    margin-top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.margin-panel {
    display: grid;
    gap: 8px;
    height: 100%;
    padding: 10px;
    border-radius: 16px;
    background: rgba(245, 250, 251, 0.92);
    border: 1px solid rgba(21, 137, 149, 0.12);
}

.margin-panel-heading {
    display: grid;
    gap: 2px;
}

.margin-panel-title {
    display: block;
    color: var(--profile-primary-dark);
    font-size: 0.98rem;
    line-height: 1.24;
}

.battery-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.battery-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.battery-cap {
    width: 22px;
    height: 8px;
    border-radius: 8px 8px 0 0;
    background: var(--profile-primary-dark);
}

.battery-shell {
    position: relative;
    width: 44px;
    height: 92px;
    padding: 5px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(224, 239, 240, 0.88));
    border: 4px solid var(--profile-primary-dark);
    overflow: hidden;
}

.battery-fill {
    position: absolute;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 9px;
    background: linear-gradient(180deg, #7fcfd5 0%, var(--profile-primary) 55%, var(--profile-primary-dark) 100%);
}

.battery-copy h3 {
    margin: 0;
    color: var(--profile-primary-dark);
    font-size: 0.94rem;
}

.battery-grid-sidebar .battery-card {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.battery-grid-sidebar .battery-cap {
    width: 14px;
    height: 6px;
}

.battery-grid-sidebar .battery-shell {
    width: 28px;
    height: 60px;
    padding: 3px;
    border-radius: 10px;
    border-width: 3px;
}

.battery-grid-sidebar .battery-fill {
    left: 3px;
    right: 3px;
    bottom: 3px;
    border-radius: 6px;
}

.battery-grid-sidebar .battery-copy h3 {
    font-size: 0.82rem;
    line-height: 1.2;
}

.trajectory-graph-shell {
    width: 100%;
    max-width: none;
    margin: 10px 0 0;
    padding: 8px 10px 0;
    border-radius: 18px;
    background: rgba(245, 250, 251, 0.96);
    border: 1px solid rgba(21, 137, 149, 0.10);
}

.trajectory-graph {
    display: block;
    width: 100%;
}

.insight-details {
    display: grid;
    gap: 0;
}

.insight-summary-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
    padding-right: 22px;
    list-style: none;
    cursor: pointer;
}

.insight-summary-row::marker,
.insight-summary-row::-webkit-details-marker {
    display: none;
}

.insight-summary-copy {
    min-width: 0;
}

.insight-summary-copy h2 {
    margin: 0;
    color: var(--profile-primary-dark);
    font-size: clamp(1.15rem, 1.6vw, 1.8rem);
    line-height: 1.05;
}

.insight-summary-copy .insight-summary {
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.insight-chevron {
    width: 8px;
    height: 8px;
    margin-top: 8px;
    margin-right: 4px;
    border-right: 2px solid var(--profile-primary-dark);
    border-bottom: 2px solid var(--profile-primary-dark);
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.insight-details[open] .insight-chevron {
    transform: rotate(-135deg);
}

.insight-details-body {
    padding-top: 8px;
}

.cohort-detail-card {
    padding: 14px 18px;
    overflow: hidden;
}

.cohort-detail-panel > summary {
    list-style: none;
}

.cohort-detail-panel > summary::-webkit-details-marker {
    display: none;
}

.cohort-detail-panel[open] .insight-chevron {
    transform: rotate(-135deg);
}

.cohort-detail-summary-copy h2 {
    margin: 0;
    color: var(--profile-primary-dark);
    font-size: clamp(1.1rem, 1.25vw, 1.45rem);
    line-height: 1.08;
}

.cohort-detail-summary {
    margin: 3px 0 0;
    color: var(--profile-muted);
    font-size: 0.86rem;
    font-weight: 650;
}

.cohort-detail-body {
    padding-top: 14px;
}

.cohort-detail-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.cohort-detail-status {
    margin: 0;
    color: var(--profile-muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.cohort-detail-page-size {
    display: grid;
    grid-template-columns: auto 88px;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.cohort-detail-page-size label {
    color: var(--profile-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.cohort-detail-page-size .Select-control {
    min-height: 34px;
    border-color: rgba(21, 137, 149, 0.22);
    border-radius: 10px;
}

.cohort-detail-page-size .Select-placeholder,
.cohort-detail-page-size .Select-value,
.cohort-detail-page-size .Select-value-label {
    line-height: 32px !important;
}

.cohort-detail-card .dash-table-container {
    border: 1px solid rgba(21, 137, 149, 0.14);
    border-radius: 14px;
    overflow: hidden;
}

.cohort-detail-card .previous-next-container {
    padding-top: 10px;
}

@media (max-width: 680px) {
    .cohort-detail-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .cohort-detail-page-size {
        justify-content: space-between;
    }
}

.insight-list {
    margin: 10px 0 0;
    padding-left: 20px;
    color: var(--profile-copy);
    line-height: 1.35;
}

.insight-list li + li {
    margin-top: 6px;
}

.coach-simulation-controls {
    margin-top: 14px;
}

.coach-simulation-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.coach-simulation-checklist-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(21, 137, 149, 0.08);
    border: 1px solid rgba(21, 137, 149, 0.18);
    color: var(--profile-primary-dark);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.coach-simulation-checklist-input {
    margin: 0;
}

.coach-simulation-graph-shell {
    width: 100%;
    margin: 12px 0 0;
    padding: 8px 10px 0;
    border-radius: 18px;
    background: rgba(245, 250, 251, 0.96);
    border: 1px solid rgba(21, 137, 149, 0.10);
}

.coach-corridor-block {
    margin-top: 14px;
}

.psychosocial-box {
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(240, 141, 73, 0.10);
    border: 1px dashed rgba(240, 141, 73, 0.35);
}

.transfer-list {
    margin: 10px 0 0;
    padding-left: 20px;
    color: var(--profile-copy);
    line-height: 1.35;
}

.transfer-list li + li {
    margin-top: 6px;
}

.transfer-indicators {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-right: 22px;
    white-space: nowrap;
}

.transfer-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--profile-muted);
    font-size: 0.76rem;
    font-weight: 850;
}

.transfer-indicator-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.84), 0 4px 10px rgba(18, 59, 93, 0.18);
}

.calculation-details-card {
    padding: 14px 18px;
}

.calculation-details > summary {
    list-style: none;
}

.calculation-details > summary::-webkit-details-marker {
    display: none;
}

.calculation-summary {
    margin: 2px 0 0;
    color: var(--profile-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.calculation-summary-copy h2 {
    margin: 0;
    color: var(--profile-primary-dark);
    font-size: clamp(1.1rem, 1.25vw, 1.45rem);
    line-height: 1.08;
}

.calculation-details-body {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.calculation-section {
    padding: 12px;
    border: 1px solid rgba(21, 137, 149, 0.12);
    border-radius: 16px;
    background: rgba(245, 250, 251, 0.72);
}

.calculation-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.calculation-section-heading h3 {
    margin: 0;
    color: var(--profile-primary-dark);
    font-size: 1rem;
}

.calculation-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.calculation-status-real {
    color: #17633a;
    background: rgba(86, 195, 111, 0.18);
}

.calculation-status-model {
    color: var(--profile-primary-dark);
    background: rgba(21, 137, 149, 0.15);
}

.calculation-status-test {
    color: #96501f;
    background: rgba(240, 141, 73, 0.18);
}

.calculation-row-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.calculation-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.55);
}

.calculation-row-title {
    display: block;
    color: var(--profile-primary-dark);
    font-size: 0.9rem;
    line-height: 1.25;
}

.calculation-row-description {
    margin: 0;
    color: var(--profile-muted);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.45;
}

.calculation-formulas {
    display: grid;
    gap: 6px;
}

.calculation-formula {
    display: block;
    padding: 7px 9px;
    border-left: 3px solid rgba(21, 137, 149, 0.58);
    border-radius: 5px 9px 9px 5px;
    background: rgba(218, 239, 241, 0.6);
    color: #123f58;
    font-family: "Cascadia Mono", "IBM Plex Mono", Consolas, monospace;
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

.calculation-note {
    margin: 0;
    padding-top: 7px;
    border-top: 1px solid rgba(21, 137, 149, 0.12);
    color: var(--profile-muted);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.4;
}

.calculation-note-label {
    color: var(--profile-primary-dark);
    font-weight: 850;
}

@media (max-width: 760px) {
    .calculation-row-grid {
        grid-template-columns: 1fr;
    }
}
