/* ===== EasyA — Styles partagés ===== */

/* ===== VARIABLES ===== */
:root {
  --primary: #1a2b4a;
  --primary-light: #2d4a7a;
  --primary-lighter: #3d5a8a;
  --accent: #c9a84c;
  --accent-hover: #b8963e;
  --accent-light: #f5edda;
  --text: #1a1a2e;
  --text-secondary: #4a5568;
  --text-light: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f8f9fc;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --border-light: #f0f0f5;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --nav-height: 72px;
  --transition: 0.3s ease;
}

[data-theme="dark"] {
  --primary: #a8c4e6;
  --primary-light: #7ba3d4;
  --primary-lighter: #5b8abf;
  --accent: #d4b85c;
  --accent-hover: #c9a84c;
  --accent-light: #2a2520;
  --text: #f0f2f7;
  --text-secondary: #cdd2de;
  --text-light: #99a1b3;
  --bg: #0f1219;
  --bg-alt: #161b26;
  --bg-card: #1a2030;
  --border: #2a3348;
  --border-light: #222a3a;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.4);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: var(--nav-height); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9999; opacity: 0.4;
}
[data-theme="dark"] body::before { opacity: 0.25; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

/* ===== FOCUS STYLES ===== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible {
  outline-offset: 3px;
}
.theme-toggle:focus-visible,
.nav-hamburger:focus-visible,
.faq-fab:focus-visible,
.faq-widget-close:focus-visible {
  outline-offset: 3px;
}
.nav-dropdown-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.nav-links a:focus-visible::after {
  width: 100%;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 { color: var(--text); }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 600; line-height: 1.3; }
p { color: var(--text-secondary); }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; position: relative; }
.section-alt { background: var(--bg-alt); }
.section::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.15;
}
.section-header { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-header h2 {
  background: linear-gradient(135deg, var(--text), var(--text-secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.section-header p { margin-top: 16px; font-size: 1.1rem; }
.section-label {
  display: inline-block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent); margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(201,168,76,0.12), rgba(201,168,76,0.04));
  border: 1px solid rgba(201,168,76,0.15);
  padding: 6px 16px; border-radius: 100px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius-sm); font-weight: 600;
  font-size: 0.95rem; transition: all var(--transition); white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #e0be5a); color: #1a1a2e;
  box-shadow: 0 2px 8px rgba(201,168,76,0.3), 0 0 20px rgba(201,168,76,0.1);
  position: relative;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(201,168,76,0.4), 0 0 40px rgba(201,168,76,0.15);
}
.btn-secondary {
  border: 1px solid var(--border); color: var(--text);
  background: rgba(255,255,255,0.05); backdrop-filter: blur(8px);
}
[data-theme="dark"] .btn-secondary { background: rgba(255,255,255,0.05); }
.btn-secondary:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(201,168,76,0.08);
  box-shadow: 0 0 20px rgba(201,168,76,0.1);
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}
[data-theme="dark"] .card {
  background: rgba(26,32,48,0.6);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 0 0 1px rgba(201,168,76,0.15);
  border-color: rgba(201,168,76,0.3);
}
[data-theme="dark"] .card:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 30px rgba(201,168,76,0.06);
  border-color: rgba(201,168,76,0.25);
}

/* ===== GRID ===== */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ===== PROMO BANNER ===== */
.promo-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
  color: #fff; text-align: center; padding: 10px 24px;
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.01em;
  position: fixed; top: 0; left: 0; right: 0; z-index: 1001;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.promo-banner strong { font-weight: 700; }
.promo-banner a {
  color: #fff; text-decoration: underline; text-underline-offset: 2px;
  font-weight: 600; transition: opacity var(--transition);
}
.promo-banner a:hover { opacity: 0.85; }
.promo-banner .promo-close {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: rgba(255,255,255,0.7); font-size: 1rem;
  transition: all var(--transition); cursor: pointer;
}
.promo-banner .promo-close:hover { background: rgba(255,255,255,0.15); color: #fff; }
.promo-banner.hidden { display: none; }
[data-theme="dark"] .promo-banner {
  background: linear-gradient(135deg, #0f1520 0%, #1a2540 50%, #2a2a1a 100%);
  border-bottom: 1px solid rgba(201,168,76,0.2);
}
body.has-promo .navbar { top: var(--promo-height, 0px); }
body.has-promo { scroll-padding-top: calc(var(--nav-height) + var(--promo-height, 0px)); }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height); display: flex; align-items: center;
  background: transparent; transition: all var(--transition);
}
.navbar.scrolled {
  background: rgba(255,255,255,0.8); backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(229,231,235,0.5);
  box-shadow: 0 1px 8px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.02);
}
[data-theme="dark"] .navbar.scrolled {
  background: rgba(15,18,25,0.8);
  border-bottom-color: rgba(42,51,72,0.5);
  box-shadow: 0 1px 8px rgba(0,0,0,0.2);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-logo { display: flex; align-items: center; font-weight: 700; font-size: 1.2rem; z-index: 1001; }
.nav-logo svg { width: 32px; height: 32px; margin-right: 10px; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500; color: var(--text-light);
  transition: color var(--transition); position: relative;
}
[data-theme="dark"] .nav-links a { color: var(--text-secondary); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0;
  height: 2px; background: var(--accent); transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 12px; z-index: 1001; }
.nav-cta { padding: 10px 24px; font-size: 0.85rem; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; transition: all var(--transition);
  background: var(--bg-alt); border: 1px solid var(--border);
}
.theme-toggle:hover { background: var(--accent-light); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  display: flex; align-items: center; gap: 4px; cursor: pointer;
  font-size: 0.9rem; font-weight: 500; color: var(--text-light);
  transition: color var(--transition); position: relative;
}
[data-theme="dark"] .nav-dropdown-trigger { color: var(--text-secondary); }
.nav-dropdown-trigger svg {
  width: 14px; height: 14px; transition: transform var(--transition);
}
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown.open .nav-dropdown-trigger { color: var(--text); }
.nav-dropdown:hover .nav-dropdown-trigger svg,
.nav-dropdown.open .nav-dropdown-trigger svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 220px; padding: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  transition: all var(--transition);
  z-index: 1002;
}
[data-theme="dark"] .nav-dropdown-menu {
  background: #1a2030;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu a {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: 6px; font-size: 0.88rem; color: var(--text-secondary);
  transition: all var(--transition);
}
.nav-dropdown-menu a:hover {
  background: var(--bg-alt); color: var(--text);
}
.nav-dropdown-menu a::after { display: none; }
.nav-dropdown-menu a svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

