/* ============================================
   AMEX BONUS — Design System & Styles
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --amex-blue: #006FCF;
  --amex-dark: #00175A;
  --amex-medium: #0040A1;
  --bg-dark: #00175A;
  --bg-darker: #001840;
  --bg-light: #F7F8FA;
  --gold: #C4A265;
  --gold-light: #E8D5A3;
  --text-light: #FFFFFF;
  --text-light-secondary: #8AA8D6;
  --text-dark: #00175A;
  --text-dark-secondary: #4A5568;
  --border-dark: rgba(255, 255, 255, 0.1);
  --border-light: #E2E8F0;
  --transition: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --card-ratio: 1.586;
  --max-width: 1400px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-light);
  background: var(--bg-dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Typography --- */
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; font-weight: 700; line-height: 1.2; }
.subtitle { font-family: 'Raleway', sans-serif; font-weight: 400; }

/* --- Glowing Separator --- */
.glow-separator {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amex-blue), transparent);
  border: none;
  opacity: 0.5;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(180deg, var(--amex-dark) 0%, rgba(0, 23, 90, 0.95) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-dark);
  transition: transform 0.3s var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-light);
}

.logo span { color: var(--gold); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color 0.3s var(--transition);
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--amex-blue);
  transition: width 0.3s var(--transition);
}

.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }
.nav-menu a:hover { color: var(--gold-light); }

.lang-switch {
  display: flex;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  font-size: 0.85rem;
}

.lang-switch a { opacity: 0.6; transition: opacity 0.3s; }
.lang-switch a.active, .lang-switch a:hover { opacity: 1; color: var(--gold); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: all 0.3s var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s;
}

.mobile-overlay.active { display: block; opacity: 1; }

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--bg-darker);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s var(--transition);
    z-index: 999;
    border-left: 1px solid var(--border-dark);
  }

  .nav-menu.active { right: 0; }
  .nav-menu a { font-size: 1.1rem; }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 6rem 1.5rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #00175A 0%, #002D72 40%, #006FCF 100%);
  background-size: 200% 200%;
  animation: heroGradient 8s ease-in-out infinite;
  z-index: 0;
}

/* Centurion watermark */
.hero-centurion {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-centurion img {
  position: absolute;
  left: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(450px, 55vw, 750px);
  height: auto;
  opacity: 0.22;
  filter: brightness(1.8);
  mix-blend-mode: lighten;
  user-select: none;
  -webkit-user-drag: none;
  animation: centurionFade 2.5s ease-out forwards;
}

@keyframes centurionFade {
  from { opacity: 0; transform: translateY(-50%) scale(0.95); }
  to { opacity: 0.22; transform: translateY(-50%) scale(1); }
}

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

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  overflow: hidden;
  text-shadow: 0 2px 30px rgba(0, 111, 207, 0.3);
}

.hero-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: charReveal 0.6s var(--transition) forwards;
}

@keyframes charReveal {
  to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--gold-light);
  margin-bottom: 1rem;
  font-weight: 300;
}

.hero-text {
  font-size: 1rem;
  color: #B0C8E8;
  margin-bottom: 2.5rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--gold);
  border-radius: 30px;
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.05em;
  transition: all 0.3s var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--amex-blue);
  color: var(--text-light);
  box-shadow: 0 4px 15px rgba(0, 111, 207, 0.3);
}

.btn-primary:hover {
  background: var(--amex-medium);
  box-shadow: 0 0 20px rgba(0, 111, 207, 0.5);
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--amex-dark);
  box-shadow: 0 4px 15px rgba(196, 162, 101, 0.3);
  animation: goldPulse 3s ease-in-out infinite;
}

.btn-gold:hover {
  box-shadow: 0 0 25px rgba(196, 162, 101, 0.6);
  transform: translateY(-2px);
}

@keyframes goldPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(196, 162, 101, 0.3); }
  50% { box-shadow: 0 0 20px rgba(196, 162, 101, 0.5); }
}

