/* ===================================
   CARTE DE PROGRESSION MODERNE 2025
   Dashboard - Style Premium
   =================================== */

/* Animations globales pour les icônes animées */
@keyframes bounce-icon {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-8px) rotate(-5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-4px) rotate(5deg);
    }
}

.animated-icon {
    font-size: 44px;
    flex-shrink: 0;
    display: inline-block;
    animation: bounce-icon 2s ease-in-out infinite;
}

/* Animations */
@keyframes stat-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes stat-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 6px 20px rgba(231, 125, 1, 0.2);
    }
}

@keyframes icon-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes number-glow {
    0%, 100% {
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    }
    50% {
        filter: drop-shadow(0 4px 16px rgba(231, 125, 1, 0.4));
    }
}

.progress-card-modern {
    background: #1a1a1a;
    border: 1px solid rgba(231, 125, 1, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 1.5rem;
}

/* Cylindre de progression vertical */
.progress-cylinder-wrapper {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.progress-cylinder {
    width: 120px;
    height: 280px;
    background: #0f0f0f;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 4px 12px rgba(0, 0, 0, 0.6),
        0 8px 24px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(16, 185, 129, 0.2);
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cylinder-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        180deg,
        #10b981 0%,
        #059669 50%,
        #047857 100%
    );
    border-radius: 0 0 14px 14px;
    transition: height 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 -4px 20px rgba(16, 185, 129, 0.5),
        inset 0 2px 8px rgba(255, 255, 255, 0.2);
    animation: fillUp 1.5s ease-out;
}

@keyframes fillUp {
    from {
        height: 0 !important;
    }
}

.cylinder-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    border-radius: 14px 14px 0 0;
}

.cylinder-shine {
    position: absolute;
    left: 15%;
    top: 0;
    bottom: 0;
    width: 25%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 100%
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.progress-percentage-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
}

.percentage-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: #10b981;
    line-height: 1;
    letter-spacing: -0.02em;
}

.percentage-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* Informations de progression */
.progress-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Progress Header - Aligné comme Contenu de la Formation */
.progress-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(26, 26, 26, 0.5);
    margin-bottom: 1.5rem;
    border-radius: 12px 12px 0 0;
}

.progress-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-header-content > .material-icons {
    font-size: 3rem;
    color: #E77D01;
    filter: drop-shadow(0 2px 4px rgba(231, 125, 1, 0.3));
    background: linear-gradient(135deg, rgba(231, 125, 1, 0.2), rgba(231, 125, 1, 0.1));
    padding: 0.625rem;
    border-radius: 12px;
    flex-shrink: 0;
}

.progress-header-content > .static-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    flex-shrink: 0;
    line-height: 1;
}

.progress-header-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
}

.progress-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    margin-bottom: 0 !important;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.progress-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    margin-bottom: 0 !important;
    line-height: 1.4;
    font-weight: 400;
}

.progress-subtitle .highlight-number {
    color: #10b981;
    font-weight: 700;
    font-size: 0.9375rem;
}

.progress-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.6;
    font-weight: 500;
}

.progress-description strong {
    color: #FF8C00;
    font-weight: 700;
    font-size: 1.25rem;
}

/* Statistiques Améliorées */
.progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0 1.5rem;
}

.stat-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.stat-item .material-icons {
    font-size: 2rem;
    color: #E77D01;
    background: linear-gradient(135deg, rgba(231, 125, 1, 0.2), rgba(255, 140, 0, 0.2));
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(231, 125, 1, 0.2);
}

.stat-item:hover .material-icons {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(231, 125, 1, 0.3), rgba(255, 140, 0, 0.3));
    box-shadow: 0 4px 12px rgba(231, 125, 1, 0.3);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff !important;
    line-height: 1;
    margin: 0.25rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    font-variant-numeric: tabular-nums;
    font-family: 'Courier New', Courier, monospace;
}

.stat-item:hover .stat-number {
    transform: scale(1.05);
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.stat-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    text-align: center;
    transition: color 0.3s ease;
}

.stat-item:hover .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Styles spécifiques pour les statistiques */
.stat-item-completed {
    border-color: rgba(16, 185, 129, 0.4) !important;
}

.stat-item-completed::before {
    background: linear-gradient(90deg, #10b981, #059669) !important;
}

.stat-item-completed:hover {
    border-color: rgba(16, 185, 129, 0.7) !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3), 
                0 0 40px rgba(16, 185, 129, 0.1) !important;
}