/* Hamburger */
.nav-hamburger {
  display: none; width: 40px; height: 40px; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px; z-index: 1001;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px; background: var(--text);
  transition: all var(--transition); border-radius: 2px;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 767px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg); flex-direction: column; justify-content: center;
    gap: 28px; opacity: 0; pointer-events: none; transition: opacity var(--transition);
  }
  .nav-links.open { opacity: 1; pointer-events: all; }
  .nav-links a { font-size: 1.3rem; }
  .nav-cta { display: none; }
  .nav-dropdown-trigger { font-size: 1.3rem; justify-content: center; }
  .nav-dropdown-trigger svg { width: 18px; height: 18px; }
  .nav-dropdown-menu {
    position: static; transform: none; opacity: 1; visibility: visible;
    min-width: auto; background: transparent; border: none;
    box-shadow: none; padding: 8px 0 0; display: flex; flex-direction: column;
    align-items: center; gap: 4px;
  }
  [data-theme="dark"] .nav-dropdown-menu { background: transparent; box-shadow: none; }
  .nav-dropdown-menu a { font-size: 1rem; color: var(--text-light); justify-content: center; }
  .nav-dropdown-menu a svg { display: none; }
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(180deg, #111827 0%, #0a0f1a 100%);
  color: #d1d5db; padding: 64px 0 0; position: relative;
}
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.3), transparent);
}
[data-theme="dark"] .footer { background: linear-gradient(180deg, #080b12 0%, #040609 100%); }
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px; padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand p { margin-top: 16px; font-size: 0.9rem; line-height: 1.7; color: #9ca3af; max-width: 300px; }
.footer h4 { color: #fff; font-size: 0.9rem; font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-links a { display: block; padding: 6px 0; font-size: 0.88rem; color: #9ca3af; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 0; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 0.82rem; color: #6b7280; }
.footer-swiss { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: #6b7280; }

/* ===== ANIMATIONS ===== */
.animate-on-scroll {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
.animate-on-scroll:nth-child(2) { transition-delay: 0.08s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.16s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.24s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.32s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.12s; }
.animate-on-scroll:nth-child(7) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(8) { transition-delay: 0.28s; }

/* ===== FAQ WIDGET FLOTTANT ===== */
.faq-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 9998;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #e0be5a); color: #1a1a2e;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(201,168,76,0.4), 0 0 24px rgba(201,168,76,0.15);
  transition: all var(--transition); cursor: pointer;
  animation: faqPulse 3s ease-in-out infinite;
}
.faq-fab:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(201,168,76,0.5), 0 0 40px rgba(201,168,76,0.2); }
.faq-fab svg { width: 26px; height: 26px; }
.faq-fab.hidden { opacity: 0; pointer-events: none; transform: scale(0.5); }
@keyframes faqPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(201,168,76,0.4), 0 0 24px rgba(201,168,76,0.15); }
  50% { box-shadow: 0 4px 20px rgba(201,168,76,0.5), 0 0 36px rgba(201,168,76,0.25); }
}

.faq-widget {
  position: fixed; bottom: 28px; right: 28px; z-index: 9998;
  width: 390px; max-height: 520px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.04);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(20px) scale(0.95);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}
[data-theme="dark"] .faq-widget {
  background: #1a2030; box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
}
.faq-widget.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.faq-widget-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; background: var(--primary);
  color: #fff; flex-shrink: 0;
}
[data-theme="dark"] .faq-widget-header { background: #141a28; border-bottom: 1px solid var(--border); }
.faq-widget-header span { font-size: 0.95rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.faq-widget-header span svg { width: 18px; height: 18px; color: var(--accent); }
.faq-widget-close {
  width: 32px; height: 32px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; color: rgba(255,255,255,0.7);
  transition: all var(--transition); font-size: 1.2rem;
}
.faq-widget-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.faq-widget-body {
  flex: 1; overflow-y: auto; padding: 8px 0;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.faq-widget-body::-webkit-scrollbar { width: 4px; }
.faq-widget-body::-webkit-scrollbar-track { background: transparent; }
.faq-widget-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.faq-widget-item { border-bottom: 1px solid var(--border); }
.faq-widget-item:last-child { border-bottom: none; }
.faq-widget-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 20px; text-align: left;
  font-size: 0.88rem; font-weight: 500; color: var(--text);
  transition: all var(--transition); cursor: pointer;
}
.faq-widget-question:hover { background: var(--bg-alt); }
.faq-widget-question svg {
  width: 16px; height: 16px; flex-shrink: 0; color: var(--text-light);
  transition: transform var(--transition);
}
.faq-widget-item.active .faq-widget-question { color: var(--accent); }
.faq-widget-item.active .faq-widget-question svg { transform: rotate(180deg); color: var(--accent); }

.faq-widget-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.faq-widget-item.active .faq-widget-answer { max-height: 500px; }
.faq-widget-answer p {
  padding: 0 20px 14px; font-size: 0.84rem; line-height: 1.7;
  color: var(--text-secondary);
}

.faq-widget-footer {
  padding: 14px 20px; border-top: 1px solid var(--border); flex-shrink: 0;
  text-align: center;
}
.faq-widget-footer a {
  font-size: 0.85rem; font-weight: 600; color: var(--accent);
  transition: color var(--transition); display: inline-flex; align-items: center; gap: 6px;
}
.faq-widget-footer a:hover { color: var(--accent-hover); }
.faq-widget-footer a::after { display: none; }

@media (max-width: 767px) {
  .faq-fab { width: 48px; height: 48px; bottom: 20px; right: 20px; }
  .faq-fab svg { width: 22px; height: 22px; }
  .faq-widget {
    bottom: 0; right: 0; left: 0; width: 100%;
    max-height: 75vh; border-radius: 16px 16px 0 0;
  }
}
