
/*
 * Structure principale de la page fiche athlete.
 * Contient le layout general, les cartes de surface, les zones d'identite,
 * les reperes d'age/PVC et les conteneurs de graphes principaux.
 */
.athlete-page {
    --trajectory-height: 330px;
    --anthropometry-height: 260px;
    min-height: 100vh;
    padding: 62px 20px 16px;
    background:
        radial-gradient(circle at top left, rgba(21, 137, 149, 0.14), transparent 30%),
        radial-gradient(circle at top right, rgba(240, 141, 73, 0.12), transparent 26%),
        linear-gradient(180deg, #fbfefe 0%, var(--profile-bg) 100%);
    color: var(--profile-copy);
}

.athlete-dashboard {
    max-width: 1520px;
    margin: 0 auto;
    display: grid;
    gap: 10px;
}

.dashboard-loading-shell {
    position: relative;
}

.dashboard-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(244, 250, 251, 0.32);
    backdrop-filter: blur(2px);
    border-radius: 22px;
    pointer-events: none;
}

.dashboard-loading-spinner {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 4px solid rgba(21, 137, 149, 0.18);
    border-top-color: var(--profile-primary-dark);
    animation: dashboard-spin 0.8s linear infinite;
    box-shadow: 0 10px 20px rgba(11, 55, 73, 0.12);
    background: rgba(255, 255, 255, 0.72);
}

@keyframes dashboard-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.athlete-overview-grid {
    display: grid;
    grid-template-columns: minmax(285px, 360px) minmax(240px, 300px) repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

.athlete-overview-main {
    display: contents;
}

.athlete-overview-sidebar .global-profile-card,
.athlete-overview-main .dimension-section,
.athlete-graphs-grid .trajectory-card,
.anthropometry-card {
    min-width: 0;
}

.athlete-overview-sidebar .global-profile-body {
    grid-template-columns: 1fr;
    align-content: start;
}

.athlete-overview-sidebar {
    display: contents;
}

.athlete-graphs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

.surface-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 252, 0.98));
    border: 1px solid var(--profile-border);
    border-radius: 22px;
    box-shadow: var(--profile-shadow);
}

.trajectory-card {
    overflow: hidden;
}

.anthropometry-card {
    overflow: hidden;
}

.section-card,
.trajectory-card,
.anthropometry-card,
.insight-card,
.transfer-card,
.identity-card,
.age-snapshot-card,
.global-profile-card {
    padding: 18px;
}

.anthropometry-graph-shell {
    margin-top: 8px;
}

.anthropometry-delta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.anthropometry-delta-row.is-empty {
    display: none;
}

.anthropometry-delta-badge {
    display: grid;
    gap: 2px;
    min-width: 150px;
    padding: 7px 10px;
    border-radius: 14px;
    background: rgba(21, 137, 149, 0.07);
    border: 1px solid rgba(21, 137, 149, 0.12);
}

