/* RESET & BASE */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #000000;
    min-height: 100vh;
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
}

/* Fond animé global */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(0, 255, 120, 0.04) 0px,
            rgba(0, 255, 120, 0.04) 1px,
            transparent 1px,
            transparent 80px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(0, 200, 255, 0.05) 0px,
            rgba(0, 200, 255, 0.05) 1px,
            transparent 1px,
            transparent 80px
        ),
        radial-gradient(circle at 20% 30%, rgba(37, 48, 93, 0.55), transparent 60%),
        radial-gradient(circle at 80% 70%, rgba(1, 150, 78, 0.45), transparent 60%);
    animation: cyberMove 14s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.9;
}



@keyframes cyberMove {
    0% { transform: translate(0,0) scale(1); }
    25% { transform: translate(40px, -40px) scale(1.05); }
    50% { transform: translate(-30px, 20px) scale(1.1); }
    75% { transform: translate(20px, 40px) scale(1.06); }
    100% { transform: translate(0,0) scale(1); }
}



/* Particules */

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;              /* plus gros */
    height: 4px;
    background: #00ff99;     /* vert plus vif */
    border-radius: 50%;
    animation: float 18s infinite;
    opacity: 0.85;           /* beaucoup plus visibles */
    box-shadow: 0 0 10px rgba(0, 255, 153, 0.9); /* halo autour de la pastille */
}


@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-80vh) translateX(60px); }
    50% { transform: translateY(-160vh) translateX(-80px); }
    75% { transform: translateY(-240vh) translateX(40px); }
}


/* Layout global */

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* HEADER (page de virement) */

.header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container {
    margin: 0 auto 40px;
    position: relative;
    width: 220px;   /* avant 120px */
    height: 220px;  /* avant 120px */
}


.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 260px;   /* un peu plus grand que le logo */
    height: 260px;
    background: radial-gradient(
        circle,
        rgba(1, 150, 78, 0.65) 0%,   /* halo vert bien visible */
        transparent 70%
    );
    opacity: 0.75;
    filter: blur(6px);
}


@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    /* on “éclaire” le logo */
    filter:
        drop-shadow(0 0 25px rgba(1, 150, 78, 0.9))
        brightness(1.4)
        contrast(1.15);
}


h1 {
    font-size: 48px;
    font-weight: 900;
    color: #01964e;
    margin-bottom: 15px;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(1, 150, 78, 0.5);
}