.stat-item-completed .material-icons {
    color: #10b981 !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2)) !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2) !important;
}

.stat-item-completed:hover .material-icons {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.3)) !important;
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4) !important;
}

.stat-item-remaining {
    border-color: rgba(244, 67, 54, 0.4) !important;
}

.stat-item-remaining::before {
    background: linear-gradient(90deg, #F44336, #EF5350) !important;
}

.stat-item-remaining:hover {
    border-color: rgba(244, 67, 54, 0.7) !important;
    box-shadow: 0 8px 24px rgba(244, 67, 54, 0.3), 
                0 0 40px rgba(244, 67, 54, 0.1) !important;
}

.stat-item-remaining .material-icons {
    color: #F44336 !important;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.2), rgba(239, 83, 80, 0.2)) !important;
    box-shadow: 0 4px 16px rgba(244, 67, 54, 0.2) !important;
}

.stat-item-remaining:hover .material-icons {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.3), rgba(239, 83, 80, 0.3)) !important;
    box-shadow: 0 6px 24px rgba(244, 67, 54, 0.4) !important;
}

.stat-item-total {
    border-color: rgba(33, 150, 243, 0.4) !important;
}

.stat-item-total::before {
    background: linear-gradient(90deg, #2196F3, #42A5F5) !important;
}

.stat-item-total:hover {
    border-color: rgba(33, 150, 243, 0.7) !important;
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.3), 
                0 0 40px rgba(33, 150, 243, 0.1) !important;
}

.stat-item-total .material-icons {
    color: #2196F3 !important;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(66, 165, 245, 0.2)) !important;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.2) !important;
}

.stat-item-total:hover .material-icons {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.3), rgba(66, 165, 245, 0.3)) !important;
    box-shadow: 0 6px 24px rgba(33, 150, 243, 0.4) !important;
}

/* Barre de progression */
.progress-bar-container {
    margin-top: 1.5rem;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.progress-bar-container .progress {
    height: 8px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bg-gradient-orange {
    background: linear-gradient(90deg, #E77D01 0%, #FF8C00 100%) !important;
    box-shadow: 0 2px 8px rgba(231, 125, 1, 0.4) !important;
    border-radius: 10px !important;
}

.bg-gradient-green {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4) !important;
    border-radius: 10px !important;
}

/* Badge de complétion */
.completion-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
    animation: celebrate 0.6s ease-out;
    width: 100%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.completion-badge span {
    display: block;
    width: 100%;
    letter-spacing: 0.02em;
}

@keyframes celebrate {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.05) rotate(-5deg);
    }
    75% {
        transform: scale(1.05) rotate(5deg);
    }
}

/* Section Informations de la Plateforme */
.platform-info-section {
    padding: 0 1.5rem 1.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0;
}

.section-title .material-icons {
    font-size: 1.75rem;
    color: #E77D01;
}

.platform-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* Cartes de stats de la plateforme */
.platform-stat-card {
    background: #1a1a1a;
    border: 1px solid rgba(231, 125, 1, 0.2);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 140px;
}

.platform-stat-card:hover {
    background: #222222;
    border-color: rgba(231, 125, 1, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(231, 125, 1, 0.2);
}

.platform-stat-card:hover .platform-stat-value {
    background: rgba(231, 125, 1, 0.18);
    border-color: rgba(231, 125, 1, 0.35);
    box-shadow: 0 4px 8px rgba(231, 125, 1, 0.2);
    transform: scale(1.02);
}

.platform-stat-card:hover .list-group-item .media-right h4 {
    background: rgba(231, 125, 1, 0.18) !important;
    border-color: rgba(231, 125, 1, 0.35) !important;
    box-shadow: 0 4px 8px rgba(231, 125, 1, 0.2) !important;
    transform: scale(1.02) !important;
}

/* Header: Icône + Label sur la même ligne */
.platform-stat-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* Icône de la stat */
.platform-stat-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(231, 125, 1, 0.2), rgba(255, 140, 0, 0.1));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.platform-stat-card:hover .platform-stat-icon {
    transform: scale(1.05) rotate(3deg);
    background: linear-gradient(135deg, rgba(231, 125, 1, 0.3), rgba(255, 140, 0, 0.2));
}

.platform-stat-icon .material-icons {
    font-size: 1.35rem;
    color: #E77D01;
}

/* Contenu de la stat */
.platform-stat-content {
    display: flex;
    align-items: center;
}

