/* Styles pour la nouvelle section de priorités et le flux en étapes */

/* Structure des étapes */
.vote-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    grid-area: steps;
    width: 100%;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 120px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.step-label {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
    transition: all 0.3s ease;
}

.step-connector {
    flex-grow: 1;
    height: 3px;
    background-color: #e9ecef;
    margin: 0 10px;
    position: relative;
    top: -20px;
    transition: background-color 0.3s ease;
    max-width: 100px;
}

.step-indicator.active .step-number {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 10px rgba(193, 39, 45, 0.4);
}

.step-indicator.active .step-label {
    color: var(--primary-color);
    font-weight: bold;
}

.step-indicator.completed .step-number {
    background-color: #28a745;
    color: white;
}

.step-indicator.completed + .step-connector {
    background-color: #28a745;
}

/* Structure des étapes du vote */
.politicians-vote-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-areas:
        "steps steps steps"
        "content content content";
    gap: 30px;
}

.vote-step {
    grid-area: content;
    display: none;
    animation: fadeIn 0.5s ease;
}

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

.step-title {
    text-align: center;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 700;
}

.step-description {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.step-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* Grille des priorités */
.priorities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.priority-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
    padding: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.priority-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.priority-card.selected {
    border-color: var(--primary-color);
    background-color: #fff8f8;
}

.priority-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.priority-card.selected .priority-icon {
    background-color: var(--primary-color);
    color: white;
}

.priority-icon i {
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.priority-card.selected .priority-icon i {
    color: white;
}

.priority-info {
    flex-grow: 1;
}

.priority-name {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.priority-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.priority-check {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.priority-card.selected .priority-check {
    opacity: 1;
}

/* Badges des priorités sélectionnées */
.selected-priorities-display {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 30px;
}

.selected-priorities-display h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #495057;
}

.priority-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.priority-badge {
    background-color: var(--primary-color);
    color: white;
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.priority-badge i {
    font-size: 0.8rem;
}

.no-priorities {
    color: #6c757d;
    font-style: italic;
}

/* Modifications pour les cartes de personnalités */
.politician-card {
    position: relative;
    overflow: hidden;
}

.match-percentage {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(40, 167, 69, 0.9);
    color: white;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.politician-description {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}

.matching-priorities {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.matching-priority {
    background-color: #e9ecef;
    color: #495057;
    border-radius: 15px;
    padding: 2px 8px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.matching-priority i {
    font-size: 0.7rem;
    color: var(--primary-color);
}

/* Modifications pour le classement */
.ranking-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ranking-party {
    font-size: 0.8rem;
    color: #6c757d;
}

.ranking-controls {
    display: flex;
    gap: 5px;
}

.move-up-btn, .move-down-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    transition: color 0.2s ease;
}

.move-up-btn:hover, .move-down-btn:hover {
    color: var(--primary-color);
}

/* Boutons d'action */
.btn-next, .btn-prev {
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-next {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-next:hover:not(:disabled) {
    background-color: #a01f24;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(193, 39, 45, 0.3);
}

.btn-next:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-prev {
    background-color: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-prev:hover {
    background-color: #f8f9fa;
    color: #495057;
}

/* Responsive */
@media (max-width: 768px) {
    .priorities-grid {
        grid-template-columns: 1fr;
    }
    
    .vote-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .step-connector {
        width: 3px;
        height: 20px;
        margin: 5px 0;
    }
    
    .step-indicator {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
        gap: 15px;
    }
    
    .step-number {
        margin-bottom: 0;
    }
}
