/* ====================================
   WIZARD PROCESS STYLES - Blue #38b6ff
   ==================================== */

:root {
    --primary-blue: #38b6ff;
    --primary-blue-dark: #1565c0;
    --primary-blue-light: #42a5f5;
    --success-green: #4caf50;
    --warning-orange: #fbc02d;
    --danger-red: #f44336;
    --gray-light: #f5f5f5;
    --gray-dark: #cfcfcf;
    --gray-border: #e0e0e0;
    --primary-text-color: #191970;
}

/* Container principal */
.wizard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ====================================
   NAVIGATION STEPS (Timeline)
   ==================================== */

.wizard-timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.wizard-timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gray-border);
    transform: translateY(-50%);
    z-index: 0;
}

.timeline-step {
    position: relative;
    flex: 1;
    text-align: center;
    z-index: 1;
}

.timeline-step-number {
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--gray-border);
    color: #9e9e9e;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 auto 0.5rem;
    transition: all 0.3s ease;
}

.timeline-step-label {
    font-size: 0.9rem;
    color: #757575;
    font-weight: 500;
    display: block;
}

/* États des steps */
.timeline-step.completed .timeline-step-number {
    background: var(--success-green);
    border-color: var(--success-green);
    color: white;
}

.timeline-step.completed .timeline-step-number::after {
    content: '✓';
}

.timeline-step.active .timeline-step-number {
    background: var(--primary-text-color);
    border-color: var(--primary-text-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(1, 29, 53, 0.2);
}

.timeline-step.active .timeline-step-label {
    color: var(--primary-text-color);
    font-weight: 700;
}

/* ====================================
   SUB-STEPS (Étapes détaillées)
   ==================================== */

.wizard-substeps {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.substep-card {
    flex: 1;
    background: white;
    border: 2px solid var(--gray-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.substep-card:hover {
    border-color: var(--primary-text-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.substep-card.completed {
    border-color: var(--success-green);
    background: rgba(76, 175, 80, 0.05);
}

.substep-card.active {
    border-color: var(--warning-orange);
    background: rgba(30, 136, 229, 0.05);
}

.substep-number {
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: var(--gray-light);
    color: #757575;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.substep-card.completed .substep-number {
    background: var(--success-green);
    color: white;
}

.substep-card.active .substep-number {
    background: var(--primary-text-color);
    color: white;
}

.substep-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-text-color);
}

.substep-description {
    font-size: 0.85rem;
    color: #757575;
    line-height: 1.5;
}

/* ====================================
   CONTENT AREA
   ==================================== */

.wizard-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.wizard-header {
    border-bottom: 2px solid var(--gray-border);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.wizard-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-text-color);
    margin-bottom: 0.5rem;
}

.wizard-subtitle {
    color: #757575;
    font-size: 1rem;
}

/* ====================================
   FORM ELEMENTS
   ==================================== */

.form-group-wizard {
    margin-bottom: 2rem;
}

.form-label-wizard {
    font-weight: 600;
    color: var(--primary-text-color);
    margin-bottom: 0.75rem;
    display: block;
    font-size: 1rem;
}

.form-label-wizard .required {
    color: var(--danger-red);
    margin-left: 0.25rem;
}

.form-control-wizard {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control-wizard:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.form-select-wizard {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ====================================
   COMPETENCY CARDS - CORRECTION DES BORDURES
   ==================================== */

.competency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.competency-card-wizard {
    background: white;
    border: 4px solid #e5e7eb; /* Bordure par défaut grise - SANS !important */
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.competency-card-wizard:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.competency-card-wizard.selected {
    border-color: var(--primary-blue);
    background: rgba(30, 136, 229, 0.05);
}

.competency-card-wizard.ai-suggested {
    border-color: var(--primary-blue);
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.1) 0%, rgba(30, 136, 229, 0.05) 100%);
}

/* CORRECTION : Bordure verte pour compétences complétées */
.competency-card-wizard.completed {
    border-color: #4caf50 !important; /* Vert - maintenant avec !important pour override */
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(76, 175, 80, 0.03) 100%);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* CORRECTION : Bordure orange pour compétences en cours */
.competency-card-wizard.in-progress {
    border-color: #fbc02d !important; /* Orange - maintenant avec !important pour override */
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.08) 0%, rgba(255, 152, 0, 0.03) 100%);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.15);
    animation: pulse-orange 2s infinite;
}

/* Animation pulse pour la compétence en cours */
@keyframes pulse-orange {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(255, 152, 0, 0.2);
    }
}

.competency-checkbox-wizard {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 24px;
    height: 24px;
    accent-color: var(--primary-blue);
}

.competency-name {
    font-weight: 700;
    color: var( --primary-text-color);
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.competency-description {
    font-size: 0.875rem;
    color: #757575;
    line-height: 1.5;
}

.competency-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.badge-wizard {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-ai {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-blue);
}

.badge-confidence {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success-green);
}

/* CORRECTION : Badges de statut */
.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    z-index: 10;
    display: inline-block; /* Toujours visible par défaut */
}

