/* Supa Send Mobile Money - CSS Complet Corrigé */

:root {
    --primary-blue: #3770b3;           /* Bleu principal du logo */
    --primary-blue-dark: #64718c;      /* Bleu foncé */
    --primary-blue-light: #42A5F5;     /* Bleu clair */
    --secondary-green: #9aa9d4;         /* Vert du logo */
    --secondary-green-dark: #8593b8;    /* Vert foncé */
    --secondary-green-light: #8794bb;   /* Vert clair */
    --text-primary: #FFFFFF;
    --text-secondary: #90A4AE;
    --background: #F8FAFE;
    --card-background: #FFFFFF;
    --success-color: #00C853;
    --error-color: #F44336;
    --warning-color: #FF9800;
    --info-color: #2196F3;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background);
    color: #37474F;
    line-height: 1.6;
    overflow-x: hidden;
}
/* Styles pour les cartes de services mobile money */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

/*.service-card {
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 120px;
}*/

.service-card:hover {
    border-color: var(--primary-color, #3B82F6);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.service-card.selected {
    border-color: var(--primary-color, #3B82F6);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.service-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
}

.service-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.service-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #1F2937;
    line-height: 1.2;
}

.service-info p {
    font-size: 12px;
    color: #6B7280;
    margin: 0;
    line-height: 1.2;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .service-card {
        padding: 12px;
        min-height: 100px;
    }
    
    .service-logo {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }
    
    .service-info h4 {
        font-size: 13px;
    }
    
    .service-info p {
        font-size: 11px;
    }
}

/* Style pour la section de sélection des services */
.service-selection {
    margin: 20px 0;
    padding: 20px;
    background: #F9FAFB;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
}

.service-selection h4 {
    color: #374151;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.service-selection h4 i {
    margin-right: 8px;
    color: var(--primary-color, #3B82F6);
}

/* Animation de chargement pour les services */
.services-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.services-loading .loading {
    width: 32px;
    height: 32px;
    border: 3px solid #E5E7EB;
    border-top: 3px solid var(--primary-color, #3B82F6);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Message d'erreur ou d'information pour les services */
.service-message {
    text-align: center;
    padding: 30px 20px;
    color: #6B7280;
    background: white;
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
    margin: 15px 0;
}

.service-message i {
    font-size: 32px;
    margin-bottom: 15px;
    display: block;
    color: #9CA3AF;
}

.service-message h4 {
    color: #374151;
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.service-message p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Style pour les drapeaux */
.flag-icon {
    width: 24px;
    height: 18px;
    border-radius: 3px;
    object-fit: cover;
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
/* Container principal - BLEU */
.app-container {
    max-width: 420px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--primary-blue);
    position: relative;
    box-shadow: 0 0 30px rgba(30, 136, 229, 0.3);
}

/* Header - BLEU */
.app-header {
    padding: 60px 20px 20px;
    text-align: center;
    position: relative;
    background: var(--primary-blue);
}

.menu-btn {
    position: absolute;
    top: 50px;
    left: 20px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

/* Logo - VERT */
.logo {
    width: 100%;
    height: 3120px;
    /* background: var(--secondary-green); */
    border-radius: 20px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* box-shadow: 0 10px 30px rgba(65, 72, 91, 0.3);*/
}
.logo_s {
    width: 100%;
    /* height: 3120px;
    background: var(--secondary-green); */
    border-radius: 20px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* box-shadow: 0 10px 30px rgba(65, 72, 91, 0.3);*/
}

.logo-text {
    font-size: 32px;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-text {
    color: white;
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.4;
}

/* Content area */
.content {
    background: white;
    border-radius: 25px;
    min-height: calc(100vh - 400px);
    padding: 40px 20px 20px;
    position: relative;
    margin-top: 20px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
}

/* Forms */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #37474F;
    font-size: 14px;
}

.form-input, .form-select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #E1F5FE;
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #F8FFFE;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.1);
}

.form-input::placeholder {
    color: #90A4AE;
}

.form-help {
    font-size: 12px;
    color: #607D8B;
    margin-top: 5px;
    display: block;
}

/* Buttons - Actions principales BLEU, secondaires VERT */
.btn {
    display: inline-block;
    padding: 16px 32px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(30, 136, 229, 0.5);
}

.btn-secondary {
    background: var(--secondary-green);
    color: white;
    box-shadow: 0 4px 15px rgba(65, 72, 91, 0.3);
}

.btn-secondary:hover {
    background: var(--secondary-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(65, 72, 91, 0.4);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

/* Version outline pour fond blanc */
.btn-outline-light {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-outline-light:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* PIN Input - BLEU */
.pin-container {
    text-align: center;
    padding: 25px 0;
}

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #E1F5FE;
    transition: all 0.3s ease;
}

.pin-dot.filled {
    background: var(--primary-blue);
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.4);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 70px); /* Largeur fixe pour chaque colonne */
    gap: 20px;
    justify-content: center; /* Centre la grille elle-même */
    margin: 0 auto;
}

@media (max-width: 480px) {
    .pin-keypad {
        grid-template-columns: repeat(3, 60px);
        gap: 15px;
    }
}

@media (max-width: 320px) {
    .pin-keypad {
        grid-template-columns: repeat(3, 50px);
        gap: 12px;
    }
}

.pin-key {
    width: 70px;
    height: 70px;
    border: none;
    border-radius: 20px;
    background: var(--primary-blue);
    color: white;
    font-size: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.3);
}

.pin-key:hover {
    background: var(--primary-blue-dark);
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 10px 30px rgba(30, 136, 229, 0.4);
}

.pin-key.zero {
    grid-column: 2;
}

.pin-key.backspace {
    grid-column: 3;
    font-size: 18px;
    background: #546E7A;
}

.pin-key.backspace:hover {
    background: #455A64;
}

/* Dashboard - Balance card VERT     background: var(--secondary-green);
*/
.balance-card {
    background: #07a772;
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    color: white;
    text-align: center;
    box-shadow: 0 10px 30px rgba(70, 94, 86, 0.3);
}

.balance-amount {
    font-size: 36px;
    font-weight: bold;
    margin: 15px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.balance-label {
    opacity: 0.95;
    font-size: 14px;
}

/* Quick actions - Alternance bleu/vert */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.action-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.action-card:first-child:hover {
    border-color: var(--primary-blue);
}

.action-card:last-child:hover {
    border-color: var(--secondary-green);
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
}

/* Première action card - BLEU */
.action-card:first-child .action-icon {
    background: var(--primary-blue);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.3);
}

.action-card:first-child:hover .action-icon {
    background: var(--primary-blue-dark);
}

/* Deuxième action card - VERT */
.action-card:last-child .action-icon {
    background: var(--secondary-green);
    box-shadow: 0 6px 20px rgba(65, 72, 91, 0.3);
}

.action-card:last-child:hover .action-icon {
    background: var(--secondary-green-dark);
}

/* Transactions avec bordures BLEUES */
.transactions-section {
    margin-top: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #263238;
}

.transaction-item {
    background: #d7e3ed;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    border-left: 5px solid var(--primary-blue);
    transition: all 0.3s ease;
}

.transaction-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-left-color: var(--secondary-green);
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.transaction-amount {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-blue);
}

.transaction-status {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-completed { 
    background: var(--secondary-green);
    color: white;
}

.status-pending { 
    background: var(--warning-color);
    color: white;
}

.status-processing {
    background: #1184dd;
    color: white;
}

.status-failed { 
    background: var(--error-color);
    color: white;
}

.transaction-details {
    font-size: 14px;
    color: #607D8B;
    line-height: 1.4;
}

/* Contact selection */
.contact-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 20px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #E8F4FD;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    margin-bottom: 8px;
}

.contact-item:hover {
    background: #F1F8E9;
    transform: translateX(5px);
}

.contact-avatar {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background: var(--secondary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 15px;
    box-shadow: 0 4px 12px rgba(71, 75, 73, 0.3);
}

.contact-info h4 {
    margin: 0;
    font-size: 16px;
    color: #263238;
}

.contact-info p {
    margin: 0;
    font-size: 14px;
    color: #607D8B;
}

/* Service selection */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.service-card {
    background: white;
    border: 2px solid #E1F5FE;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-card:hover,
.service-card.selected {
    border-color: var(--primary-blue);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(30, 136, 229, 0.2);
}

.service-logo {
    width: 60px;
    height: 60px;
    background: #E8F5E8;
    border-radius: 15px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--secondary-green);
}

/* Menu latéral - Structure avec scroll */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh; /* Hauteur totale écran */
    background: #37474F;
    z-index: 1000;
    transition: all 0.4s ease;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
    
    /* ✅ Flexbox pour gérer header + menu */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Empêche scroll sur le conteneur */
}

.sidebar.open {
    left: 0;
}

/* Header de la sidebar - FIXE */
.sidebar-header {
    flex-shrink: 0; /* Ne se compresse pas */
    background: var(--primary-blue);
    padding: 40px 20px 20px;
    color: white;
    text-align: center;
}

/* Menu scrollable - ZONE QUI SCROLLE */
.sidebar-menu {
    flex: 1; /* Prend tout l'espace restant */
    overflow-y: auto; /* Scroll vertical */
    overflow-x: hidden; /* Pas de scroll horizontal */
    padding: 20px 0;
    
    /* Scrollbar personnalisée */
    scrollbar-width: thin;
    scrollbar-color: rgba(7, 130, 113, 0.3) transparent;
}

/* Scrollbar pour Chrome/Safari/Edge */
.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(7, 81, 139, 0.3);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(7, 81, 139, 0.5);
}

/* Items du menu - INCHANGÉS */
.sidebar-item {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    color: #CFD8DC;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 16px;
    cursor: pointer;
    background: none;
    border-left: 4px solid transparent;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--secondary-green);
}

.sidebar-icon {
    margin-right: 15px;
    font-size: 20px;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        left: -280px;
    }
    
    .sidebar-item {
        padding: 15px 20px;
        font-size: 14px;
    }
}


