/* =====================================================
   Top Choix France — Tech Blue Theme
   Site: topchoixfrancce.com
   Variant: Agrégateur Court
   ===================================================== */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.6; color: #1a2a3a; background: #f4f7fc;
  padding-bottom: 70px;
}
@media (min-width: 769px) { body { padding-bottom: 0; } }
img { max-width: 100%; height: auto; display: block; }
a { color: #1a73e8; text-decoration: none; transition: color 0.2s; }
a:hover { color: #0d47a1; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { line-height: 1.3; color: #0d1b2a; }

/* ---- Responsible Gaming Banner ---- */
.responsible-gaming-banner {
  background: #cc0000;
  color: #ffffff;
  padding: 16px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}
.responsible-gaming-banner p {
  margin: 0;
  color: #ffffff;
}
@media (min-width: 768px) {
  .responsible-gaming-banner {
    padding: 20px 24px;
    font-size: 18px;
  }
}

/* ---- Container ---- */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }

/* ---- Header (Desktop) ---- */
.site-header {
  background: #ffffff; border-bottom: 1px solid #e0e8f0;
  position: relative; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; max-width: 1120px; margin: 0 auto; padding: 0 16px;
}
.logo-link { display: flex; align-items: center; gap: 8px; }
.logo-link img { height: 36px; width: auto; }
.logo-text { font-size: 18px; font-weight: 700; color: #0d1b2a; }
.logo-text span { color: #1a73e8; }

/* ---- Desktop Nav ---- */
.main-nav { display: none; }
@media (min-width: 769px) {
  .main-nav { display: flex; align-items: center; gap: 24px; }
  .main-nav a {
    font-size: 14px; font-weight: 500; color: #3a5a7a;
    padding: 6px 0; transition: color 0.2s;
  }
  .main-nav a:hover, .main-nav a.active { color: #1a73e8; }
  .burger-btn { display: none !important; }
}

/* ---- Burger Button (Mobile) ---- */
.burger-btn {
  display: flex; flex-direction: column; justify-content: center;
  width: 32px; height: 32px; background: none; border: none; cursor: pointer;
  padding: 4px; gap: 5px;
}
.burger-btn span {
  display: block; width: 100%; height: 2px; background: #1a2a3a;
  border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
}
.burger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger-btn.active span:nth-child(2) { opacity: 0; }
.burger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- Mobile Menu ---- */
.mobile-menu {
  position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
  background: #ffffff; z-index: 99; display: none; overflow-y: auto;
  padding: 24px 16px;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: 14px 0; font-size: 16px; font-weight: 500;
  color: #1a2a3a; border-bottom: 1px solid #e8eef4;
}
.mobile-menu a:last-child { border-bottom: none; }

/* ---- Bottom Navigation (Mobile) ---- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: #ffffff; border-top: 1px solid #e0e8f0;
  display: flex; justify-content: space-around; align-items: center;
  height: 64px; padding: 0 4px;
}
@media (min-width: 769px) { .bottom-nav { display: none; } }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; color: #5a7a9a; padding: 6px 8px; border-radius: 8px;
  transition: color 0.2s, background 0.2s; min-width: 56px;
}
.bottom-nav a:hover, .bottom-nav a.active { color: #1a73e8; background: #e8f0fe; }
.bottom-nav a svg { width: 22px; height: 22px; display: block; }

/* ---- Page Hero ---- */
.page-hero {
  background: linear-gradient(135deg, #1a73e8 0%, #00bcd4 100%);
  padding: 48px 0 40px; color: #ffffff; text-align: center;
}
.page-hero h1 { font-size: 22px; font-weight: 700; color: #ffffff; margin-bottom: 12px; }
.page-hero p { font-size: 15px; line-height: 1.5; opacity: 0.9; max-width: 600px; margin: 0 auto; }
.page-hero .hero-ctas { margin-top: 20px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (min-width: 768px) {
  .page-hero { padding: 64px 0 56px; }
  .page-hero h1 { font-size: 30px; }
  .page-hero p { font-size: 17px; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-block; padding: 10px 24px; border-radius: 8px;
  font-size: 14px; font-weight: 600; text-align: center; cursor: pointer;
  border: none; transition: background 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: #ffffff; color: #1a73e8; }
.btn-primary:hover { background: #e8f0fe; color: #1a73e8; }
.btn-outline { background: transparent; color: #ffffff; border: 2px solid rgba(255,255,255,0.6); }
.btn-outline:hover { border-color: #ffffff; color: #ffffff; }
.btn-card { background: #e8f0fe; color: #1a73e8; width: 100%; }
.btn-card:hover { background: #d0e2fc; color: #0d47a1; }

/* ---- Sections ---- */
.section { padding: 40px 0; }
@media (min-width: 768px) { .section { padding: 56px 0; } }
.section-title {
  font-size: 20px; font-weight: 700; margin-bottom: 24px; text-align: center;
  color: #0d1b2a;
}
@media (min-width: 768px) { .section-title { font-size: 24px; margin-bottom: 32px; } }

/* ---- Explanation Block ---- */
.explain-block {
  background: #ffffff; border-radius: 12px; padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.explain-block p { margin-bottom: 12px; font-size: 15px; color: #2a4a6a; }
.explain-block p:last-child { margin-bottom: 0; }

/* ---- Criteria Row ---- */
.criteria-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media (min-width: 600px) {
  .criteria-grid { grid-template-columns: repeat(3, 1fr); }
  .criteria-grid .criterion:nth-child(4),
  .criteria-grid .criterion:nth-child(5) { grid-column: auto; }
}
@media (min-width: 600px) and (max-width: 767px) {
  /* 3+2 on tablet */
  .criteria-grid .criterion:nth-child(4),
  .criteria-grid .criterion:nth-child(5) { justify-self: center; width: 66%; }
}
@media (min-width: 768px) {
  .criteria-grid { grid-template-columns: repeat(3, 1fr); max-width: 700px; margin: 0 auto; }
  .criteria-grid .criterion:nth-child(4),
  .criteria-grid .criterion:nth-child(5) { grid-column: span 1; justify-self: center; width: 80%; }
}
.criterion {
  background: #ffffff; border-radius: 10px; padding: 20px 16px;
  text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #e8eef4;
}
.criterion-icon { margin-bottom: 8px; }
.criterion-icon svg { width: 28px; height: 28px; }
.criterion h3 { font-size: 13px; font-weight: 600; color: #0d1b2a; margin-bottom: 4px; }
.criterion p { font-size: 12px; color: #5a7a9a; line-height: 1.4; }

/* ---- Platform Cards (Single Column) ---- */
.platform-grid {
  display: grid; grid-template-columns: 1fr; gap: 20px;
  max-width: 520px; margin: 0 auto;
}
.platform-card {
  background: #ffffff; border-radius: 14px; padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07); border: 1px solid #e8eef4;
  display: flex; flex-direction: column; align-items: center; transition: box-shadow 0.2s;
}
.platform-card:hover { box-shadow: 0 6px 20px rgba(26,115,232,0.15); }
.platform-logo {
  width: 100%; text-align: center; margin-bottom: 14px;
  background: #f4f7fc; border-radius: 10px; padding: 20px;
  border: 1px solid #e8eef4;
}
.platform-logo img { max-height: 80px; width: auto; margin: 0 auto; object-fit: contain; }
.platform-title { font-size: 15px; font-weight: 600; text-align: center; color: #0d1b2a; margin-bottom: 6px; }

/* -- ANJ metadata block -- */
.anj-block {
  background: #f0f5ff; border: 1px solid #dce6f5; border-radius: 6px;
  padding: 8px 12px; margin-bottom: 12px; text-align: center;
}
.anj-label { font-size: 10px; font-weight: 600; color: #3a6a9a; text-transform: uppercase; letter-spacing: 0.5px; }
.anj-ref { font-size: 11px; color: #4a6a8a; margin-top: 2px; }

.platform-desc { font-size: 13px; color: #3a5a7a; line-height: 1.5; margin-bottom: 12px; flex-grow: 1; }
.platform-criteria { margin-bottom: 12px; }
.platform-criteria li {
  font-size: 12px; color: #4a6a8a; padding: 3px 0;
  display: flex; align-items: center; gap: 6px;
}
.platform-criteria li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #1a73e8; flex-shrink: 0; }

/* ---- FAQ ---- */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item {
  background: #ffffff; border: 1px solid #e8eef4; border-radius: 10px;
  margin-bottom: 8px; overflow: hidden;
}
.faq-question {
  width: 100%; padding: 16px 20px; background: none; border: none;
  font-size: 14px; font-weight: 500; color: #0d1b2a; text-align: left;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  transition: background 0.2s;
}
.faq-question:hover { background: #f8faff; }
.faq-question::after {
  content: '+'; font-size: 18px; color: #1a73e8; font-weight: 700;
  transition: transform 0.3s;
}
.faq-question.open::after { content: '−'; }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px; font-size: 14px; color: #3a5a7a; line-height: 1.6;
}
.faq-answer.open { max-height: 300px; padding: 0 20px 16px; }

/* ---- Pre-footer ---- */
.pre-footer {
  background: #ffffff; border-top: 1px solid #e0e8f0;
  padding: 32px 0;
}
.pre-footer-content { font-size: 13px; color: #4a6a8a; line-height: 1.7; }
.pre-footer-content p { margin-bottom: 10px; }
.pre-footer-content p:last-child { margin-bottom: 0; }

/* ---- Footer Resource Images ---- */
.footer-resources { padding: 32px 0; background: #f4f7fc; }
.footer-resources .section-title { font-size: 16px; margin-bottom: 16px; }
.resource-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  max-width: 600px; margin: 0 auto;
}
@media (min-width: 600px) { .resource-grid { grid-template-columns: repeat(3, 1fr); } }
.resource-grid a, .resource-grid .resource-img {
  display: block; border-radius: 8px; overflow: hidden;
  background: #1a73e8; border: 1px solid #1557b0;
  transition: box-shadow 0.2s;
}
.resource-grid a:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.resource-grid img { width: 100%; height: 60px; object-fit: contain; }

/* ---- Main Footer ---- */
.site-footer {
  background: #0d1b2a; color: #8aabca; padding: 32px 0 24px;
  font-size: 13px;
}
.footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 16px;
  display: grid; grid-template-columns: 1fr; gap: 24px;
}
@media (min-width: 600px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand p { margin-top: 8px; line-height: 1.6; color: #7a9aba; }
.footer-links h4 { color: #ffffff; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.footer-links a {
  display: block; padding: 4px 0; color: #8aabca; font-size: 13px;
}
.footer-links a:hover { color: #ffffff; }
.footer-bottom {
  max-width: 1120px; margin: 24px auto 0; padding: 16px 16px 0;
  border-top: 1px solid rgba(255,255,255,0.08); text-align: center;
  font-size: 12px; color: #5a7a9a;
}

/* ---- Internal Page ---- */
.page-content { padding: 32px 0; }
.page-content-inner {
  max-width: 780px; margin: 0 auto; background: #ffffff;
  border-radius: 12px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.page-content-inner h2 { font-size: 18px; color: #0d1b2a; margin: 24px 0 12px; }
.page-content-inner h3 { font-size: 16px; color: #1a2a3a; margin: 20px 0 10px; }
.page-content-inner p { margin-bottom: 12px; font-size: 14px; color: #3a5a7a; line-height: 1.7; }
.page-content-inner ul, .page-content-inner ol { margin: 12px 0; padding-left: 20px; }
.page-content-inner li { margin-bottom: 6px; font-size: 14px; color: #3a5a7a; line-height: 1.6; }
.page-content-inner ul li { list-style: disc; }
.page-content-inner ol li { list-style: decimal; }
.page-content-inner a { color: #1a73e8; text-decoration: underline; }

/* ---- Sidebar Documentation (Legal Pages) ---- */
.legal-layout { display: grid; gap: 24px; }
@media (min-width: 768px) {
  .legal-layout { grid-template-columns: 220px 1fr; }
}
.legal-sidebar { position: sticky; top: 80px; align-self: start; }
.legal-sidebar nav a {
  display: block; padding: 8px 12px; font-size: 13px; color: #3a5a7a;
  border-left: 2px solid transparent; margin-bottom: 4px; border-radius: 0 4px 4px 0;
}
.legal-sidebar nav a:hover, .legal-sidebar nav a.active {
  color: #1a73e8; border-left-color: #1a73e8; background: #f0f5ff;
}

/* ---- Age Gate Overlay ---- */
.age-gate {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10,20,30,0.85); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.age-gate.hidden { display: none; }
.age-gate-box {
  background: #ffffff; border-radius: 16px; padding: 32px 24px;
  max-width: 380px; width: 100%; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.age-gate-box h2 { font-size: 22px; margin-bottom: 8px; }
.age-gate-box p { font-size: 14px; color: #5a7a9a; margin-bottom: 20px; line-height: 1.5; }
.age-gate-btns { display: flex; gap: 12px; justify-content: center; }
.age-gate-btns .btn { min-width: 120px; }
.btn-yes { background: #1a73e8; color: #ffffff; }
.btn-yes:hover { background: #1557b0; color: #ffffff; }
.btn-no { background: #e8eef4; color: #3a5a7a; }
.btn-no:hover { background: #d0dae6; }

/* ---- Cookie Banner ---- */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 8000;
  background: #ffffff; border-top: 1px solid #e0e8f0;
  padding: 16px 20px; box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
  display: none;
}
.cookie-banner.visible { display: block; }
.cookie-banner-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px;
}
@media (min-width: 600px) {
  .cookie-banner-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}
.cookie-banner p { font-size: 13px; color: #3a5a7a; line-height: 1.5; }
.cookie-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-btns .btn { font-size: 13px; padding: 8px 16px; }
.btn-cookie-accept { background: #1a73e8; color: #ffffff; }
.btn-cookie-accept:hover { background: #1557b0; color: #ffffff; }
.btn-cookie-refuse { background: #e8eef4; color: #3a5a7a; }
.btn-cookie-refuse:hover { background: #d0dae6; }

/* ---- Intermediary / Selection Pages ---- */
.intermediary-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.intermediary-box {
  background: #ffffff; border-radius: 16px; padding: 32px 24px;
  max-width: 440px; width: 100%; text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.intermediary-box .loader { margin: 0 auto 20px; }
.intermediary-box h2 { font-size: 18px; margin-bottom: 12px; }
.intermediary-box p { font-size: 14px; color: #5a7a9a; margin-bottom: 8px; line-height: 1.5; }
.intermediary-box .fallback-btn { margin-top: 20px; }

/* ---- Simple Loader Spinner ---- */
.loader { width: 40px; height: 40px; border: 3px solid #e0e8f0; border-top: 3px solid #1a73e8; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Contact Page ---- */
.contact-email { font-size: 18px; font-weight: 600; color: #1a73e8; text-align: center; padding: 16px; background: #f0f5ff; border-radius: 8px; margin: 16px 0; }

/* ---- Thank You / Merci Page ---- */
.merci-icon { text-align: center; margin-bottom: 16px; }
.merci-icon svg { width: 48px; height: 48px; }

/* ---- Helpers ---- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #e8eef4; }
::-webkit-scrollbar-thumb { background: #b0c4de; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #8aabca; }

/* ---- Print ---- */
@media print { .bottom-nav, .cookie-banner, .age-gate { display: none !important; } }
