/* ============================================================
   TESTQI.FR — main.css
   Styles globaux : variables, reset, typographie, layout,
   composants réutilisables (header, footer, boutons, etc.)
   ============================================================ */

/* ─── Variables CSS ──────────────────────────────────────── */
:root {
  --color-primary:   #1B2E4B;   /* bleu nuit */
  --color-accent:    #F5A623;   /* or */
  --color-success:   #27AE60;   /* vert */
  --color-danger:    #E74C3C;   /* rouge */
  --color-warning:   #F39C12;   /* orange */
  --color-info:      #2980B9;   /* bleu info */
  --color-text:      #1a1a2e;
  --color-text-light:#6b7280;
  --color-bg:        #f8f9fc;
  --color-white:     #ffffff;
  --color-border:    #e5e7eb;
  --color-card:      #ffffff;

  /* Couleurs de score QI */
  --color-iq-low:    #E74C3C;   /* < 85 */
  --color-iq-avg:    #F39C12;   /* 85-99 */
  --color-iq-good:   #27AE60;   /* 100-115 */
  --color-iq-high:   #2980B9;   /* 115-130 */
  --color-iq-genius: #8E44AD;   /* > 130 */

  --font-main:       'Inter', sans-serif;
  --border-radius:   10px;
  --border-radius-lg:16px;
  --shadow:          0 2px 12px rgba(0,0,0,0.08);
  --shadow-md:       0 4px 24px rgba(0,0,0,0.12);
  --shadow-lg:       0 8px 40px rgba(0,0,0,0.16);

  --transition:      0.2s ease;
  --container-max:   1100px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ─── Conteneur ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Typographie ────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.text-center { text-align: center; }
.text-muted  { color: var(--color-text-light); }

/* ─── Boutons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--border-radius);
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: #e8961a;
  border-color: #e8961a;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245,166,35,0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-white {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}
.btn-white:hover { background: var(--color-bg); }

.btn-lg {
  padding: 18px 36px;
  font-size: 1.1rem;
  border-radius: 12px;
}

.btn-full { width: 100%; }

/* ─── Header fixe ────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
}
.logo-icon { width: 36px; height: 36px; flex-shrink: 0; }
.logo span  { color: var(--color-accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-nav a {
  font-weight: 500;
  color: var(--color-text-light);
  transition: color var(--transition);
}
.site-nav a:hover { color: var(--color-primary); }

/* ─── Espacement header ──────────────────────────────────── */
.header-spacer { height: 68px; }

/* ─── Footer ─────────────────────────────────────────────── */
#site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.75);
  padding: 48px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}

.footer-brand .logo { color: var(--color-white); margin-bottom: 12px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.6; }

.footer-col h4 {
  color: var(--color-white);
  margin-bottom: 16px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer-col ul a:hover { color: var(--color-white); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}

.footer-badges { display: flex; align-items: center; gap: 16px; }
.badge-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
}

/* ─── Sections communes ──────────────────────────────────── */
.section     { padding: 80px 0; }
.section-alt { background: var(--color-white); }

.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { margin-bottom: 16px; }
.section-header p  { color: var(--color-text-light); max-width: 560px; margin: 0 auto; }

.section-label {
  display: inline-block;
  background: rgba(245,166,35,0.12);
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--color-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  padding: 28px;
}

/* ─── Grilles ────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #243d5e 100%);
  color: var(--color-white);
  padding: 100px 0 80px;
  text-align: center;
}
.hero h1 { color: var(--color-white); margin-bottom: 20px; }
.hero .tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
}

/* ─── Anti-arnaque ───────────────────────────────────────── */
.anti-arnaque {
  background: rgba(39,174,96,0.08);
  border: 2px solid var(--color-success);
  border-radius: var(--border-radius-lg);
  padding: 20px 28px;
  margin: 40px auto;
  max-width: 740px;
}
.anti-arnaque .aa-title {
  font-weight: 700;
  color: var(--color-success);
  margin-bottom: 6px;
  font-size: 1rem;
}
.anti-arnaque p { font-size: 0.95rem; margin: 0; color: var(--color-text-light); }