.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Transfer steps */
.transfer-step {
    animation: fadeInUp 0.6s ease-out;
}

.transfer-step h3 {
    color: #263238;
    margin-bottom: 20px;
    font-size: 20px;
}

/* Alert messages */
.alert {
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.alert-success {
    background: var(--secondary-green);
    color: white;
}

.alert-error {
    background: var(--error-color);
    color: white;
}

.alert-warning {
    background: var(--warning-color);
    color: white;
}

.alert-info {
    background: var(--primary-blue);
    color: white;
}

/* Loading states */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

.loading-spinner {
    text-align: center;
    padding: 40px 20px;
    color: #607D8B;
}

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

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

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-12px); }
    75% { transform: translateX(12px); }
}

.content {
    animation: slideUp 0.6s ease-out;
}

.transaction-item,
.action-card,
.service-card {
    animation: fadeIn 0.5s ease-out;
}

/* Contact Picker - Header VERT */
.contact-picker {
    background: white;
    border-radius: 20px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.contact-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--secondary-green);
    color: white;
    border-radius: 20px 20px 0 0;
}

.contact-picker-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-picker-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.contact-picker-search {
    padding: 15px 20px 0;
}

.contact-picker-tabs {
    display: flex;
    padding: 15px 20px 0;
    border-bottom: 1px solid #E1F5FE;
}