/* ============================================
   SECTIONS
   ============================================ */
.section-dark {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 5rem 0;
}

.section-darker {
  background: var(--bg-darker);
  color: var(--text-light);
  padding: 5rem 0;
}

.section-light {
  background: var(--bg-light);
  color: var(--text-dark);
  padding: 5rem 0;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-align: center;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
}

.section-subtitle {
  text-align: center;
  font-family: 'Raleway', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 3rem;
  opacity: 0.8;
}

.section-light .section-subtitle { color: var(--text-dark-secondary); }

/* ============================================
   CARD GRID
   ============================================ */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .cards-grid.grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin: 0 auto; }
}

/* ============================================
   CARD COMPONENT
   ============================================ */
.card-article {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dark);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.4s var(--transition);
  opacity: 0;
  transform: translateY(40px);
  perspective: 1000px;
  cursor: pointer;
  position: relative;
}

.card-article > a.card-overlay-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 16px;
}

.card-article .card-link {
  position: relative;
  z-index: 3;
}

.card-article.visible {
  opacity: 1;
  transform: translateY(0);
}

.card-article:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 0 30px rgba(0, 111, 207, 0.4);
  border-color: var(--amex-blue);
}

/* Card Visual (credit-card shaped) */
.card-visual {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 1.5rem;
  aspect-ratio: 1.586;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s var(--transition), box-shadow 0.3s var(--transition);
  transform-style: preserve-3d;
}

.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.card-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.03em;
}

.card-bonus {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--amex-dark);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.card-fee {
  font-size: 0.9rem;
  color: #B0C8E8;
  margin-bottom: 1.2rem;
}

.card-link {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  background: var(--amex-blue);
  color: white;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s var(--transition);
}

.card-link:hover {
  background: var(--amex-medium);
  box-shadow: 0 0 15px rgba(0, 111, 207, 0.4);
}

/* ============================================
   AVANTAGES SECTION
   ============================================ */
.avantages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .avantages-grid { grid-template-columns: repeat(3, 1fr); }
}

.avantage-item {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s var(--transition);
}

.avantage-item.visible { opacity: 1; transform: translateY(0); }

.avantage-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border: 2px solid var(--border-light);
  color: var(--amex-blue);
}

.avantage-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
  color: var(--text-dark);
}

.avantage-text {
  font-size: 0.95rem;
  color: var(--text-dark-secondary);
  line-height: 1.7;
}

/* ============================================
   CALCULATOR SECTION
   ============================================ */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .calculator-grid { grid-template-columns: 1fr 1fr; }
}

.calc-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
}

.calc-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.calc-card .calc-rate {
  font-size: 0.85rem;
  color: var(--text-light-secondary);
  margin-bottom: 1.5rem;
}

.calc-card label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-light-secondary);
}

.calc-card input {
  width: 100%;
  max-width: 260px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-light);
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  text-align: center;
  transition: border-color 0.3s;
  -moz-appearance: textfield;
}

.calc-card input::-webkit-outer-spin-button,
.calc-card input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.calc-card input:focus {
  outline: none;
  border-color: var(--amex-blue);
  box-shadow: 0 0 10px rgba(0, 111, 207, 0.3);
}

.calc-result {
  margin-top: 1.2rem;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
}

.calc-result-double {
  margin-top: 1.2rem;
}

.calc-result-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.8rem 0;
}

.calc-result-row + .calc-result-row {
  border-top: 1px solid var(--border-dark);
}

.calc-result-label {
  font-size: 0.8rem;
  color: var(--text-light-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calc-result-highlight {
  color: var(--gold) !important;
  font-size: 2.2rem !important;
}

.calc-result-dim .calc-result {
  color: var(--text-light-secondary);
  font-size: 1.3rem;
  opacity: 0.6;
}

.calc-result-tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--amex-dark);
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.calc-note {
  max-width: 700px;
  margin: 2rem auto 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light-secondary);
  opacity: 0.8;
  line-height: 1.6;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 0;
  font-family: 'Raleway', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  text-align: left;
  transition: color 0.3s;
  gap: 1rem;
}

