/* =====================================================
   THEME GLOBAL
===================================================== */
:root {
    --bg-main: #0b0f1a;
    --bg-header: #111b2d;
    --bg-card: #1e293b;
    --bg-input: #0f172a;

    --primary: #3b82f6;
    --primary-soft: rgba(59, 130, 246, 0.1);
    --primary-hover: #2563eb;
    --secondary: #64748b;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-inv: #ffffff;
    --text-dark: #0f172a;

    --border-soft: rgba(255, 255, 255, 0.08);
    --border-focus: #3b82f6;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.5);
    
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* ANIMATIONS */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* =====================================================
   KEYFRAMES
   ===================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.9);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-fade-in { animation: fadeIn var(--transition-base) forwards; }
.animate-slide-up { animation: slideUp var(--transition-base) forwards; }
.animate-slide-down { animation: slideDown var(--transition-base) forwards; }
.animate-scale-in { animation: scaleIn var(--transition-base) forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }

.shimmer {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.05) 50%, 
        rgba(255,255,255,0) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.glass {
    background: rgba(30, 41, 59, 0.7) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.text-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

html, body {
  margin: 0;
  padding: 0;
}

/* =====================================================
   BODY
===================================================== */
body {
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    letter-spacing: -0.011em;
    color: var(--text-main);
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.03) 0px, transparent 50%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =====================================================
   HEADER
===================================================== */
.site-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

/* Layout : gauche / centre / droite */
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;

  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

/* =====================================================
   BRANDING
   ===================================================== */
.brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition-bounce);
}

.brand:hover {
  transform: scale(1.05);
}

.brand img {
  height: 28px;
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 700;
}

/* =====================================================
   NAVIGATION CENTRALE
===================================================== */
.nav-center {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.nav-center a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  transition: var(--transition-base);
  position: relative;
}

.nav-center a:hover {
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-1px);
}

.nav-center a::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition-base);
  transform: translateX(-50%);
}

.nav-center a:hover::after {
  width: 20px;
}

/* =====================================================
   NAVIGATION DROITE (AUTH)
===================================================== */
.nav-right {
  display: flex;
  gap: 10px;
}


/* =====================================================
   FLASH MESSAGES (TOAST POPUPS)
===================================================== */
.flash-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    width: calc(100% - 4rem);
}

/* On utilise les styles .alert de components.css pour les flash messages */
.flash-message {
    animation: toastIn var(--transition-bounce) forwards;
}

.flash-message.error, .flash-message.danger {
    border-left-color: #fca5a5;
    background: rgba(239, 68, 68, 0.95);
}

.flash-message.success {
    border-left-color: #6ee7b7;
    background: rgba(16, 185, 129, 0.95);
}

.flash-message.info, .flash-message.warning {
    border-left-color: #fcd34d;
    background: rgba(245, 158, 11, 0.95);
}

/* Surcharge spécifique pour flash container */
.flash-container .flash-message {
    margin-bottom: 0;
}

@keyframes toastIn {
    from { 
        opacity: 0; 
        transform: translateX(50px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0) scale(1); 
    }
}

/* =====================================================
   MAIN CONTENT
===================================================== */
.main-container {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 20px;
}


/* =====================================================
   PROFILE PAGE IMPROVEMENTS
===================================================== */
.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 500;
}

.role-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    width: fit-content;
}

.btn.small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* =====================================================
   OFFERS PAGE IMPROVEMENTS