.contact-tab {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    color: #607D8B;
    transition: all 0.3s ease;
}

.contact-tab.active {
    color: var(--secondary-green);
    border-bottom-color: var(--secondary-green);
}

.contact-picker-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
}

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

.contact-group-header {
    font-weight: bold;
    color: var(--secondary-green);
    padding: 15px 0 10px;
    font-size: 14px;
    border-bottom: 2px solid #E8F5E8;
    margin-bottom: 10px;
}

.contact-picker-footer {
    padding: 20px;
    border-top: 1px solid #E1F5FE;
}

.no-contacts,
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #607D8B;
}

.no-contacts-icon,
.error-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--primary-blue);
}

/* Step indicators */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #CFD8DC;
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--primary-blue);
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.4);
}

.step-dot.completed {
    background: var(--secondary-green);
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(65, 72, 91, 0.4);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 20px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Styles pour les drapeaux */
.flag-icon {
    width: 24px;
    height: 18px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Contact manual entry */
.manual-contact-entry {
    background: #E8F5E8;
    border-radius: 16px;
    padding: 20px;
    margin: 15px 0;
    border: 2px solid var(--secondary-green);
}

.manual-contact-entry h4 {
    color: var(--secondary-green);
    margin-bottom: 15px;
    font-size: 16px;
}

/* Utility classes */
.highlight {
    background: #E3F2FD;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--primary-blue);
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: var(--primary-blue);
    color: white;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
    margin: 20px 0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #E3F2FD;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 3px;
}

.scrollbar-thumb:hover {
    background: var(--primary-blue-dark);
}

/* Responsive Design */
@media (max-width: 480px) {
    .app-container {
        max-width: 100%;
    }
    
    .content {
        padding: 25px 15px 15px;
        /*border-radius: 25px 25px 0 0;*/
    }
    
    .logo {
        width: 100%;
        height: 100%;
        border-radius: 18px;
    }
   .logos {
        width: 40%;
        height: 40%;
        border-radius: 18px;
    }
    
    .logo-text {
        font-size: 28px;
    }
    
    .welcome-text {
        font-size: 20px;
    }
    
    .pin-keypad {
        gap: 15px;
    }
    
    .pin-key {
        width: 60px;
        height: 60px;
        font-size: 20px;
        border-radius: 16px;
    }
    
    .balance-amount {
        font-size: 24px;
    }
    
    .pin-key {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #1A1A1A;
        --card-background: #2D2D2D;
        --text-secondary: #B0BEC5;
    }
    
    body {
        background-color: var(--background);
        color: #ECEFF1;
    }
    
    .content {
        background: var(--card-background);
        color: #ECEFF1;
    }
    
    .form-input {
        background: #37474F;
        border-color: #455A64;
        color: #ECEFF1;
    }
    
    .transaction-item,
    .action-card,
    .service-card {
        background: #37474F;
        color: #ECEFF1;
        border-color: #455A64;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #000;
    }
    
    .btn-secondary {
        border: 2px solid #000;
    }
    
    .alert {
        border: 2px solid #000;
    }
}
        font-size: 28px;
    }
    
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .quick-actions {
        gap: 12px;
    }
    
    .action-card {
        padding: 20px 15px;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .form-input {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .alert {
        min-width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
        transform: none;
    }
}

@media (max-width: 320px) {
    .app-header {
        padding: 25px 10px 10px;
    }
    
    .content {
        padding: 15px 10px;
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
   .sidebar-item {
    width: 100%;
    padding: 15px 20px;
    background: none;
    border: none;
    color: white;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.sidebar-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.live-notification {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.3s ease-out;
    cursor: pointer;
}

.live-notification.success {
    border-left-color: #10B981;
}

.live-notification.warning {
    border-left-color: #F59E0B;
}

.live-notification.error {
    border-left-color: #EF4444;
}

.live-notification.info {
    border-left-color: #3B82F6;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}


/* Styles améliorés pour les champs de téléphone */
.phone-input-container {
    position: relative;
    width: 100%;
}

.phone-input-container input {
    padding-left: 60px !important;
}

.country-indicator {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.05);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.country-indicator .flag {
    width: 16px;
    height: 12px;
    border-radius: 2px;
}

/* Amélioration de l'affichage des contacts */
.contact-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
}

.contact-info p {
    margin: 0 0 2px 0;
    font-size: 14px;
    color: #374151;
}

.contact-info small {
    display: block;
    margin-top: 2px;
}


/* Styles pour les notifications live */
.live-notification {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.3s ease-out;
    max-width: 100%;
    word-wrap: break-word;
}

.live-notification.success {
    border-left-color: #10B981;
}

.live-notification.error {
    border-left-color: #EF4444;
}

.live-notification.warning {
    border-left-color: #F59E0B;
}

.live-notification.info {
    border-left-color: #3B82F6;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Styles pour le modal de notifications */
#notificationSettingsModal {
    display: none;
}

#notificationSettingsModal.show {
    display: flex;
}

/* Indicateur de statut PWA */
.pwa-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.pwa-indicator.active {
    background-color: #10B981;
}

.pwa-indicator.inactive {
    background-color: #EF4444;
}

.pwa-indicator.pending {
    background-color: #F59E0B;
}

/* Amélioration du bouton de notifications dans la sidebar */
#notificationToggle {
    position: relative;
}

#notificationToggle::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

#notificationToggle.active::after {
    background-color: #10B981;
}

#notificationToggle.inactive::after {
    background-color: #EF4444;
}


.live-notification {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #10B981;
    animation: slideInRight 0.3s ease-out;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.live-notification.show {
    transform: translateX(0);
}

.live-notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

.live-notification.success {
    border-left-color: #10B981;
}

.live-notification.warning {
    border-left-color: #F59E0B;
}

.live-notification.error {
    border-left-color: #EF4444;
}

.live-notification.info {
    border-left-color: #3B82F6;
}

.notification-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.notification-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
}

.notification-icon.success {
    background-color: #10B981;
}

.notification-icon.warning {
    background-color: #F59E0B;
}

.notification-icon.error {
    background-color: #EF4444;
}

.notification-icon.info {
    background-color: #3B82F6;
}

.notification-title {
    font-weight: bold;
    color: #1F2937;
    font-size: 14px;
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: #6B7280;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: #374151;
}

.notification-body {
    color: #4B5563;
    font-size: 13px;
    line-height: 1.4;
}

.notification-time {
    color: #9CA3AF;
    font-size: 11px;
    margin-top: 5px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    #liveNotificationContainer {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .live-notification {
        margin-bottom: 8px;
    }
}

