/**
 * Styles pour le nouveau système de ressources
 * Version: 1.0.0
 */

/* Container des ressources dans le header */
.resources-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Réduit de 15px à 10px */
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Ressource individuelle */
.resource-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

/* Pièces non cliquables dans le garage */
#section-boutique .resource-euros {
    cursor: default !important;
    opacity: 1;
}

.resource-icon {
    font-size: 18px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Force la taille des images dans les icônes de ressources */
.resources-container .resource-item img.resource-icon {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    object-fit: contain;
    margin-right: 4px;
}

/* Images plus grandes dans les tooltips et modales */
.resource-tooltip h3 img,
.resource-detail-content h3 img {
    width: 32px !important;
    height: 32px !important;
    margin-right: 8px;
}

.resource-value {
    font-weight: 600;
    font-size: 14px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Carburant spécifique */
.resource-fuel .resource-value::after {
    content: "/" attr(data-max);
    opacity: 0.7;
    font-weight: 400;
}

/* Fenêtre déroulante full width */
.resource-dropdown {
    position: fixed;
    top: 50px; /* Collé directement au header */
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); /* Ombre uniquement vers le bas */
    transform: translateY(-10px); /* Animation plus subtile */
    opacity: 0;
    visibility: hidden;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.15s; /* Transitions séparées et plus rapides */
    z-index: 10000;
    overflow: hidden;
    border-top: none;
}

/* Flèche/triangle indicateur */
.resource-dropdown::before {
    content: '';
    position: absolute;
    top: -7px; /* Ajusté pour être plus visible */
    width: 14px;
    height: 14px;
    background: white;
    transform: rotate(45deg);
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    left: var(--arrow-position, 50px);
    z-index: 1;
}

/* État actif du dropdown */
.resource-dropdown.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Contenu du dropdown avec transition douce */
.resource-dropdown-content {
    padding: 30px 20px;
    max-width: 600px;
    margin: 0 auto;
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* Animation de changement de contenu dropdown */
.resource-dropdown-content.changing {
    opacity: 0.7;
    transition: opacity 0.1s ease;
}

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

.resource-dropdown h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.resource-dropdown h3 .icon {
    font-size: 28px;
}

.resource-info {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.resource-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.resource-action-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.resource-action-btn.primary {
    background: #667eea;
    color: white;
}

.resource-action-btn.primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.resource-action-btn.secondary {
    background: #f0f0f0;
    color: #666;
}

.resource-action-btn.secondary:hover {
    background: #e0e0e0;
}

/* Bouton Premium */
.resource-action-btn.premium-action {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    font-weight: 600;
    border: none;
}

.resource-action-btn.premium-action:hover {
    background: linear-gradient(135deg, #FFA500, #FFD700);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

/* Masquer le bouton Premium si déjà Premium */
.is-premium-user .resource-action-btn.premium-action {
    display: none;
}

/* Modal de base */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Carburant épuisé */
.resource-fuel.empty {
    /* Background et bordure supprimés */
}

.resource-fuel.empty .resource-value {
    color: #ef4444;
}

/* Animation de recharge */
@keyframes rechargeAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.resource-fuel.recharging .resource-icon {
    animation: rechargeAnimation 2s ease-in-out infinite;
}

/* Temps de recharge */
.recharge-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 15px;
}

.recharge-timer-icon {
    font-size: 24px;
}

.recharge-timer-text {
    flex: 1;
}

.recharge-timer-time {
    font-weight: 700;
    color: #667eea;
    font-size: 18px;
}

/* État de charge */
.charging-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 10px;
    margin: 15px 0;
}

.charging-status .status-icon {
    font-size: 24px;
}

.charging-status .status-text {
    font-size: 16px;
    color: #333;
}

/* Alerte carburant vide */
.empty-fuel-alert {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
}

.empty-fuel-alert .alert-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.empty-fuel-alert p {
    margin: 5px 0;
    color: #856404;
}

/* Bouton danger */
.resource-action-btn.danger {
    background: #ef4444;
    color: white;
}

.resource-action-btn.danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Visualisation de la batterie */
.battery-visualization {
    margin: 20px 0;
    text-align: center;
}

.charge-bars {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 10px;
}

.charge-bar {
    width: 40px;
    height: 60px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    background: #fafafa;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.charge-bar.charged {
    background: linear-gradient(to top, #10b981, #34d399);
    border-color: #10b981;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

.charge-bar.charging {
    background: linear-gradient(to top, #3b82f6, #60a5fa);
    border-color: #3b82f6;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
    position: relative;
}

.charge-bar.empty {
    background: linear-gradient(to bottom, #f5f5f5, #e5e7eb);
    border-color: #d1d5db;
    opacity: 0.6;
}

/* Barre avec progression partielle sauvegardée */
.charge-bar.partial {
    background: linear-gradient(to bottom, #f5f5f5, #e5e7eb);
    border-color: #f59e0b;
    border-width: 2px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.partial-charge {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.charge-icon.partial {
    color: white;
    mix-blend-mode: normal;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.charge-progress-saved {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--partial-progress, 0%);
    background: linear-gradient(to top, #f59e0b, #fbbf24);
    transition: height 0.5s ease;
}

/* Info de progression sauvegardée */
.charge-info.saved-progress {
    color: #f59e0b;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    margin-top: 5px;
}

.charge-icon {
    color: white;
    font-size: 20px;
    z-index: 2;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.empty-icon {
    color: #9ca3af;
    font-size: 16px;
    font-weight: 300;
    opacity: 0.4;
}

/* Améliorer l'icône vide */
.charge-bar.empty .empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    opacity: 0.5;
    font-size: 16px !important; /* Force la taille à 16px */
    height: 100%;
    margin: 0; /* Retirer tout margin qui pourrait venir d'ailleurs */
}

/* Animation de charge */
.charging-animation {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.charge-bar.charging::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 100%);
    animation: chargeWave 2s ease-in-out infinite;
}

@keyframes chargeWave {
    0% {
        transform: translateY(100%);
    }
    100% {
        transform: translateY(-100%);
    }
}

.charge-icon.pulse {
    animation: chargePulse 2s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes chargePulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Enlever l'ancienne barre de progression */
.charge-progress {
    display: none;
}

.charge-info {
    font-size: 14px;
    color: #6b7280;
    margin-top: 10px;
}

/* Icône de station de charge */
.charging-icon-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 15px;
}

.charging-station {
    font-size: 32px;
    position: relative;
}

.charging-cable {
    position: relative;
    width: 30px;
    height: 30px;
}

.charging-cable .plug {
    font-size: 24px;
    transition: all 0.3s ease;
}

.charging-cable.connected .plug {
    transform: translateX(-5px);
}

.charging-cable.disconnected .plug {
    transform: translateX(5px) rotate(15deg);
    opacity: 0.6;
}

/* État de charge amélioré */
.charging-status {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 10px;
    margin: 15px 0;
    transition: all 0.3s ease;
}

.charging-status.charging {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border: 1px solid #3b82f6;
}

.charging-status.unplugged {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.next-unit-time {
    font-size: 14px;
    color: #6b7280;
    margin-top: 5px;
}

.next-unit-time span {
    color: #3b82f6;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .resources-container {
        gap: 10px;
    }
    
    .resource-item {
        padding: 6px 10px;
        gap: 4px;
    }
    
    .charge-bars {
        gap: 5px;
    }
    
    .charge-bar {
        width: 30px;
        height: 45px;
    }
    
    .charge-icon {
        font-size: 16px;
    }
    
    .charging-station {
        font-size: 24px;
    }
    
    .charging-cable .plug {
        font-size: 20px;
    }
    
    .resource-icon {
        font-size: 16px;
    }
    
    .resource-value {
        font-size: 13px;
    }
    
    .resource-dropdown-content {
        padding: 20px 15px;
    }
    
    .resource-actions {
        flex-direction: column;
        gap: 10px;
    }
}

/* Mode sombre désactivé pour le dropdown - toujours fond blanc */
/* Les styles du dropdown restent les mêmes quel que soit le mode */

/* Modal de mise en charge */
.fuel-empty-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fuel-empty-modal.active {
    opacity: 1;
    pointer-events: all;
}

.fuel-empty-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.fuel-empty-modal.active .fuel-empty-content {
    transform: scale(1);
}

.fuel-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: carPlugging 2s ease-in-out infinite;
}

@keyframes carPlugging {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px) rotate(-5deg);
    }
    75% {
        transform: translateX(5px) rotate(5deg);
    }
}

.fuel-empty-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.fuel-empty-text {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

.fuel-empty-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fuel-action-btn {
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fuel-action-btn.buy {
    background: #667eea;
    color: white;
}

.fuel-action-btn.buy:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.fuel-action-btn.wait {
    background: #f0f0f0;
    color: #666;
}

.fuel-action-btn.wait:hover {
    background: #e0e0e0;
}

.fuel-action-btn.auto-recharge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    position: relative;
    overflow: hidden;
}

.fuel-action-btn.auto-recharge::before {
    content: '⚡';
    position: absolute;
    font-size: 80px;
    opacity: 0.1;
    right: -20px;
    top: -20px;
    transform: rotate(-15deg);
}

.fuel-action-btn.auto-recharge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
} 

/* Modal du garage */
.resource-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.resource-modal {
    background: white;
    border-radius: 20px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.garage-modal {
    padding: 40px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.garage-modal h2 {
    margin: 0 0 30px 0;
    font-size: 32px;
    font-weight: 700;
}

/* Grille de voitures */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.vehicle-card {
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.vehicle-card.owned {
    border-color: #10b981;
}

.vehicle-card.equipped {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.vehicle-header {
    padding: 20px;
    border-bottom: 2px solid;
    position: relative;
}

.vehicle-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.equipped-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.vehicle-description {
    padding: 15px 20px;
    color: #666;
    font-size: 14px;
}

.vehicle-features {
    padding: 0 20px 15px;
}

.feature {
    padding: 5px 0;
    color: #10b981;
    font-size: 13px;
    font-weight: 500;
}

.vehicle-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.vehicle-price {
    margin-bottom: 15px;
}

.price-amount {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.vehicle-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vehicle-btn.buy {
    background: #667eea;
    color: white;
}

.vehicle-btn.buy:hover:not(.disabled) {
    background: #5a67d8;
    transform: translateY(-2px);
}

.vehicle-btn.buy.disabled {
    background: #ccc;
    cursor: not-allowed;
}

.vehicle-btn.equip {
    background: #10b981;
    color: white;
}

.vehicle-btn.equip:hover {
    background: #059669;
    transform: translateY(-2px);
}

.equipped-status {
    text-align: center;
    color: #667eea;
    font-weight: 600;
    display: block;
}

/* Messages toast */
.resource-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    color: white;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.resource-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.resource-toast.success {
    background: #10b981;
}

.resource-toast.error {
    background: #ef4444;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-spinner::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-left: 10px;
    border: 3px solid #f0f0f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive garage */
@media (max-width: 768px) {
    .garage-modal {
        padding: 20px;
    }
    
    .garage-modal h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .vehicles-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
} 

/* Visualisation de batterie dans le modal (version compacte) */
.battery-visualization.compact {
    margin: 20px 0;
}

.battery-visualization.compact .charge-bars {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
}

.battery-visualization.compact .charge-bar {
    width: 25px;
    height: 25px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.battery-visualization.compact .charge-info {
    font-size: 12px;
    text-align: center;
    color: #666;
}

/* État de charge dans le modal */
.charging-status-modal {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(102, 126, 234, 0.1);
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
}

.charging-status-modal .charging-icon {
    font-size: 32px;
    animation: pulse 2s infinite;
}

.charging-status-modal .charging-info {
    flex: 1;
}

.charging-status-modal .charging-info strong {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.charging-status-modal .next-unit-time {
    font-size: 14px;
    color: #666;
}

.charging-status-modal .countdown {
    color: #667eea;
    font-weight: 600;
}

/* Bouton plug dans le modal */
.fuel-action-btn.plug {
    background: #48bb78;
    color: white;
}

.fuel-action-btn.plug:hover {
    background: #38a169;
    transform: translateY(-2px);
} 

/* ========== NOUVELLES FONCTIONNALITÉS ========== */

/* Styles simplifiés pour la batterie */
.resource-info .charge-bars {
    margin: 15px 0;
}

.charging-time {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    padding-left: 15px;
}

/* Info batteries de secours */
.spare-batteries-info {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
}

.spare-batteries-info p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.spare-batteries-info .resource-action-btn.small {
    padding: 6px 12px;
    font-size: 12px;
    margin-top: 8px;
}

/* Info système de recharge */
.recharge-system-info {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 10px;
    margin: 15px 0;
    text-align: center;
}

.recharge-system-info p {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #f57c00;
}

/* Modal des améliorations avec effet liquidglass */
.upgrades-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.upgrades-modal .modal-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 24px;
    max-width: 450px;
    width: 100%;
    max-height: 75vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
                inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease-out;
}

.upgrades-modal h3 {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: #1a1a1a;
}

.upgrades-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upgrade-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    background: rgba(248, 249, 250, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid rgba(209, 213, 219, 0.3);
    transition: all 0.3s ease;
}

.upgrade-item:hover {
    background: rgba(241, 245, 249, 0.9);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.upgrade-icon {
    font-size: 40px;
    width: 60px;
    text-align: center;
}

.upgrade-info {
    flex: 1;
}

.upgrade-info h4 {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 600;
}

.upgrade-info p {
    margin: 0 0 5px;
    font-size: 13px;
    color: #666;
}

.upgrade-benefits {
    color: #48bb78 !important;
    font-weight: 500;
}

.upgrade-btn {
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 10px 20px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.upgrade-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.upgrade-btn:hover {
    background: rgba(79, 70, 229, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.upgrade-btn:hover::before {
    width: 300px;
    height: 300px;
}

.no-upgrades {
    text-align: center;
    font-size: 16px;
    color: #666;
    padding: 40px 0;
}

/* Ajustements pour mobile */
@media (max-width: 768px) {
    .upgrade-item {
        flex-direction: column;
        text-align: center;
    }
    
    .upgrade-icon {
        width: auto;
    }
    
    .upgrade-info {
        text-align: center;
    }
    
    .upgrades-modal .modal-content {
        padding: 20px;
    }
}

/* Animation pour l'icône de batterie partielle */
.charge-bar.partial .charge-icon {
    animation: partialPulse 3s ease-in-out infinite;
}

@keyframes partialPulse {
    0%, 100% { 
        opacity: 0.8;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Ajustement du dropdown pour la nouvelle structure */
.resource-dropdown h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 18px;
}

.resource-dropdown .icon {
    font-size: 20px;
} 

/* Cadre de charge */
.charging-frame {
    background: #e6f4ff;
    border: 2px solid #0066cc;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    text-align: center;
}

.charging-frame p {
    margin: 0;
    color: #0052cc;
    font-weight: 600;
}

.charging-frame p:first-child {
    font-size: 16px;
}

/* Cadre de statut non branché */
.plug-status-frame {
    background: #f8f9fa;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    text-align: center;
}

.plug-status-frame p {
    margin: 0;
    color: #4b5563;
    font-weight: 600;
}

.plug-status-frame p:first-child {
    font-size: 16px;
}

/* Cadre batterie pleine */
.battery-full-frame {
    background: #e6ffed;
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    text-align: center;
}

.battery-full-frame p {
    margin: 0;
    color: #059669;
    font-weight: 600;
}

.battery-full-frame p:first-child {
    font-size: 16px;
}

/* Cadre station de recharge automatique - Design moderne */
.auto-recharge-frame {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
    position: relative;
    overflow: hidden;
}

.auto-recharge-frame::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: autoRechargeShimmer 3s ease-in-out infinite;
}

@keyframes autoRechargeShimmer {
    0%, 100% { transform: translateX(-50%) translateY(-50%) rotate(0deg); }
    50% { transform: translateX(-30%) translateY(-30%) rotate(180deg); }
}

.auto-recharge-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.auto-recharge-icon {
    font-size: 28px;
    animation: float 3s ease-in-out infinite;
}

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

.auto-recharge-header h4 {
    margin: 0;
    color: #92400e;
    font-size: 18px;
    font-weight: 700;
}

.auto-recharge-description {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    padding: 0 10px;
    color: #78350f;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.feature-icon {
    font-size: 16px;
    display: inline-flex;
}

.auto-recharge-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    color: #92400e;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

.status-indicator.ready {
    background: #10b981;
}

.status-indicator.full {
    background: #3b82f6;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* État de charge avec station automatique */
.auto-recharge-charging {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-top: 15px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
    position: relative;
    overflow: hidden;
}

.auto-recharge-charging .charging-animation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
}

.charging-bolt {
    font-size: 32px;
    color: #3b82f6;
    animation: zap 1.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
}

@keyframes zap {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.9;
    }
    50% { 
        transform: scale(1.1);
        opacity: 1;
    }
}

.charging-text {
    margin: 0 0 5px 0;
    color: #0c4a6e;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.charging-time {
    margin: 0;
    color: #0369a1;
    font-size: 18px;
    font-weight: 600;
}

.full-charge-time {
    margin: 8px 0 0 0;
    color: #0c4a6e;
    font-size: 14px;
    opacity: 0.8;
}

/* Message d'attente pour station automatique */
.auto-recharge-charging .charging-text[style*="color: #4a90e2"] {
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 12px;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #4a90e2 !important;
}

.auto-recharge-charging .charging-text[style*="color: #4a90e2"] .auto-icon {
    font-size: 1.2rem;
    margin-right: 8px;
    vertical-align: middle;
}

/* Cadre de charge solaire */
.solar-charging-frame {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-top: 15px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.15);
    position: relative;
    overflow: hidden;
}

.solar-charging-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 50%);
    animation: sunRotate 20s linear infinite;
}

@keyframes sunRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.solar-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.solar-icon {
    font-size: 32px;
    animation: sunPulse 3s ease-in-out infinite;
}

@keyframes sunPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

.solar-text {
    margin: 0 0 5px 0;
    color: #78350f;
    font-size: 16px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.solar-charging-frame .charging-time {
    margin: 0;
    color: #92400e;
    font-size: 18px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.solar-charging-frame .full-charge-time {
    margin: 8px 0 0 0;
    color: #78350f;
    font-size: 14px;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

/* Cadre de charge ultime 24/7 */
.ultimate-charging-frame {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 25%, #6bcf7f 50%, #4ecdc4 75%, #667eea 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-top: 15px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.ultimate-charging-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    animation: ultimateShine 3s ease-in-out infinite;
}

@keyframes ultimateShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ultimate-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.ultimate-icon {
    font-size: 32px;
    animation: ultimatePulse 2s ease-in-out infinite;
}

@keyframes ultimatePulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(5deg); }
    50% { transform: scale(1.2) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.ultimate-header h4 {
    margin: 0;
    color: white;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.ultimate-features {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.ultimate-charging-frame .charging-time {
    margin: 0;
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.ultimate-charging-frame .full-charge-time {
    margin: 8px 0 0 0;
    color: white;
    font-size: 14px;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.solar-description, .solar-notice {
    margin: 8px 0;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.solar-description {
    color: #92400e;
    opacity: 0.9;
}

.solar-notice {
    color: #d97706;
    font-weight: 600;
}

.auto-description {
    margin: 8px 0;
    color: #0c4a6e;
    font-size: 13px;
    opacity: 0.9;
}

/* Section de branchement */
.plug-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
}

.plug-section p {
    text-align: center;
    color: #666;
}

/* Gros boutons d'action */
.resource-action-btn.big-action {
    width: 100%;
    padding: 16px 24px;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.resource-action-btn.big-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.resource-action-btn.danger.big-action:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* Centrage des actions */
.resource-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.resource-actions .resource-action-btn {
    width: 100%;
}

/* Croix de fermeture pour les modals */
.modal-close-x {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close-x:hover {
    color: #000;
}

/* Ajustement du modal content pour la croix */
.upgrades-modal .modal-content {
    position: relative;
    padding-top: 40px;
}

/* Temps de charge dans le dropdown */
.charging-time {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    padding-left: 20px;
}

/* Info batteries de secours */
.spare-batteries-info {
    background: #f0f8ff;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

.spare-batteries-info p {
    margin: 0 0 10px 0;
    color: #0066cc;
}

.spare-batteries-info .resource-action-btn {
    margin-top: 10px;
}

/* Bouton petit */
.resource-action-btn.small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Info système de recharge */
.recharge-system-info {
    background: #e6f4ff;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
    text-align: center;
}

.recharge-system-info p {
    margin: 0;
    color: #0052cc;
    font-weight: 500;
    font-size: 14px;
}

/* Améliorations modal */
.upgrades-modal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.upgrades-modal h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
}

.upgrades-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upgrade-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.upgrade-item:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upgrade-icon {
    font-size: 48px;
    width: 60px;
    text-align: center;
}

.upgrade-info {
    flex: 1;
}

.upgrade-info h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
}

.upgrade-info p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.upgrade-benefits {
    color: #22c55e !important;
    font-weight: 500;
}

.upgrade-price {
    display: flex;
    align-items: center;
}

.upgrade-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upgrade-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.no-upgrades {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
}

/* Responsive */
@media (max-width: 480px) {
    .upgrade-item {
        flex-direction: column;
        text-align: center;
    }
    
    .upgrade-icon {
        width: 100%;
    }
    
    .upgrade-price {
        justify-content: center;
        margin-top: 15px;
    }
} 

/* ==========================
   Animations
   ========================== */

/* Animation de consommation */
@keyframes consume-fuel {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.resource-fuel.consuming {
    animation: consume-fuel 0.5s ease-in-out;
}

/* Spinner pour les boutons */
.spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Espace de scroll pour le garage modal sur mobile */
@media (max-width: 600px) {
    .garage-content {
        overflow-y: auto;
        max-height: calc(85vh - 120px); /* Hauteur max moins header et padding */
        position: relative;
    }
    
    .garage-content::after {
        content: '';
        display: block;
        height: 65px;
        width: 100%;
    }
    
    /* S'assurer que le garage modal scroll correctement */
    .garage-modal {
        overflow: visible;
    }
}

/* Modal d'achat de carburant */
.fuel-purchase-modal .modal-content {
    max-width: 500px;
}

.fuel-options {
    margin: 20px 0;
}

.fuel-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 15px;
}

.fuel-option .fuel-icon img {
    width: 48px;
    height: 48px;
}

.fuel-option .fuel-info {
    flex: 1;
    margin: 0 20px;
}

.fuel-option .fuel-info h4 {
    margin: 0 0 5px;
    font-size: 18px;
    font-weight: 600;
}

.fuel-option .fuel-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.fuel-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

.purchase-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.purchase-btn.coins {
    background: #ffd700;
    color: #333;
}

.purchase-btn.coins:hover {
    background: #ffcc00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.purchase-btn img {
    width: 20px;
    height: 20px;
}

/* Modal d'achat de pièces */
.coins-purchase-modal .modal-content {
    max-width: 600px;
}

.coins-packs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.coin-pack {
    position: relative;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.coin-pack:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.coin-pack.popular {
    border: 2px solid #4CAF50;
}

.popular-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.coin-pack .pack-icon img {
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
}

.coin-pack .pack-info h4 {
    margin: 10px 0 5px;
    font-size: 18px;
    font-weight: 600;
}

.coin-pack .pack-amount {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.pack-price-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: #4CAF50;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.pack-price-btn:hover {
    background: #45a049;
}

/* ========== STRIPE FULLPAGE PAYMENT (DUOLINGO STYLE) ========== */
.stripe-payment-fullpage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 100000;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stripe-payment-fullpage.visible {
    opacity: 1;
    transform: translateY(0);
}

.payment-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 100001;
}

.payment-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #6b7280;
}

.payment-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.payment-content {
    width: 100%;
    max-width: 480px;
    padding: 48px;
    text-align: center;
}

.payment-header {
    margin-bottom: 48px;
}

.payment-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.payment-title {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.payment-price {
    font-size: 24px;
    color: #6b7280;
    margin: 0;
}

.stripe-card-container {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s;
    position: relative;
    min-height: 50px;
}

.stripe-card-container:focus-within {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

#stripe-card,
.stripe-card-element {
    width: 100%;
    min-height: 40px;
    position: relative;
    z-index: 1;
}

/* Force Stripe iframe to be interactive */
#stripe-card iframe,
.stripe-card-element iframe {
    position: relative !important;
    z-index: 1 !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Ensure the Stripe element is clickable */
.stripe-card-input {
    cursor: text !important;
}

/* Loading placeholder */
.card-loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    color: #94a3b8;
}

.payment-errors {
    color: #ef4444;
    font-size: 14px;
    margin-bottom: 24px;
    display: none;
    text-align: left;
}

.payment-submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: #1e293b;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.payment-submit-btn:hover:not(:disabled) {
    background: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

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

.payment-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-text {
    display: inline-block;
}

.btn-spinner {
    display: inline-flex;
}

.spinner {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.payment-secure {
    margin-top: 32px;
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.payment-secure svg {
    flex-shrink: 0;
}

/* Animation de succès */
.payment-success {
    animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.payment-success svg {
    margin: 0 auto 24px;
}

.payment-success h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.payment-success p {
    font-size: 18px;
    color: #6b7280;
    margin: 0;
}

/* Mobile */
@media (max-width: 640px) {
    .payment-close {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
    
    .payment-content {
        padding: 32px 24px;
    }
    
    .payment-title {
        font-size: 28px;
    }
    
    .payment-price {
        font-size: 20px;
    }
    
    .payment-submit-btn {
        font-size: 16px;
    }
}

/* Styles spécifiques pour l'abonnement */
.subscription-container {
    max-width: 450px;
}

.subscription-header {
    text-align: center;
    margin-bottom: 30px;
}

.premium-badge {
    font-size: 60px;
    display: block;
    margin-bottom: 15px;
}

.subscription-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
}

.subscription-price {
    font-size: 24px;
    color: #4b5563;
    margin: 0;
}

.subscription-benefits {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.subscription-benefits h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #1a1a1a;
}

.benefits-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 16px;
    color: #4b5563;
    border-bottom: 1px solid #e5e7eb;
}

.benefits-list li:last-child {
    border-bottom: none;
}

.benefit-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.trial-notice {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #92400e;
}

.trial-icon {
    font-size: 20px;
}

.subscription-btn {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #fff;
}

.subscription-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.subscription-terms {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    margin: 15px 0 0 0;
}

/* Styles pour la section Premium dans Mon compte */
.account-premium-section {
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
}

.account-premium-section .section-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#premiumStatusContainer {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.premium-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.premium-status-info {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 15px;
}

.premium-manage-btn {
    background: #fff;
    border: 2px solid #e5e7eb;
    color: #374151;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.premium-manage-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.premium-subscribe-btn {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.premium-subscribe-btn:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Styles pour la liste des bénéfices dans Mon compte */
.premium-benefits-list {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
}

.premium-benefits-list li {
    padding: 8px 0;
    font-size: 14px;
    color: #4b5563;
}

.trial-info {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    margin: 10px 0 0 0;
}

.premium-active .expiration-date {
    font-size: 13px;
    color: #6b7280;
    margin: 5px 0 0 0;
} 