/* ─── Etapes ─────────────────────────────────────────────── */
.steps {
  display: flex;
  gap: 0;
  justify-content: center;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 36px;
  left: 18%;
  right: 18%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  z-index: 0;
}
.step { flex: 1; max-width: 280px; text-align: center; padding: 0 24px; position: relative; z-index: 1; }
.step-number {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(245,166,35,0.35);
}
.step h3 { margin-bottom: 8px; }
.step p   { font-size: 0.9rem; color: var(--color-text-light); }

/* ─── Stats sociales ─────────────────────────────────────── */
.social-stats {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 64px 0;
  text-align: center;
}
.social-stats h2 { color: var(--color-white); margin-bottom: 12px; }
.stats-counter {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--color-accent);
  display: block;
  line-height: 1;
  margin-bottom: 8px;
}
.stats-subtitle { color: rgba(255,255,255,0.75); font-size: 1rem; }

/* ─── Temoignages ────────────────────────────────────────── */
.testimonial {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}
.testimonial-stars { color: var(--color-accent); font-size: 1.1rem; margin-bottom: 12px; }
.testimonial-text  { font-size: 0.95rem; font-style: italic; margin-bottom: 16px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.author-name { font-weight: 600; font-size: 0.9rem; }
.author-meta { font-size: 0.8rem; color: var(--color-text-light); }

/* ─── FAQ accordion ──────────────────────────────────────── */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  margin-bottom: 10px;
  background: var(--color-white);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 24px;
  text-align: left;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--color-bg); }
.faq-icon { font-size: 1.2rem; color: var(--color-accent); flex-shrink: 0; transition: transform var(--transition); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-answer-inner { padding: 0 24px 20px; font-size: 0.95rem; color: var(--color-text-light); line-height: 1.75; }
.faq-item.open .faq-answer { max-height: 500px; }

/* ─── Bloc SEO ───────────────────────────────────────────── */
.seo-block {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: 48px;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}
.seo-block h2 { margin-bottom: 20px; }
.seo-block h3 { margin: 28px 0 12px; color: var(--color-primary); }
.seo-block p  { color: var(--color-text-light); line-height: 1.8; }

/* ─── Banniere cookies RGPD ──────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
#cookie-banner p { font-size: 0.88rem; margin: 0; color: rgba(255,255,255,0.85); }
#cookie-banner a { color: var(--color-accent); text-decoration: underline; }
.cookie-actions  { display: flex; gap: 10px; flex-shrink: 0; }
.btn-cookie-accept {
  background: var(--color-accent);
  color: var(--color-primary);
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.btn-cookie-refuse {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* ─── Barre de réassurance ───────────────────────────────── */
.reassurance-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  padding: 16px 0;
  font-size: 0.88rem;
  color: var(--color-text-light);
}
.reassurance-bar span { display: flex; align-items: center; gap: 6px; }

/* ─── Utilitaires ────────────────────────────────────────── */
.hidden  { display: none !important; }
.mt-8    { margin-top: 8px; }
.mt-16   { margin-top: 16px; }
.mt-24   { margin-top: 24px; }
.mt-32   { margin-top: 32px; }
.mb-8    { margin-bottom: 8px; }
.mb-16   { margin-bottom: 16px; }
.mb-24   { margin-bottom: 24px; }
.mb-32   { margin-bottom: 32px; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-3   { grid-template-columns: 1fr; }
  .grid-4   { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps    { flex-direction: column; align-items: center; gap: 32px; }
  .steps::before { display: none; }
  .step     { max-width: 400px; }
}

@media (max-width: 640px) {
  .container  { padding: 0 16px; }
  .section    { padding: 56px 0; }
  .hero       { padding: 72px 0 56px; }
  .grid-2     { grid-template-columns: 1fr; }
  .grid-4     { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-badges { justify-content: center; }
  .site-nav   { display: none; }
  .seo-block  { padding: 28px 20px; }
  #cookie-banner { flex-direction: column; }
  .reassurance-bar { flex-direction: column; gap: 10px; }
  .hero-badges { flex-direction: column; align-items: center; }
}