.subtitle {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.security-badge {
    display: inline-block;
    padding: 10px 25px;
    background: rgba(1, 150, 78, 0.1);
    border: 1px solid #01964e;
    border-radius: 50px;
    color: #01964e;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.security-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(1, 150, 78, 0.3), transparent);
    animation: scan 3s infinite;
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* CARD FORM / CARD LOGIN */

.form-card {
    max-width: 650px;
    margin: 0 auto;
    background: rgba(37, 48, 93, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 50px;
    border: 1px solid rgba(1, 150, 78, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(1, 150, 78, 0.1);
    animation: fadeInUp 0.8s ease 0.2s backwards;
    position: relative;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #01964e, transparent);
    opacity: 0.5;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

label {
    display: block;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    opacity: 0.9;
}

input, select {
    width: 100%;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(1, 150, 78, 0.3);
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

input:focus, select:focus {
    border-color: #01964e;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 3px rgba(1, 150, 78, 0.1), 0 0 20px rgba(1, 150, 78, 0.2);
    transform: translateY(-2px);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2301964e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
}

select option {
    background: #25305d;
    color: #ffffff;
}

/* Checkbox */

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 30px 0;
    padding: 20px;
    background: rgba(1, 150, 78, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(1, 150, 78, 0.2);
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #01964e;
    margin-top: 2px;
}

.checkbox-group label {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    opacity: 0.9;
}

/* Boutons principaux */

.submit-btn, .delete-all-btn {
    width: 100%;
    padding: 18px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
}

/* Bouton principal vert */

.submit-btn {
    background: linear-gradient(135deg, #01964e 0%, #01b35e 100%);
    color: #000000;
    box-shadow: 0 8px 25px rgba(1, 150, 78, 0.4);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(1, 150, 78, 0.6);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:hover::before {
    width: 400px;
    height: 400px;
}

.submit-btn span {
    position: relative;
    z-index: 1;
}

/* Bouton rouge "Purge totale" */

.delete-all-btn {
    background: linear-gradient(135deg, #b3261e 0%, #8b1e16 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(179, 38, 30, 0.4);
    padding: 12px 28px;
    width: auto;
}

.delete-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(179, 38, 30, 0.6);
}

/* Alerts */

.alert {
    padding: 18px 22px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 14px;
    animation: slideIn 0.4s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: rgba(1, 150, 78, 0.15);
    border: 1px solid #01964e;
    color: #01964e;
}

.alert-error {
    background: rgba(179, 38, 30, 0.15);
    border: 1px solid #b3261e;
    color: #ff6b6b;
}

/* Footer */

footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

/* Top bar / header DASHBOARD */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 10px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-mini {
    width: 50px;
    height: 50px;
    position: relative;
}

.logo-mini svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(1, 150, 78, 0.6));
}

.brand-text {
    font-size: 18px;
    font-weight: 700;
    color: #01964e;
    letter-spacing: 2px;
}

.logout-btn {
    padding: 10px 24px;
    background: rgba(37, 48, 93, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(1, 150, 78, 0.3);
    border-radius: 50px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(179, 38, 30, 0.2);
    border-color: #b3261e;
    color: #ff6b6b;
}

/* Dashboard header bloc */

.dashboard-header {
    background: rgba(37, 48, 93, 0.3);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 35px 40px;
    margin-bottom: 40px;
    border: 1px solid rgba(1, 150, 78, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    animation: fadeIn 0.6s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.header-info h1 {
    font-size: 28px;
    font-weight: 900;
    color: #01964e;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(1, 150, 78, 0.3);
}

.header-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.stats-badge {
    padding: 12px 24px;
    background: rgba(1, 150, 78, 0.15);
    border: 1px solid #01964e;
    border-radius: 50px;
    color: #01964e;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1px;
}

/* Empty state dashboard */

.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

/* Grid des équipes */

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 25px;
    animation: fadeInUp 0.6s ease 0.2s backwards;
}

/* Bloc équipe + transactions */

.team-block {
    position: relative;
    background: rgba(20, 25, 45, 0.55);
    border: 1px solid rgba(1, 150, 78, 0.35);
    backdrop-filter: blur(18px);
    border-radius: 22px;
    padding-bottom: 20px;
    box-shadow: 0 0 30px rgba(1, 150, 78, 0.08);
    transition: 0.3s ease;
}

.team-block:hover {
    border-color: #01c06d;
    box-shadow: 0 0 35px rgba(1, 150, 78, 0.22);
    transform: translateY(-4px);
}


@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.transaction-card:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: #01964e;
    transform: translateX(4px);
    box-shadow: -5px 0 20px rgba(1, 150, 78, 0.2);
}


.team-header {
    background: linear-gradient(145deg,
        rgba(1,150,78,0.25),
        rgba(20,25,45,0.4)
    );
    border-bottom: 1px solid rgba(1, 150, 78, 0.4);
    padding: 22px 26px;
    border-radius: 22px 22px 0 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;     /* autorise le retour à la ligne propre */
    row-gap: 10px;
}

.team-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #01964e, transparent);
    opacity: 0.5;
}

.team-name {
    font-size: 18px;
    font-weight: 700;
    color: #01964e;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;

    flex: 1 1 170px;     /* prend la place dispo mais peut réduire */
    min-width: 0;
}


.team-icon {
    font-size: 18px;
}

.team-count {
    padding: 6px 16px;
    background: rgba(1, 150, 78, 0.2);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    color: #01964e;
    letter-spacing: 0.5px;
}

.transactions-list {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: none;
    overflow: visible;
}

.transactions-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.transactions-list::-webkit-scrollbar-thumb {
    background: rgba(1, 150, 78, 0.4);
    border-radius: 10px;
}

.transactions-list::-webkit-scrollbar-thumb:hover {
    background: rgba(1, 150, 78, 0.6);
}

/* Carte transaction */

.transaction-card {
    position: relative;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 18px;
    border: 1px solid rgba(1, 150, 78, 0.18);
    padding: 22px 22px 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: visible;
}

.transaction-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, #01964e 0%, #01b35e 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.transaction-card:hover {
    transform: translateX(6px);
    border-color: #01964e;
    box-shadow: -6px 0 30px rgba(1, 150, 78, 0.25);
}

.transaction-card:hover::before {
    opacity: 1;
}

.transaction-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.transaction-amount {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-weight: 800;
    font-size: 28px;
    color: #32ff9b;
}

.currency {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

.transaction-id {
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(37, 48, 93, 0.7);
    border: 1px solid rgba(1, 150, 78, 0.4);
    font-size: 11px;
    font-family: 'Courier New', monospace;
    color: #ffffff;
    letter-spacing: 1px;
}

.transaction-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    flex-wrap: wrap;
}

.detail-icon {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

.detail-label {
    min-width: 90px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    flex: 0 0 auto;
}

.detail-value {
    flex: 1 1 auto;
    color: #ffffff;
    font-weight: 500;
    white-space: normal;
    overflow: visible;
}

.transaction-date {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Responsive */

/* Responsive */

@media (max-width: 768px) {
    h1 {
        font-size: 32px;
    }

    .teams-grid {
        grid-template-columns: 1fr; /* ✅ Une seule colonne sur mobile */
    }
    
    .team-block {
        width: 100%; /* ✅ Prend toute la largeur */
    }
    
    .detail-row {
        flex-direction: column; /* ✅ Empile verticalement sur mobile */
        align-items: flex-start;
    }
    
    .detail-label {
        min-width: auto; /* ✅ Pas de largeur min sur mobile */
    }
    
    .form-card {
        padding: 30px 25px;
    }
    
    .logo-container {
        width: 80px;
        height: 80px;
    }

    .teams-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .delete-all-btn,
    .stats-badge,
    .global-total-badge {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .top-bar {
        flex-direction: column;
        gap: 15px;
    }

    /* === Ajouts pour les blocs équipe / badges ===== */

    .team-header {
        padding: 18px 16px;
    }

    .team-header-right {
        width: 100%;
        justify-content: flex-start;
        gap: 6px;
    }

    .team-badge {
        font-size: 11px;
    }
}


.header {
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
    z-index: 0;
}

.logo-container, h1, .subtitle, .security-badge {
    position: relative;
    z-index: 2;
}

.team-header-right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    flex: 1 1 200px;
    max-width: 100%;
}

.team-badge {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    white-space: nowrap;
}

/* "X virement(s)." */
.team-count-badge {
    background: rgba(1, 150, 78, 0.2);
    border: 1px solid rgba(1, 150, 78, 0.7);
    color: #b7ffd7;
}

/* "TOTAL 1 896 523,00 JPY • 5 000,00 EUR" */
.team-total-badge {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(1, 150, 78, 0.5);
    color: #e8fff4;
    gap: 6px;

    /* 👇 ajouts importants */
    white-space: normal;
    text-align: left;
    align-items: flex-start;
    max-width: 100%;
}

.team-total-badge .team-total-value {
    white-space: normal;
    display: block;
    line-height: 1.4;
}

.team-total-label {
    text-transform: uppercase;
    font-size: 11px;
    opacity: 0.8;
}

.team-total-value {
    font-weight: 600;
}


.global-total-badge {
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(1, 150, 78, 0.6);
    box-shadow: 0 0 18px rgba(1, 150, 78, 0.35);
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: #e8fff4;

    max-width: 360px;
    white-space: normal;   /* peut passer sur 2 lignes si nécessaire */
}

.global-total-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    font-weight: 600;
}

.global-total-value {
    font-weight: 700;
    font-size: 13px;
}

/* Bouton suppression individuelle — petit, discret, pro */

.delete-one-form {
    position: absolute;
    bottom: 14px;
    right: 18px;
    z-index: 5;
}

.delete-one-icon {
    background: rgba(179, 38, 30, 0.15);
    border: 1px solid rgba(179, 38, 30, 0.4);
    color: #ff6b6b;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: 0.2s ease;
    backdrop-filter: blur(6px);
}

.delete-one-icon:hover {
    background: rgba(179, 38, 30, 0.35);
    border-color: #ff8989;
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(255, 60, 60, 0.4);
}

.delete-one-icon:active {
    transform: scale(0.95);
}

/* --- Overrides de sécurité : rien ne doit être coupé --- */

.team-block,
.transactions-list,
.transaction-card,
.transaction-details,
.detail-row {
    max-height: none !important;
    overflow: visible !important;
}

.detail-row {
    flex-wrap: wrap !important;
}

.detail-value {
    flex: 1 1 auto !important;
    white-space: normal !important;
}


