/* Cartes de base */
.card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.card-content {
    color: var(--text-secondary);
}

.card-footer {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Cartes de métriques */
.metric-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    opacity: 0.1;
    border-radius: 50%;
    transform: translate(20px, -20px);
}

.metric-card.green::before { background-color: var(--color-success); }
.metric-card.purple::before { background-color: var(--color-primary); }
.metric-card.red::before { background-color: var(--color-error); }
.metric-card.orange::before { background-color: var(--color-warning); }

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.metric-title {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.metric-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.metric-icon.green { background-color: var(--color-success); }
.metric-icon.purple { background-color: var(--color-primary); }
.metric-icon.red { background-color: var(--color-error); }
.metric-icon.orange { background-color: var(--color-warning); }

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.metric-change {
    font-size: 0.875rem;
    font-weight: 500;
}

.metric-change.positive { color: var(--color-success); }
.metric-change.negative { color: var(--color-error); }
.metric-change.neutral { color: var(--text-secondary); }

/* Cartes de mission */
.mission-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.mission-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.mission-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.mission-client {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.mission-status {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.mission-status.blue {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.mission-status.orange {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.mission-status.green {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.mission-status.purple {
    background-color: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.mission-status.red {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.mission-details {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.mission-assignee::before {
    content: '👤';
    margin-right: var(--spacing-xs);
}

.mission-date::before {
    content: '🕒';
    margin-right: var(--spacing-xs);
}

/* Cartes de client/sous-traitant */
.profile-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    position: relative;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.profile-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.profile-specialty {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.profile-status {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.profile-status.green {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.profile-status.orange {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.profile-status.red {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.profile-status.gray {
    background-color: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.profile-details {
    margin-bottom: var(--spacing-lg);
}

.profile-detail {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.profile-detail:last-child {
    margin-bottom: 0;
}

.profile-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-warning);
}

/* Cartes de planning */
.planning-day {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    min-height: 200px;
}

.planning-day-header {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.planning-event {
    background-color: var(--color-primary);
    color: white;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-sm);
    font-size: 0.875rem;
}

.planning-event:last-child {
    margin-bottom: 0;
}

.planning-event-time {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.planning-event-title {
    margin-bottom: var(--spacing-xs);
}

.planning-event-assignee {
    opacity: 0.8;
    font-size: 0.75rem;
}

/* Nouvelles classes extraites de paiement.php */
.card-summary {
    position: sticky;
    top: 20px;
}

.card-summary-header {
    display: flex;
    align-items: center;
}

.card-summary-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.plan-details {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid #f1f5f9;
}

.plan-header {
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
}

.plan-name {
    font-size: 1.3rem;
    letter-spacing: -0.5px;
    color: white;
}

.plan-cycle {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: rgba(255,255,255,0.2);
    border-radius: 20px;
    color: white;
    font-weight: 500;
}

.plan-price {
    padding: var(--spacing-lg);
    text-align: center;
    background: white;
}

.plan-price-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.plan-price-unit {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-secondary);
    vertical-align: top;
}

.plan-price-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.features-title {
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.feature-item {
    display: flex;
    align-items: start;
}

.feature-icon {
    flex-shrink: 0;
    margin-right: var(--spacing-sm);
    margin-top: 3px;
    width: 26px;
    height: 26px;
    background-color: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-text {
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.6;
}

.total-section {
    border-top: 1px solid var(--border-color);
    padding-top: var(--spacing-lg);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
}

.total-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.total-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.total-final {
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-final-label {
    font-size: 1.2rem;
    color: white;
    font-weight: 700;
}

.total-final-value {
    font-size: 2rem;
    color: white;
    letter-spacing: -1px;
    font-weight: 700;
}

.payment-alert {
    border: none;
    margin-bottom: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background-color: #dbeafe;
    border-left: 4px solid var(--color-info);
    border-radius: 18px;
    display: flex;
    align-items: start;
}

.alert-icon-wrapper {
    flex-shrink: 0;
    margin-right: var(--spacing-sm);
    width: 40px;
    height: 40px;
    background-color: var(--color-info);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-title {
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: #1e40af;
}

.alert-text {
    color: #1e40af;
    font-size: 0.95rem;
    line-height: 1.6;
}

.payment-form-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-lg);
}

.payment-secure {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
    background-color: #eef2ff;
    border: 2px dashed #818cf8;
    border-radius: 20px;
    display: flex;
    align-items: start;
}

.secure-icon-wrapper {
    flex-shrink: 0;
    margin-right: var(--spacing-sm);
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.secure-title {
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: #312e81;
}

.secure-text {
    color: #312e81;
    font-size: 0.95rem;
    line-height: 1.6;
}

.terms-check {
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    background-color: #fef3c7;
    border-radius: 18px;
    border: 2px solid #fde047;
}

.terms-label {
    color: #78350f;
    line-height: 1.7;
    margin-left: var(--spacing-sm);
}

.terms-link {
    font-weight: 600;
    text-decoration: underline;
    color: #78350f;
}

.submit-btn {
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.back-btn {
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    color: #64748b;
    font-weight: 600;
}

.back-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.security-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: none;
}

.security-item {
    text-align: center;
}

.security-icon-wrapper {
    margin-bottom: var(--spacing-sm);
    margin-left: auto;
    margin-right: auto;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.security-title {
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: #065f46;
}

.security-text {
    font-size: 0.875rem;
    color: #059669;
}

/* Animations with reduced motion support */
@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
    .fa-shopping-bag, .fa-credit-card {
        animation: none;
    }
}

.card {
    transition: none; /* Optionnel pour réduire motion */
}