/* Label à côté de l'icône */
.platform-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

/* Valeur en badge centré en bas */
.platform-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff !important;
    background: rgba(231, 125, 1, 0.12);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(231, 125, 1, 0.25);
    line-height: 1.2;
    white-space: normal;
    text-align: center;
    align-self: center;
    box-shadow: 0 2px 6px rgba(231, 125, 1, 0.15);
    width: 100%;
    overflow: visible;
    word-wrap: break-word;
}

/* Style pour les items de la liste dans la grille */
.platform-stat-card .list-group-item {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    justify-content: center;
}

.platform-stat-card .list-group-item .media {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Header avec icône (déjà positionnée) et label invisible car déjà dans header */
.platform-stat-card .list-group-item .media-body {
    display: none;
}

/* Valeur en badge centré */
.platform-stat-card .list-group-item .media-right {
    display: flex;
    justify-content: center;
}

.platform-stat-card .list-group-item .media-right h4 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background: rgba(231, 125, 1, 0.12) !important;
    padding: 0.75rem 1rem !important;
    border-radius: 12px !important;
    border: 1px solid rgba(231, 125, 1, 0.25) !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    white-space: normal !important;
    box-shadow: 0 2px 6px rgba(231, 125, 1, 0.15) !important;
    width: 100% !important;
    overflow: visible !important;
    word-wrap: break-word !important;
}

/* Responsive */
@media (max-width: 992px) {
    .progress-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .progress-cylinder {
        width: 110px;
        height: 260px;
    }
    
    .percentage-value {
        font-size: 2rem;
    }
    
    .progress-title {
        font-size: 1.6rem;
    }
    
    .progress-title .material-icons {
        font-size: 2.2rem;
    }
    
    .progress-description {
        font-size: 1.1rem;
    }
    
    .progress-description strong {
        font-size: 1.15rem;
    }
    
    .platform-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .progress-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .stat-item {
        max-width: 100%;
    }
    
    .stat-item {
        padding: 1.75rem 1.5rem;
    }
    
    .stat-item .material-icons {
        font-size: 2.5rem;
        width: 64px;
        height: 64px;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .progress-cylinder {
        width: 100px;
        height: 240px;
    }
    
    .percentage-value {
        font-size: 1.85rem;
    }
    
    .percentage-text {
        font-size: 0.8rem;
    }
    
    .progress-title {
        font-size: 1.4rem;
        gap: 0.75rem;
    }
    
    .progress-title .material-icons {
        font-size: 2rem;
    }
    
    .progress-description {
        font-size: 1rem;
    }
    
    .progress-description strong {
        font-size: 1.1rem;
    }
    
    .completion-badge {
        font-size: 1.2rem;
        padding: 1.5rem 2rem;
    }
    
    .platform-info-section {
        padding: 0 1rem 1rem;
    }
    
    .platform-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .section-title .material-icons {
        font-size: 1.5rem;
    }
    
    .platform-stat-card {
        padding: 0.85rem;
    }
    
    .platform-stat-icon {
        width: 32px;
        height: 32px;
    }
    
    .platform-stat-icon .material-icons {
        font-size: 1.2rem;
    }
    
    .platform-stat-label {
        font-size: 0.75rem;
    }
    
    .platform-stat-value {
        font-size: 1.5rem;
        padding: 0.5rem 1rem;
    }
    
    .platform-stat-card .list-group-item .media-right h4 {
        font-size: 1.5rem !important;
        padding: 0.5rem 1rem !important;
    }
}

@media (max-width: 576px) {
    .progress-stats {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .stat-item {
        padding: 1.5rem 1.25rem;
    }
    
    .stat-item .material-icons {
        font-size: 2.25rem;
        width: 56px;
        height: 56px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .completion-badge {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .platform-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .platform-stat-card {
        padding: 0.85rem;
    }
    
    .platform-stat-icon {
        width: 32px;
        height: 32px;
    }
    
    .platform-stat-icon .material-icons {
        font-size: 1.2rem;
    }
    
    .platform-stat-header {
        gap: 0.5rem;
    }
    
    .platform-stat-label {
        font-size: 0.7rem;
    }
    
    .platform-stat-value {
        font-size: 1.5rem;
        padding: 0.5rem 1rem;
    }
    
    .platform-stat-card .list-group-item .media-right h4 {
        font-size: 1.5rem !important;
        padding: 0.5rem 1rem !important;
    }
}