===================================================== */
.offers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.form-group-inline {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group-inline label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
select,
textarea {
    background-color: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-select {
    cursor: pointer;
}

.offers-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.offer-card-modern {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.offer-card-modern:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 12px 20px -10px rgba(0, 0, 0, 0.5);
}

.offer-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge.sell {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.badge.buy {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
}

.offer-status-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.offer-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.offer-title a {
    text-decoration: none;
    color: var(--text-main);
}

.offer-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.price-label, .user-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.25rem;
}

.price-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.user-value {
    font-size: 0.95rem;
    font-weight: 500;
}

.user-value a {
    color: var(--text-main);
    text-decoration: none;
}

.user-value a:hover {
    color: var(--primary);
}

.btn.full-width {
    width: 100%;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    background: var(--bg-card);
    border: 1px dashed var(--border-soft);
    border-radius: var(--radius-lg);
}

/* =====================================================
   WALLET PAGE IMPROVEMENTS
===================================================== */
.wallet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.wallet-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.balance-main {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-color: rgba(59, 130, 246, 0.2);
}

.balance-amount {
    margin: 1.5rem 0;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.xmr-symbol {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.balance-amount .value {
    font-size: 2.5rem;
    font-weight: 800;
}

.balance-details-row {
    display: flex;
    gap: 2rem;
    border-top: 1px solid var(--border-soft);
    padding-top: 1rem;
}

.address-container {
    margin: 1rem 0;
    background: var(--bg-main);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
}

.monero-addr {
    display: block;
    word-break: break-all;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.address-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

.wallet-sections {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    text-align: left;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-soft);
}

.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.9rem;
}

.current-row {
    background: rgba(59, 130, 246, 0.03);
}

.addr-cell code {
    color: var(--primary);
}

.status-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

.status-badge.disabled {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.transfer-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.form-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.admin-forms-flex {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.admin-inline-form {
    flex: 1;
    min-width: 250px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-inline-form h4 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-input.small {
    padding: 0.5rem;
    background: var(--bg-main);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    color: var(--text-main);
}

@media (max-width: 900px) {
    .wallet-grid, .wallet-sections {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 768px) {
  .nav-inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .nav-center {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-right {
    justify-content: center;
  }

  .brand-title {
    display: none;
  }
}

/* =====================================================
   HEADER – BUTTON VISIBILITY FIX
   ===================================================== */

.site-header .btn-secondary {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
}

.site-header .btn-secondary:hover {
  background: rgba(79, 140, 255, 0.18);
  color: var(--primary);
  border-color: var(--primary);
}

/* =====================================================
   PROFILE PAGE
===================================================== */

.profile-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ===== Titres ===== */
.page-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: 600;
}

/* ===== Cards ===== */
.profile-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.profile-card.danger-zone {
  border: 1px solid rgba(239, 68, 68, 0.2);
  background-color: rgba(239, 68, 68, 0.02);
}

/* ===== Liens ===== */
.profile-card .link {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  color: var(--accent-color);
  text-decoration: none;
}

.profile-card .link:hover {
  text-decoration: underline;
}

/* ===== Formulaires ===== */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  gap: 0.4rem;
}

.profile-form input {
  background-color: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.profile-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* ===== Boutons (réutilise ton style global) ===== */
.btn-primary,
.btn-secondary,
.btn-danger {
  align-self: flex-start;
}

/* ===== 2FA status ===== */
.status {
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.status.enabled {
  color: #4ade80;
}

.status.disabled {
  color: #f87171;
}

/* ===== Sessions ===== */
.sessions-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.sessions-table th,
.sessions-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #2a2a2a;
  font-size: 0.9rem;
}

.sessions-table th {
  color: #a1a1aa;
  font-weight: 500;
}

.sessions-table .ua {
  max-width: 360px;
  word-break: break-word;
}

.sessions-table .actions {
  display: flex;
  gap: 0.5rem;
}

/* ===== Avis ===== */
.rating {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.reviews-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.reviews-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #2a2a2a;
  font-size: 0.9rem;
}

.reviews-list small {
  display: block;
  color: #9ca3af;
  margin-top: 0.25rem;
}

/* ===== Bouton danger small ===== */
.btn-danger.small {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  margin-top: 0.3rem;
}

/* =========================
   OFFERS PAGE
========================= */

.offers-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

/* =========================
   CREATE AD – CENTERED BLOCKS
========================= */

.create-ad-form {
  max-width: 720px;
  margin: 0 auto;
}

.form-block {
  background: var(--bg-card, #111827);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
}

.form-block h3 {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-hint {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.8;
}

.result-price {
  font-weight: 600;
}

.form-actions {
  text-align: center;
  margin-top: 2rem;
}

/* =========================
   CREATE AD – SELECT WIDTH
========================= */

.create-ad-form select {
  width: 100%;
  max-width: 320px;
}
.create-ad-form input[type="number"] {
  max-width: 220px;
}
.create-ad-form select {
  padding-right: 2rem;
}

/* ================================
   DROPDOWN NAV - "PLUS"
   ================================ */

.nav-dropdown {
    position: relative;
}

.nav-dropdown .nav-link {
    cursor: pointer;
}
/* Aligner le bouton "Plus" comme les autres liens */
.nav-dropdown {
    display: flex;
    align-items: center;
}

/* Menu caché */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: var(--bg-card);
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    padding: 0.4rem 0;
    display: none;
    z-index: 1000;
}

/* Liens du menu */
.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: var(--bg-hover);
}

/* Ouverture au hover */
.nav-dropdown:hover .dropdown-menu {
    display: block;
}

