/* style.css - Styles élégants pour Azzertel */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
}

.portal-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.portal-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
    max-width: 500px;
    margin: 0 auto 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.app-title {
    font-size: 2.5em;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 10px;
}

.welcome-text {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: #f5f5f5;
    padding: 5px;
    border-radius: 10px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102,126,234,0.3);
}

.message-container {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    display: none;
}

.message-container.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-container.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-container.info {
    display: block;
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Section des forfaits */
.plans-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.plans-section h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.currency-selector {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.currency-btn {
    padding: 10px 30px;
    border: 2px solid #e0e0e0;
    background: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.currency-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.plans-horizontal {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.plan-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 25px;
    border-radius: 15px;
    min-width: 150px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.plan-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.plan-item h3 {
    color: #333;
    margin-bottom: 10px;
}

.plan-price {
    font-size: 1.5em;
    font-weight: 700;
    color: #667eea;
    margin: 15px 0;
}

.btn-select {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-select:hover {
    transform: scale(1.05);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s ease;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

.payment-info {
    text-align: center;
    color: #666;
    margin: 20px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
}

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

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

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Style Admin */
.admin-body {
    background: #f5f7fa;
    display: block;
    padding: 0;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
}

.admin-logo {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.admin-nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-main {
    flex: 1;
    padding: 30px;
    background: #f5f7fa;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.stat-card h3 {
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #333;
}

.stat-detail {
    color: #667eea;
    font-size: 1.2em;
    margin-top: 5px;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-top: 30px;
    height: 400px;
}

.admin-table {
    width: 100%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.admin-table tr:hover {
    background: #f5f5f5;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.badge.active,
.badge.success {
    background: #d4edda;
    color: #155724;
}

.badge.inactive,
.badge.pending {
    background: #fff3cd;
    color: #856404;
}

.badge.failed {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive */
@media (max-width: 768px) {
    .plans-horizontal {
        flex-direction: column;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
    }
}

/* Styles pour le tableau de bord utilisateur */
.dashboard-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 800px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.dashboard-header h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8em;
}

.btn-logout {
    padding: 10px 25px;
    background: #f5f5f5;
    border: none;
    border-radius: 25px;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #fee;
    color: #f66;
}

.subscription-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102,126,234,0.3);
}

.subscription-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.info-item {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.info-label {
    display: block;
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.info-value {
    display: block;
    font-size: 1.3em;
    font-weight: 600;
}

.countdown-container {
    text-align: center;
    background: rgba(255,255,255,0.15);
    border-radius: 15px;
    padding: 20px;
}

.countdown-container h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
    opacity: 0.9;
}

.countdown-timer {
    font-size: 2.5em;
    font-weight: 700;
}

.countdown-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.countdown-value {
    background: rgba(255,255,255,0.2);
    padding: 10px 15px;
    border-radius: 10px;
    min-width: 60px;
    text-align: center;
}

.countdown-label {
    font-size: 0.5em;
    opacity: 0.8;
    margin: 0 5px;
}

.expired-message {
    color: #ff6b6b;
    font-size: 1.5em;
    font-weight: 600;
}

.quick-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.btn-action {
    flex: 1;
    padding: 15px;
    background: #f5f5f5;
    border: none;
    border-radius: 15px;
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-action:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102,126,234,0.3);
}

.btn-action svg {
    width: 20px;
    height: 20px;
}

.history-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
}

.history-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.transaction-history {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 15px;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.history-date {
    color: #666;
    font-size: 0.9em;
}

.history-plan {
    font-weight: 500;
    color: #333;
}

.history-amount {
    font-weight: 600;
    color: #667eea;
}

.history-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.history-status.success {
    background: #d4edda;
    color: #155724;
}

.history-status.pending {
    background: #fff3cd;
    color: #856404;
}

.history-status.failed {
    background: #f8d7da;
    color: #721c24;
}

/* Animation de pulsation pour le compte à rebours */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.countdown-timer {
    animation: pulse 1s ease-in-out;
}

/* Responsive */
@media (max-width: 768px) {
    .subscription-info {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .history-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 8px;
    }
    
    .countdown-value {
        min-width: 40px;
        padding: 8px;
        font-size: 0.8em;
    }
}