/* =============================
   FinTrackPredict – Simulateur Crypto
   Style basé sur ton design global (header/footer gardés)
   Auteur : Julien (refonte par ChatGPT)
   ============================= */

/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #2146ee 0%, #503768 100%);
    --secondary-gradient: linear-gradient(135deg, #f7000c 0%, #c5001a 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --dark: #1a1a2e;
    --dark-light: #16213e;
    --text-light: #e94560;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--dark);
  color: #fff;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.lang-switch {
    position: fixed;
    z-index: 1000;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.lang-btn:hover,
.lang-btn[aria-pressed="true"] {
    background: var(--primary-gradient);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 70, 238, 0.4);
}
.logo {
    font-size: 2rem;
    font-weight: bold;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header */
header {
    text-align: center;
    padding: 4rem 2rem 2rem;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}


header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideUp 1s ease;
}

header h2 {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    animation: slideUp 1s ease 0.2s both;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    animation: slideUp 1s ease 0.4s both;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
}

nav a:hover {
    background: var(--primary-gradient);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(33, 70, 238, 0.4);
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

nav a:hover::before {
    left: 100%;
}
/* Fond animé identique à l’index */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(45deg, #667eea, #3b0175, #8f0f16, #6d0b18);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.bg-animated::before,
.bg-animated::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.bg-animated::before {
    top: 20%;
    left: 10%;
    width: 80px;
    height: 80px;
    background: var(--success-gradient);
    animation-delay: 0s;
}

.bg-animated::after {
    top: 60%;
    right: 10%;
    width: 100px;
    height: 100px;
    background: var(--warning-gradient);
    border-radius: 20px;
    animation-delay: 2s;
}


/* ---------- MAIN LAYOUT ---------- */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  gap: 2rem;
}
footer { background: var(--dark); border-top: 1px solid var(--glass-border); padding: 2rem 1rem; text-align: center; margin-top: .5rem; }
footer p { color: rgba(255,255,255,.85); margin-bottom: .8rem; }
.footer-links { display:flex; justify-content:center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.footer-links a { color: rgba(255,255,255,.85); text-decoration:none; padding:.45rem .9rem; border:1px solid var(--glass-border); border-radius:20px; transition: all .25s ease; }
.footer-links a:hover { background: var(--glass); color:#43e97b ; transform: translateY(-2px); }

footer button { background: var(--warning-gradient); border: none; padding: .9rem 1.4rem; border-radius: 22px; color:#fff; font-size: 1rem; cursor:pointer; transition: transform .25s ease, box-shadow .25s ease; margin:.35rem; font-weight:700; }
footer button:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.3); }

/* ---------- CARDS ---------- */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease-out;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.4);
}

.card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Layout 2 colonnes */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* ---------- FORM INPUTS ---------- */
.input-group {
  margin-bottom: 1.2rem;
}

.input-group input {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  border-radius: 14px;
  border: 2px solid var(--glass-border);
  background: var(--glass);
  color: #fff;
  transition: all 0.3s ease;
}

.input-group input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.input-group input:focus {
  border-color: #4facfe;
  box-shadow: 0 0 18px rgba(79, 172, 254, 0.28);
  background: var(--glass-strong);
}

.input-group input:valid {
  border-color: #43e97b;
}

/* ---------- BUTTONS ---------- */
.btn-primary,
.btn-secondary {
  padding: 0.9rem 1.4rem;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(33, 70, 238, 0.4);
}

.btn-secondary {
  background: var(--glass);
  color: #fff;
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: var(--secondary-gradient);
  transform: translateY(-2px);
}

/* Petits boutons footer */
.btn-small {
  font-size: 0.9rem;
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
}

/* ---------- INFO SECTIONS ---------- */
.info-section {
  margin-bottom: 1.5rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  margin: 0.6rem 0;
}

.info-item label {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.info-item span {
  font-weight: 700;
}

/* ---------- HISTORY ---------- */
.history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.history-column {
  padding: 1rem;
  border-radius: 12px;
  background: var(--dark-light);
  border: 1px solid var(--glass-border);
}

.history-column h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.history-list {
  list-style: none;
  padding: 0;
}

.history-item {
  display: flex;
  justify-content: space-between;
  background: var(--glass);
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.delete-btn {
  margin-left: 0.5rem;
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 1.2rem;
  cursor: pointer;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .history-grid {
    grid-template-columns: 1fr;
  }
}
