@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* Variables - Uniformisées avec les couleurs demandées */
:root {
    --bg-primary: #050b18;          /* Fond bleu nuit très sombre */
    --bg-secondary: #0d172e;        /* Fond bleu marine */
    --card-bg: rgba(18, 25, 41, 0.75);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    
    /* Couleurs principales du club */
    --accent-blue: #244CA6;
    --accent-blue-glow: rgba(36, 76, 166, 0.35);
    --accent-yellow: #F8C223;
    --accent-yellow-glow: rgba(248, 194, 35, 0.25);
    
    /* Couleurs sémantiques */
    --danger-red: #f87171;
    --danger-red-glow: rgba(248, 113, 113, 0.2);
    --success-green: #4ade80;
    --success-green-glow: rgba(74, 222, 128, 0.2);
    --warning-orange: #fb923c;
    --warning-orange-glow: rgba(251, 146, 60, 0.2);
    
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
body {
    background: radial-gradient(circle at 50% 0%, var(--bg-secondary) 0%, var(--bg-primary) 70%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    padding-bottom: 3rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* App Header */
header, .app-header {
    background: rgba(5, 11, 24, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 0;
    margin-bottom: 2.5rem;
}

/* Card Styling Override */
.card {
    background: var(--card-bg) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border) !important;
    border-radius: var(--border-radius-lg) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px);
}

/* Text and Titles */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
}

h2 {
    font-size: 1.75rem;
    background: linear-gradient(135deg, #ffffff 30%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Form Controls */
.form-control, .form-select {
    background-color: rgba(13, 23, 46, 0.6) !important;
    border: 1px solid var(--card-border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--border-radius-md) !important;
    padding: 0.75rem 1rem;
    transition: var(--transition-smooth);
}

.form-control:focus, .form-select:focus {
    background-color: rgba(13, 23, 46, 0.8) !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 4px var(--accent-blue-glow) !important;
    outline: none;
}

/* Form Switch Custom */
.form-check-input:checked {
    background-color: var(--accent-blue) !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 4px var(--accent-blue-glow) !important;
}

/* Table Override */
.table-responsive {
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--card-border);
    background: var(--card-bg);
}

.table {
    color: var(--text-primary) !important;
    margin-bottom: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: rgba(13, 23, 46, 0.8) !important;
    color: var(--text-secondary) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--card-border) !important;
}

.table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--card-border) !important;
    background-color: transparent !important;
    transition: var(--transition-smooth);
}

.table-hover tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

/* Custom modern buttons */
.btn {
    border-radius: var(--border-radius-md) !important;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #173885 100%) !important;
    border: none !important;
    box-shadow: 0 4px 15px var(--accent-blue-glow) !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(36, 76, 166, 0.5) !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary) !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

/* Boutons de validation et enregistrement (Jaune / Or) */
.btn-success {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, #e0ad16 100%) !important;
    border: none !important;
    box-shadow: 0 4px 15px var(--accent-yellow-glow) !important;
    color: #050b18 !important;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(248, 194, 35, 0.4) !important;
    color: #050b18 !important;
}

.btn-outline-danger {
    border-color: rgba(248, 113, 113, 0.3) !important;
    color: var(--danger-red) !important;
}

.btn-outline-danger:hover {
    background: var(--danger-red) !important;
    border-color: var(--danger-red) !important;
    box-shadow: 0 4px 15px var(--danger-red-glow) !important;
    color: #ffffff !important;
}

/* Boutons premiums non flashy pour voir_adherent.php */
.btn-premium-success {
    background: rgba(74, 222, 128, 0.1) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(74, 222, 128, 0.25) !important;
    transition: var(--transition-smooth);
}
.btn-premium-success:hover {
    background: rgba(74, 222, 128, 0.2) !important;
    border-color: rgba(74, 222, 128, 0.4) !important;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.15) !important;
    transform: translateY(-1px);
}

.btn-premium-danger {
    background: rgba(248, 113, 113, 0.1) !important;
    color: #f87171 !important;
    border: 1px solid rgba(248, 113, 113, 0.25) !important;
    transition: var(--transition-smooth);
}
.btn-premium-danger:hover {
    background: rgba(248, 113, 113, 0.2) !important;
    border-color: rgba(248, 113, 113, 0.4) !important;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.15) !important;
    transform: translateY(-1px);
}

.btn-premium-warning {
    background: rgba(248, 194, 35, 0.1) !important;
    color: #F8C223 !important;
    border: 1px solid rgba(248, 194, 35, 0.25) !important;
    transition: var(--transition-smooth);
}
.btn-premium-warning:hover {
    background: rgba(248, 194, 35, 0.2) !important;
    border-color: rgba(248, 194, 35, 0.4) !important;
    box-shadow: 0 4px 12px rgba(248, 194, 35, 0.15) !important;
    transform: translateY(-1px);
}

/* Custom premium status badges */
.badge-premium {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 8px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Stat Cards in Dashboard */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.15;
    pointer-events: none;
}

.stat-card.new::after { background: var(--text-secondary); }
.stat-card.invalid::after { background: var(--danger-red); }
.stat-card.waiting::after { background: var(--accent-yellow); }
.stat-card.success::after { background: var(--success-green); }

.stat-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

/* Avatar design */
.avatar-container-custom {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: var(--transition-smooth);
}

.avatar-container-custom img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Glow on status state colors */
.state-glow-success { box-shadow: 0 0 12px var(--success-green-glow); }
.state-glow-danger { box-shadow: 0 0 12px var(--danger-red-glow); }
.state-glow-warning { box-shadow: 0 0 12px var(--accent-yellow-glow); }
.state-glow-info { box-shadow: 0 0 12px var(--accent-blue-glow); }

/* Login background design */
.login-bg-decor {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
}

.login-orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-blue);
    top: -10%;
    left: -10%;
}

.login-orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-yellow);
    bottom: -10%;
    right: -10%;
}

/* Custom Search Container */
.search-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

/* Custom document card items */
.document-item-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 1rem 1.25rem;
    transition: var(--transition-smooth);
}

.document-item-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.document-badge-status {
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
}

/* Liens des emails et numéros de téléphone pour voir_adherent.php (non flashy) */
.detail-row a {
    color: #8bb2f9 !important;      /* Bleu ciel doux et intégré */
    text-decoration: none;
    transition: var(--transition-smooth);
}

.detail-row a:hover {
    color: var(--accent-yellow) !important; /* Devient or/jaune au survol */
    text-decoration: underline !important;
}

/* Drag & Drop File Input Styling */
.file-drop-zone {
    position: relative;
    border: 2px dashed var(--border-glass, rgba(255, 255, 255, 0.2));
    border-radius: 10px;
    padding: 6px;
    transition: all 0.3s ease;
    background: rgba(15, 23, 42, 0.2);
}

[data-bs-theme="light"] .file-drop-zone {
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(241, 245, 249, 0.5);
}

.file-drop-zone.drop-zone-active {
    border-color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.15) !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
    transform: scale(1.01);
}

[data-bs-theme="light"] .file-drop-zone.drop-zone-active {
    border-color: #d97706 !important;
    background: rgba(245, 158, 11, 0.2) !important;
}