.faq-question:hover { color: var(--amex-blue); }

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  position: relative;
  transition: transform 0.3s var(--transition);
}

.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  background: var(--amex-blue);
  border-radius: 2px;
}

.faq-icon::before {
  width: 16px;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  width: 2px;
  height: 16px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s var(--transition);
}

.faq-item.active .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--transition), padding 0.4s var(--transition);
}

.faq-answer-inner {
  padding: 0 0 1.3rem;
  font-size: 0.95rem;
  color: var(--text-dark-secondary);
  line-height: 1.8;
}

/* ============================================
   DISCLAIMER
   ============================================ */
.disclaimer {
  background: var(--bg-darker);
  padding: 3rem 0;
  text-align: center;
}

.disclaimer p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 0.85rem;
  color: #A0B8D8;
  line-height: 1.8;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-dark);
  padding: 2.5rem 0;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-light-secondary);
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--gold); }

.footer-copy {
  font-size: 0.8rem;
  color: #A0B8D8;
  opacity: 0.8;
}

.footer-independent {
  font-size: 0.75rem;
  color: #A0B8D8;
  opacity: 0.7;
  margin-top: 0.5rem;
}

/* ============================================
   CARD DETAIL PAGE
   ============================================ */
.carte-hero-section {
  padding: 8rem 0 4rem;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-darker));
}

.carte-hero-section .card-visual {
  max-width: 380px;
  margin: 0 auto 2rem;
}

.carte-hero-section .section-title { margin-bottom: 0.5rem; }

.carte-hero-section .hero-subtitle {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.carte-details-section {
  padding: 4rem 0;
}

.carte-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .carte-details-grid { grid-template-columns: 380px 1fr; align-items: start; }
}

.carte-details-visual {
  position: sticky;
  top: 100px;
}

.detail-block {
  margin-bottom: 2.5rem;
}

.detail-block-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--amex-blue);
  display: inline-block;
}

.section-light .detail-block-title { color: var(--text-dark); }

.detail-bonus {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  font-family: 'Playfair Display', serif;
}

.detail-bonus-sub {
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.section-light .detail-bonus-sub { color: var(--text-dark-secondary); }

.detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--amex-blue);
}

.detail-price-note {
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 0.3rem;
}

.section-light .detail-price-note { color: var(--text-dark-secondary); }

.avantages-list { padding-left: 0; }

.avantages-list li {
  position: relative;
  padding: 0.6rem 0 0.6rem 2rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.section-light .avantages-list li { color: var(--text-dark-secondary); }

.avantages-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--amex-blue);
  font-size: 0.8rem;
}

/* CTA Section */
.carte-cta-section {
  text-align: center;
  padding: 4rem 0;
}

.cta-redirect {
  font-size: 0.85rem;
  margin-top: 1rem;
  opacity: 0.7;
}

/* Other Cards */
.autres-cartes-section { padding: 4rem 0; }

.mini-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .mini-cards-grid { grid-template-columns: repeat(3, 1fr); }
}

.mini-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
  transition: all 0.3s var(--transition);
}

.mini-card:hover {
  border-color: var(--amex-blue);
  transform: translateY(-3px);
}

.mini-card .card-visual {
  max-width: 180px;
  margin-bottom: 0.8rem;
}

.mini-card .card-name { font-size: 0.9rem; margin-bottom: 0.3rem; }
.mini-card .card-bonus { font-size: 0.75rem; padding: 0.3rem 0.8rem; }

/* ============================================
   COUNT-UP ANIMATION
   ============================================ */
.count-up {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--amex-blue);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-bg { animation: none; }
  html { scroll-behavior: auto; }
}