.anthropometry-delta-label {
    color: var(--profile-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.anthropometry-delta-value {
    color: var(--profile-primary-dark);
    font-size: 0.95rem;
    line-height: 1.05;
}

.anthropometry-delta-detail {
    color: var(--profile-muted);
    font-size: 0.72rem;
    font-weight: 650;
}

.section-heading h2,
.card-topline h2,
.card-topline h3 {
    margin: 0;
    color: var(--profile-primary-dark);
}

.section-heading h2,
.card-topline h2 {
    font-size: clamp(1.35rem, 2vw, 2.15rem);
    line-height: 1.05;
}

.help-tip {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.card-help-corner {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}

.card-with-help .section-heading,
.card-with-help .card-topline {
    padding-right: 28px;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(21, 137, 149, 0.12);
    border: 1px solid rgba(21, 137, 149, 0.18);
    color: var(--profile-primary-dark);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    cursor: help;
}

.help-tooltip {
    max-width: 280px;
    font-size: 0.82rem;
    line-height: 1.35;
}

.section-heading p,
.insight-summary,
.insight-psychosocial,
.athlete-subtitle {
    color: var(--profile-muted);
}

.section-heading p,
.insight-summary,
.insight-psychosocial {
    margin: 3px 0 0;
    line-height: 1.4;
    font-size: 0.92rem;
}

.identity-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.identity-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.identity-name-selector,
.identity-event-selector {
    width: 100%;
}

.identity-name-selector .Select-control,
.identity-event-selector .Select-control {
    height: auto;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.identity-name-selector .Select-control {
    min-height: auto;
}

.identity-name-selector .Select-control:hover,
.identity-name-selector.is-open .Select-control,
.identity-event-selector .Select-control:hover,
.identity-event-selector.is-open .Select-control {
    box-shadow: none;
}

.identity-name-selector .Select-value,
.identity-name-selector .Select-placeholder {
    padding-left: 0;
    padding-right: 20px;
}

.identity-name-selector .Select-placeholder,
.identity-name-selector .Select-value-label {
    color: var(--profile-primary-dark) !important;
    font-size: clamp(1.02rem, 1.45vw, 1.5rem);
    font-weight: 700;
    line-height: 1.08;
    white-space: normal !important;
}

.identity-name-selector .Select-input,
.identity-event-selector .Select-input {
    height: auto;
}

.identity-name-selector .Select-input {
    line-height: 1.08;
}

.identity-name-selector .Select-input > input {
    color: var(--profile-primary-dark);
    font-size: clamp(1.02rem, 1.45vw, 1.5rem);
    font-weight: 700;
    line-height: 1.08;
    padding: 0;
}

.identity-name-selector .Select-arrow-zone,
.identity-event-selector .Select-arrow-zone {
    padding-right: 0;
}

.identity-name-selector .Select-arrow {
    border-top-color: var(--profile-primary-dark);
}

.identity-name-selector .Select-menu-outer,
.identity-event-selector .Select-menu-outer {
    margin-top: 4px;
    border-radius: 10px;
    border: 1px solid rgba(29, 77, 107, 0.14);
    box-shadow: 0 12px 24px rgba(11, 55, 73, 0.12);
}

.athlete-subtitle-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
}

.athlete-discipline-text,
.athlete-club-text {
    min-width: 0;
}

.identity-event-selector {
    min-width: 0;
}

.identity-event-selector .Select-control {
    min-height: 26px;
    overflow: visible;
}

.identity-event-selector .Select-value,
.identity-event-selector .Select-placeholder {
    position: static;
    display: block;
    min-height: 22px;
    padding-left: 0;
    padding-right: 14px;
}

.identity-event-selector .Select-placeholder,
.identity-event-selector .Select-value-label {
    color: var(--profile-muted) !important;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.18;
    display: block;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.identity-event-selector .Select-multi-value-wrapper {
    display: block;
}

.identity-event-selector .Select-arrow {
    border-top-color: var(--profile-muted);
}

.athlete-name {
    margin: 0;
    font-size: clamp(1.25rem, 1.8vw, 1.8rem);
    line-height: 1.05;
}

.athlete-subtitle {
    margin: 2px 0 0;
    font-size: 0.95rem;
}

.athlete-avatar {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--profile-primary) 0%, var(--profile-primary-dark) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.avatar-initials {
    color: #ffffff;
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.identity-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
}

.identity-metrics .competition-metric {
    grid-column: 1 / -1;
}

.identity-metric,
.comparison-metric {
    padding: 6px 8px;
    border-radius: 12px;
    background: rgba(245, 250, 251, 0.92);
    border: 1px solid rgba(21, 137, 149, 0.12);
}

.metric-label {
    display: inline-flex;
    color: var(--profile-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metric-value,
.comparison-value,
.global-reading,
.battery-value {
    display: block;
    margin-top: 2px;
    color: var(--profile-primary-dark);
    font-size: 0.9rem;
    line-height: 1.2;
}

.metric-value-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    margin-top: 2px;
}

.metric-value-row .metric-value {
    margin-top: 0;
}

.metric-value-row.metric-value-stack {
    display: grid;
    justify-content: start;
    gap: 1px;
}

.identity-metrics .anthropometry-metric .metric-subvalue {
    font-size: clamp(0.44rem, 0.48vw, 0.5rem);
    line-height: 0.95;
    letter-spacing: -0.01em;
}

.identity-metrics .anthropometry-metric .metric-delta {
    color: var(--profile-primary);
    font-size: 0.56rem;
    font-weight: 800;
    line-height: 0.95;
    white-space: nowrap;
}

.metric-subvalue {
    color: var(--profile-muted);
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
}

.global-profile-card {
    display: grid;
    gap: 8px;
    align-content: start;
}

.age-snapshot-card {
    display: grid;
    gap: 0;
    align-content: start;
    overflow: hidden;
}

.age-snapshot-body {
    display: grid;
    gap: 10px;
}

.age-snapshot-block {
    display: grid;
    gap: 6px;
    padding: 10px 11px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(245, 250, 251, 0.96), rgba(234, 245, 246, 0.78));
    border: 1px solid rgba(21, 137, 149, 0.12);
}

.age-snapshot-value {
    color: var(--profile-primary-dark);
    font-size: 0.98rem;
    line-height: 1.1;
}

.age-snapshot-caption {
    color: var(--profile-muted);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
}

.age-quarter-track,
.maturity-track {
    position: relative;
    height: 22px;
    margin-top: 2px;
    border-radius: 999px;
    overflow: visible;
    box-shadow: inset 0 0 0 1px rgba(17, 79, 99, 0.1), 0 10px 18px rgba(17, 79, 99, 0.08);
}

.age-quarter-track {
    background: linear-gradient(
        90deg,
        rgba(215, 238, 240, 0.96) 0%,
        rgba(215, 238, 240, 0.96) 25%,
        rgba(187, 226, 229, 0.96) 25%,
        rgba(187, 226, 229, 0.96) 50%,
        rgba(139, 207, 211, 0.96) 50%,
        rgba(139, 207, 211, 0.96) 75%,
        rgba(31, 142, 152, 0.92) 75%,
        rgba(31, 142, 152, 0.92) 100%
    );
}

.age-quarter-labels {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    text-align: center;
    color: rgba(16, 34, 45, 0.68);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    pointer-events: none;
}

.age-quarter-marker,
.maturity-marker {
    position: absolute;
    top: -5px;
    z-index: 2;
    width: 4px;
    height: 32px;
    border-radius: 999px;
    background: #10222d;
    transform: translateX(-50%);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85);
}

.maturity-track {
    height: 24px;
    margin-top: 22px;
    margin-bottom: 28px;
    border: 1px solid rgba(17, 79, 99, 0.18);
    border-radius: 999px;
    overflow: visible;
    background: linear-gradient(
        90deg,
        #d95a50 0%,
        #ee9a4b 18%,
        #f5d75a 34%,
        #9dd866 50%,
        #f5d75a 66%,
        #ee9a4b 82%,
        #d95a50 100%
    );
    box-shadow: inset 0 1px 2px rgba(16, 34, 45, 0.16), 0 8px 18px rgba(17, 79, 99, 0.08);
}

.maturity-center-line {
    position: absolute;
    z-index: 1;
    top: -6px;
    left: 50%;
    width: 2px;
    height: 36px;
    border-radius: 999px;
    background: rgba(16, 34, 45, 0.88);
    transform: translateX(-50%);
}

.maturity-center-value {
    position: absolute;
    z-index: 2;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--profile-primary-dark);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.maturity-center-label {
    position: absolute;
    z-index: 2;
    top: 31px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--profile-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.maturity-track .maturity-marker {
    position: absolute;
    top: -6px;
    z-index: 3;
    display: grid;
    justify-items: center;
    gap: 2px;
    width: 2px;
    height: 36px;
    background: transparent;
    border-left: 3px dashed #10222d;
    border-radius: 0;
    transform: translateX(-50%);
    box-shadow: none;
}

.maturity-summary-caption {
    display: block;
    margin-top: 2px;
}