.status-badge.d-none {
    display: none !important; /* Masquer seulement avec cette classe */
}

.badge-completed {
    background: #4caf50;
    color: white;
}

.badge-in-progress {
    background: #fbc02d;
    color: white;
}

/* ====================================
   SCORE DISPLAY - CORRECTION DES COULEURS
   ==================================== */

.score-display {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

/* CORRECTION : Couleurs des scores selon la légende */
.score-blue { 
    background: #dbeafe !important; 
    color: #38b6ff !important; 
    border: 2px solid #38b6ff !important;
}

.score-green { 
    background: #dcfce7 !important; 
    color: #4caf50 !important; 
    border: 2px solid #4caf50 !important;
}

.score-orange { 
    background: #fef3c7 !important; 
    color: #fbc02d !important; 
    border: 2px solid #fbc02d !important;
}

.score-red { 
    background: #fee2e2 !important; 
    color: #ef4444 !important; 
    border: 2px solid #ef4444 !important;
}

.score-gray {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    border: 2px solid #e5e7eb !important;
}

/* ====================================
   PROGRESS COUNTER
   ==================================== */

.progress-counter {
    background: var(--gray-light);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.counter-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-text-color);
    line-height: 1;
}

.counter-label {
    font-size: 1rem;
    color: #757575;
    margin-top: 0.5rem;
}

.progress-bar-wizard {
    height: 8px;
    background: var(--gray-border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-text-color);
    transition: width 0.3s ease;
}



.progress-status {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.progress-status.valid {
    color: var(--success-green);
}

.progress-status.invalid {
    color: var(--danger-red);
}

.progress-status.warning {
    color: var(--warning-orange);
}

/* ====================================
   ALERT BOXES
   ==================================== */

.alert-wizard {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-info {
    background: var(--gray-border);
    border-left-color: var(--gray-dark);
    color:var(--primary-text-color);
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: var(--success-green);
    color: #2e7d32;
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    border-left-color: var(--warning-orange);
    color: #e65100;
}

.alert-danger {
    background: rgba(244, 67, 54, 0.1);
    border-left-color: var(--danger-red);
    color: #c62828;
}

.alert-title {
    font-weight: 900;
    margin-bottom: 0.5rem;
}

/* ====================================
   BUTTONS
   ==================================== */

.btn-wizard {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-wizard {
    background: var(--primary-blue);
    color: white;
}

.btn-primary-wizard:hover:not(:disabled) {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.btn-secondary-wizard {
    background: white;
    color: #757575;
    border: 2px solid var(--gray-border);
}

.btn-secondary-wizard:hover:not(:disabled) {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.btn-success-wizard {
    background: var(--success-green);
    color: white;
}

.btn-success-wizard:hover:not(:disabled) {
    background: #388e3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-wizard:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-wizard-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

/* ====================================
   NAVIGATION BUTTONS
   ==================================== */

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-border);
    margin-top: 2rem;
}

/* ====================================
   SCORE LEGEND
   ==================================== */

.score-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 2px solid var(--gray-border);
    margin-bottom: 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 2px solid;
}

.legend-label {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ====================================
   FILE UPLOAD
   ==================================== */

.file-upload-area {
    border: 2px dashed var(--gray-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary-text-color);
    background: rgba(30, 136, 229, 0.02);
}

.file-upload-icon {
    font-size: 3rem;
    color: var(--primary-text-color);
    margin-bottom: 1rem;
}

.file-upload-text {
    font-weight: 600;
    color: var(--primary-text-color);
    margin-bottom: 0.5rem;
}

.file-upload-hint {
    font-size: 0.875rem;
    color: #757575;
}

/* ====================================
   UPLOADED FILES LIST
   ==================================== */

.uploaded-files-list {
    margin-top: 1.5rem;
    color: var(--primary-text-color);
}

.uploaded-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border: 2px solid var(--gray-border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    font-size: 1.5rem;
    color: var(--danger-red);
}

.file-name {
    font-weight: 600;
    color: var(--primary-text-color);
}

.file-size {
    font-size: 0.875rem;
    color: #757575;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}


/* ==============================
   LOGIN PAGE
   ============================== */

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
   
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    animation: fadeInUp 0.6s ease;
}

.login-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-text-color);
    margin-bottom: 2rem;
}

.login-title i {
    color: var(--primary-blue);
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #555;
}


/* ====================================
   RESPONSIVE
   ==================================== */

@media (max-width: 768px) {
    .wizard-timeline {
        flex-direction: column;
        gap: 1rem;
    }
    
    .wizard-timeline::before {
        display: none;
    }
    
    .wizard-substeps {
        flex-direction: column;
    }
    
    .competency-grid {
        grid-template-columns: 1fr;
    }
    
    .wizard-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Responsive layout pour mobile */
    .rating-row {
        grid-template-columns: 1fr !important;
    }
}

/* ====================================
   ANIMATIONS
   ==================================== */

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

.wizard-content {
    animation: fadeInUp 0.5s ease;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.timeline-step.active .timeline-step-number {
    animation: pulse 2s infinite;
}