/* ── Accueil : suivi d'avancement des concours ── */

.accueil-hero {
    background: linear-gradient(145deg, #1a5278 0%, #1f5f8b 45%, #2d7ab0 100%);
    color: #fff;
    border-radius: 14px;
    padding: 26px 30px;
    margin-bottom: 22px;
    box-shadow: 0 6px 20px rgba(26, 82, 120, 0.22);
}

.accueil-hero h1 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
}

.accueil-hero p {
    margin: 0;
    font-size: 15px;
    opacity: 0.92;
    line-height: 1.6;
}

.accueil-selector-panel {
    background: #fff;
    border: 1px solid #dce4ec;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(31, 95, 139, 0.07);
}

.accueil-selector-panel label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #2a3d4d;
    margin-bottom: 10px;
}

.accueil-selector-panel .select2-container {
    width: 100% !important;
}

.accueil-selector-panel .select2-container--default .select2-selection--single {
    height: 44px;
    border: 1px solid #c5d3e0;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 15px;
}

.accueil-selector-panel .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

.accueil-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6b7c8d;
    background: #f8fafc;
    border: 2px dashed #dce4ec;
    border-radius: 12px;
}

.accueil-empty-state .glyphicon {
    font-size: 42px;
    color: #b8c9d8;
    margin-bottom: 14px;
}

.accueil-empty-state p {
    font-size: 16px;
    margin: 0;
}

/* ── Carte progression ── */

.competition-timeline-card {
    background: #fff;
    border: 1px solid #dce4ec;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(31, 95, 139, 0.10);
    animation: accueilFadeIn 0.35s ease;
}

@keyframes accueilFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.competition-timeline-header {
    background: linear-gradient(180deg, #25699a 0%, #1f5f8b 100%);
    color: #fff;
    padding: 20px 24px;
}

.competition-timeline-header .poste-ref {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.competition-timeline-header .poste-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.4;
}

.competition-progress-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.competition-progress-track {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    overflow: hidden;
}

.competition-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5cb85c 0%, #7dd87d 100%);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
}

.competition-progress-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.competition-progress-meta {
    font-size: 13px;
    opacity: 0.88;
    margin-top: 8px;
}

.competition-timeline-body {
    padding: 24px;
}

/* ── Timeline verticale des phases ── */

.phase-progress-timeline {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0 28px 0 0;
}

.phase-progress-timeline::before {
    content: '';
    position: absolute;
    right: 11px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: linear-gradient(180deg, #5cb85c 0%, #dce4ec 100%);
    border-radius: 2px;
}

.phase-step {
    position: relative;
    margin-bottom: 0;
    padding: 0 36px 28px 0;
}

.phase-step:last-child {
    padding-bottom: 0;
}

.phase-step-marker {
    position: absolute;
    right: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid #dce4ec;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: all 0.25s ease;
}

.phase-step-marker .glyphicon {
    font-size: 11px;
    color: #fff;
    display: none;
}

.phase-step--done .phase-step-marker {
    background: #5cb85c;
    border-color: #5cb85c;
}

.phase-step--done .phase-step-marker .glyphicon-ok {
    display: block;
}

.phase-step--current .phase-step-marker {
    background: #1f5f8b;
    border-color: #1f5f8b;
    box-shadow: 0 0 0 4px rgba(31, 95, 139, 0.2);
    animation: phasePulse 2s infinite;
}

.phase-step--current .phase-step-marker::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

@keyframes phasePulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(31, 95, 139, 0.2); }
    50%       { box-shadow: 0 0 0 8px rgba(31, 95, 139, 0.12); }
}

.phase-step--pending .phase-step-marker {
    background: #f4f7fa;
    border-color: #c5d3e0;
}

.phase-step--cancelled .phase-step-marker {
    background: #e74c3c;
    border-color: #e74c3c;
}

.phase-step--cancelled .phase-step-marker .glyphicon-remove {
    display: block;
}

.phase-step-card {
    background: #f8fafc;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    padding: 14px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.phase-step--current .phase-step-card {
    background: linear-gradient(135deg, #e8f4fc 0%, #f4f9fd 100%);
    border-color: #b8d4ea;
    box-shadow: 0 2px 8px rgba(31, 95, 139, 0.10);
}

.phase-step--done .phase-step-card {
    border-color: #c8e6c9;
}

.phase-step-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.phase-step-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a2a36;
    line-height: 1.4;
    margin: 0;
}

.phase-step-status {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.phase-step-status--done     { background: #dff0d8; color: #3c763d; }
.phase-step-status--current  { background: #d9edf7; color: #1f5f8b; }
.phase-step-status--pending  { background: #f5f5f5; color: #777; }
.phase-step-status--cancelled { background: #f2dede; color: #a94442; }

.phase-step-dates {
    font-size: 13px;
    color: #5a6c7d;
    margin-bottom: 6px;
}

.phase-step-desc {
    font-size: 14px;
    color: #4a5c6d;
    line-height: 1.55;
    margin-top: 8px;
}

.phase-activites {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #dce4ec;
}

.phase-activites-title {
    font-size: 12px;
    font-weight: 700;
    color: #5a6c7d;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}

.phase-activite-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #dce4ec;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    color: #3a4d5d;
    margin: 0 0 6px 6px;
}

.phase-activite-chip .glyphicon {
    color: #1f5f8b;
    font-size: 11px;
}

.accueil-loading {
    text-align: center;
    padding: 40px;
    color: #1f5f8b;
}

.accueil-loading .glyphicon-spin {
    font-size: 28px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.accueil-error {
    background: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .accueil-hero {
        padding: 20px 18px;
    }
    .accueil-hero h1 {
        font-size: 20px;
    }
    .competition-timeline-header .poste-title {
        font-size: 17px;
    }
    .phase-step-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
