/* =============================================
   POLICES PERSONNALISÉES
============================================= */
@font-face {
  font-family: 'VALVE Oracle Medium';
  src: url('../polices/valveoracle-medium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'VALVE Oracle SemiBold';
  src: url('../polices/valveoracle-semibold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'VALVE Pulp';
  src: url('../polices/valvepulp-bold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* =============================================
   VARIABLES GLOBALES
============================================= */
:root {
  --font-main: 'VALVE Oracle SemiBold', sans-serif;
  --font-second: 'VALVE Pulp', sans-serif;
  
  /* Cloud Dancer Pantone 2026 */
  --primary: #a5c8d9;          /* Cloud Dancer */
  --primary-lt: #e8f1f5;       /* Cloud Dancer très clair */
  --primary-dk: #6d94a8;       /* Cloud Dancer foncé */
  --white: #ffffff;
  --text: #2c3e50;
  --muted: #6b8299;
  --bg: #f4f7fa;
  --shadow-card: 0 12px 28px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.05);
  --shadow-hover: 0 16px 32px rgba(0,0,0,0.12);
  --radius: 20px;
  --radius-sm: 12px;
  --nav-height: 120px;
}

/* =============================================
   RESET & BASE
============================================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--text);
  background-color: var(--primary-lt);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23a5c8d9' fill-opacity='0.3' d='M0,192L48,197.3C96,203,192,213,288,208C384,203,480,181,576,186.7C672,192,768,224,864,234.7C960,245,1056,235,1152,213.3C1248,192,1344,160,1392,144L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: bottom;
  animation: waveMove 8s ease-in-out infinite alternate;
  min-height: 100vh;
  overflow-x: hidden;
}

@keyframes waveMove {
  0% { background-position: bottom left; }
  100% { background-position: bottom right; }
}

/* =============================================
   BANNIERE
============================================= */
.banniere {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--primary-lt);
}

.contenu_banniere {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-second);
  font-size: 38px;
  font-weight: 700;
  color: var(--primary-dk);
  letter-spacing: -0.5px;
}

.banniere ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.banniere ul li a {
  font-family: var(--font-main);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.banniere ul li a:hover {
  background: var(--primary-lt);
  color: var(--primary-dk);
}

/* =============================================
   PAGE CONTENT
============================================= */
.page-content {
  padding-top: calc(var(--nav-height) + 2rem);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* =============================================
   WALLET CONTAINER (connecté)
============================================= */
.wallet-container {
  width: 100%;
  max-width: 800px;
  margin: 0 1.5rem 3rem;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 2rem;
}

.wallet-container h2 {
  font-family: var(--font-second);
  color: var(--primary-dk);
  font-size: 2rem;
  margin: 0 0 1.5rem;
}

/* =============================================
   ONGLETS
============================================= */
.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 2rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--muted);
  padding: 0.6rem 1.4rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, border-bottom 0.2s;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.tab-btn:hover {
  color: var(--primary-dk);
}

.tab-btn.active {
  color: var(--primary-dk);
  border-bottom: 3px solid var(--primary);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

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

/* =============================================
   SOLDE CARD
============================================= */
.solde-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dk) 100%);
  border-radius: var(--radius);
  padding: 2rem;
  color: white;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  margin-bottom: 2rem;
}

.solde-total {
  text-align: center;
  margin-bottom: 1.5rem;
}

.label-solde {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.85;
}

.montant-solde {
  font-family: var(--font-second);
  font-size: 2.8rem;
  font-weight: 700;
  display: block;
  margin-top: 0.25rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.solde-details {
  display: flex;
  justify-content: space-around;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.detail {
  text-align: center;
}

.detail-label {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 4px;
}

.detail-value {
  font-size: 1.2rem;
  font-weight: 700;
}

.detail-value.disponible {
  color: #6ee7b7;
}

.detail-value.bloque {
  color: #fcd34d;
}

/* =============================================
   RECHARGE SECTION
============================================= */
.recharge-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  margin-bottom: 2rem;
}

.recharge-section h3 {
  font-family: var(--font-main);
  color: var(--primary-dk);
  margin: 0 0 1rem;
}

.form-recharge {
  display: flex;
  gap: 12px;
  align-items: center;
}

.form-recharge input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-recharge input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(165,200,217,0.3);
}

.btn-recharge {
  background: var(--primary);
  color: var(--text);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-second);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}

.btn-recharge:hover {
  background: var(--primary-dk);
  color: white;
  transform: translateY(-2px);
}

.msg-erreur,
.msg-succes,
.msg-attente {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.msg-erreur {
  background: #fee2e2;
  color: #b91c1c;
  border-left: 4px solid #ef4444;
}

.msg-succes {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid #10b981;
}

.msg-attente {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

/* =============================================
   HISTORIQUE
============================================= */
.historique-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.historique-section h3 {
  font-family: var(--font-main);
  color: var(--primary-dk);
  margin: 0 0 1rem;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-item strong {
  color: var(--text);
}

.montant {
  font-weight: 700;
  font-size: 1rem;
}

.montant.positif {
  color: #10b981;
}

.montant.negatif {
  color: #ef4444;
}

/* =============================================
   FILTRES
============================================= */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.5rem;
  align-items: flex-end;
}

.filters select,
.filters input {
  padding: 8px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.9rem;
  background: white;
  transition: border-color 0.2s;
}

.filters select:focus,
.filters input:focus {
  outline: none;
  border-color: var(--primary);
}

/* =============================================
   PAGINATION
============================================= */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 1.5rem;
}

.pagination a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.pagination a.active {
  background: var(--primary);
  color: var(--text);
  border-color: var(--primary);
}

.pagination a:hover:not(.active) {
  background: var(--primary-lt);
}

/* =============================================
   FORMULAIRE DE CONNEXION (non connecté)
============================================= */
.form-container {
  background: rgba(255,255,255,0.95);
  padding: 3rem 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 440px;
  margin: 2rem;
}

.form-header-full {
  text-align: center;
  margin-bottom: 2rem;
}

.form-header-full h2 {
  font-family: var(--font-second);
  font-size: 2.2rem;
  color: var(--primary-dk);
  margin-bottom: 0.5rem;
}

.form-header-full h3 {
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--muted);
  font-weight: 400;
}

.groupe_formulaire {
  margin-bottom: 1.5rem;
}

.groupe_formulaire label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.groupe_formulaire input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.95rem;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.groupe_formulaire input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(165,200,217,0.3);
}

.btn-submit {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: var(--text);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-second);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn-submit:hover {
  background: var(--primary-dk);
  color: white;
  transform: translateY(-1px);
}

/* =============================================
   EXPORT PDF
============================================= */
#tab-export h3 {
  margin-bottom: 1rem;
}

#tab-export label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

#tab-export input[type="date"] {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #ccc;
  margin-bottom: 1rem;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 768px) {
  .wallet-container {
    margin: 0 1rem 2rem;
    padding: 1.5rem;
  }
  .montant-solde {
    font-size: 2.2rem;
  }
  .form-recharge {
    flex-direction: column;
  }
  .tabs {
    flex-wrap: wrap;
  }
  .contenu_banniere {
    height: auto;
    padding: 1rem;
    flex-direction: column;
    gap: 10px;
  }
  .page-content {
    padding-top: 180px;
  }
}