/* Styles pour le dashboard */
.balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.balance-amount {
    font-size: 32px;
    font-weight: bold;
    margin: 0;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.action-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.action-icon {
    font-size: 24px;
    color: #007bff;
    margin-bottom: 10px;
}

.action-card h3 {
    margin: 10px 0 5px;
    font-size: 16px;
    color: #333;
}

.action-card p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.transactions-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    color: #333;
    margin: 0;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid #007bff;
    color: #007bff;
}


/* Styles pour le modal des détails transaction */
.transaction-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-completed { background: #D1FAE5; color: #065F46; }
.status-pending { background: #FEF3C7; color: #92400E; }
.status-processing { background: #DBEAFE; color: #1E40AF; }
.status-failed { background: #FEE2E2; color: #991B1B; }


/* ////////////////////////////////////////////*/




/* ==========================================
   RESPONSIVE POUR LA GESTION DES THÈMES
   ========================================== */

@media (max-width: 768px) {
  /* Ajustements pour le thème sur mobile */
  .content {
    background: var(--theme-bg-card);
  }
  
  .action-card,
  .transaction-item {
    background: var(--theme-bg-card);
  }
  
  /* Bouton theme en position safe sur mobile */
  .theme-toggle-btn {
    bottom: 80px; /* Au-dessus de la barre de navigation si existante */
    right: 20px;
  }
}

@media (max-width: 480px) {
  .theme-toggle-btn {
    bottom: 70px;
    right: 15px;
    width: 45px;
    height: 45px;
  }
  
  /* Ajustements texte pour petit écran */
  .transaction-details {
    font-size: 13px;
    color: var(--theme-text-secondary);
  }
}

@media (max-width: 320px) {
  .theme-toggle-btn {
    bottom: 60px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* Styles pour la gestion des thèmes */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #6c757d;
  --border-color: #dee2e6;
  --primary-color: #07518b;
  --primary-hover: #05477b;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --input-bg: #ffffff;
  --input-border: #ced4da;
}

[data-theme="dark"] {
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --bg-card: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --border-color: #404040;
  --primary-color: #1e88e5;
  --primary-hover: #1565c0;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  --input-bg: #2d2d2d;
  --input-border: #404040;
}

/* Application des variables CSS */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.app-container {
  background-color: var(--bg-primary);
}

.balance-card, .action-card, .transaction-item, .form-input, .sidebar, .modal > div {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.form-input {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text-primary);
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Bouton de bascule du thème */
.theme-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
  background: var(--primary-hover);
}

/* Protection contre le mode nuit automatique */
@media (prefers-color-scheme: dark) {
  /* Cette règle sera ignorée grâce à notre système manuel */
}

/* Assurer la lisibilité dans tous les modes */
.alert, .system-fees-widget, .user-info-display {
  color: inherit !important;
}

/* Correction pour les cartes de transactions */
.transaction-header, .transaction-info, .transaction-details {
  background-color: transparent !important;
  color: inherit !important;
}

/* Correction pour les modals */
.modal > div {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

.modal h3, .modal h4 {
  color: var(--text-primary) !important;
}

.modal small {
  color: var(--text-secondary) !important;
}



/* ==========================================
   BOUTONS THEME - MULTIPLES EMPLACEMENTS
   ========================================== */

/* Bouton dans le header 

	
	.theme-toggle-btn-header {
    position: absolute;
    top: 50px;
    right: 20px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}


.theme-toggle-btn-header:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px) scale(1.1);
}

.theme-sidebar-btn {
    border-left: 4px solid transparent !important;
    transition: all 0.3s ease;
}

.theme-sidebar-btn:hover {
    border-left-color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.1) !important;
}

[data-theme="dark"] .theme-toggle-btn-header,
[data-theme="dark"] .theme-sidebar-btn .sidebar-icon {
    color: #f59e0b !important;
}

.theme-toggle-btn-header i,
.theme-sidebar-btn .sidebar-icon i {
    transition: transform 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .theme-toggle-btn-header i,
[data-theme="dark"] .theme-sidebar-btn .sidebar-icon i {
    transform: rotate(180deg);
    color: #f59e0b;
}

.theme-toggle-btn-floating {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.theme-toggle-btn-floating:hover {
    transform: scale(1.1);
    background: var(--primary-blue-dark);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

@media (max-width: 480px) {
    .theme-toggle-btn-header {
        top: 45px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .theme-toggle-btn-floating {
        bottom: 70px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 320px) {
    .theme-toggle-btn-header {
        top: 40px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .theme-toggle-btn-floating {
        bottom: 60px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
	*/