/* ============================================
   Mon Contrat Santé — Style Principal
   Palette : bleu ciel #0ea5e9 / bleu marine #0c4a6e / blanc
   ============================================ */

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

:root {
  --blue-sky: #0ea5e9;
  --blue-navy: #0c4a6e;
  --blue-dark: #082f49;
  --blue-light: #e0f2fe;
  --blue-50: #f0f9ff;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --green: #10b981;
  --orange: #f59e0b;
  --red: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: 0.3s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-sky); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-navy); }

h1, h2, h3, h4 { color: var(--blue-navy); line-height: 1.3; font-weight: 700; }
h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.875rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.375rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.125rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; color: var(--gray-600); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ============================================
   Header / Navigation
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.header.scrolled { box-shadow: var(--shadow-md); }

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--blue-navy);
  text-decoration: none;
}

.logo svg { width: 36px; height: 36px; flex-shrink: 0; }
.logo span { color: var(--blue-sky); }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--transition);
  text-decoration: none;
}
.nav a:hover, .nav a.active { color: var(--blue-navy); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--blue-sky);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(14,165,233,0.3);
}
.btn-primary:hover {
  background: #0284c7;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(14,165,233,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--blue-navy);
  border: 2px solid var(--blue-navy);
}
.btn-secondary:hover { background: var(--blue-50); color: var(--blue-navy); }

.btn-large {
  padding: 0.875rem 2rem;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

.btn-white {
  background: var(--white);
  color: var(--blue-navy);
  box-shadow: var(--shadow-md);
}
.btn-white:hover { background: var(--blue-50); color: var(--blue-navy); transform: translateY(-1px); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--blue-navy);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--blue-navy) 0%, #0369a1 50%, var(--blue-sky) 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?w=1920&q=80') center/cover no-repeat;
  opacity: 0.08;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 80px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%23ffffff' d='M0,40 C360,80 720,0 1440,40 L1440,80 L0,80 Z'/%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
}

.hero .container { position: relative; z-index: 1; }

.hero-content {
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  padding: 0.375rem 1rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.2);
}

.hero h1 { color: var(--white); font-size: 2.75rem; margin-bottom: 1.25rem; }
.hero p { color: rgba(255,255,255,0.9); font-size: 1.125rem; margin-bottom: 2rem; max-width: 560px; }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.75rem; font-weight: 800; }
.hero-stat span { font-size: 0.8125rem; opacity: 0.8; }

/* ============================================
   Trust Badges
   ============================================ */
.trust-bar {
  background: var(--gray-50);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.trust-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
}

.trust-item svg { width: 20px; height: 20px; color: var(--green); flex-shrink: 0; }

/* ============================================
   Sections
   ============================================ */
.section { padding: 5rem 0; }
.section-alt { background: var(--gray-50); }

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header .overline {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-sky);
  margin-bottom: 0.75rem;
}

.section-header p { color: var(--gray-500); font-size: 1.0625rem; }

/* ============================================
   Cards
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  border-color: var(--blue-sky);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: var(--blue-50);
  color: var(--blue-sky);
}
.card-icon svg { width: 28px; height: 28px; }

.card h3 { margin-bottom: 0.75rem; }
.card p { font-size: 0.9375rem; margin-bottom: 1rem; }
.card .card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue-sky);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.card .card-link:hover { gap: 0.5rem; }

/* ============================================
   Comparison Table
   ============================================ */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  font-size: 0.9375rem;
}

.comparison-table thead th {
  background: var(--blue-navy);
  color: var(--white);
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
}

.comparison-table tbody td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
}

.comparison-table tbody tr:nth-child(even) { background: var(--gray-50); }
.comparison-table tbody tr:hover { background: var(--blue-50); }

.check-icon { color: var(--green); font-weight: 700; }
.cross-icon { color: var(--gray-400); }

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

.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--white);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue-navy);
  transition: background var(--transition);
}
.faq-question:hover { background: var(--blue-50); }

.faq-question svg {
  width: 20px; height: 20px;
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--blue-sky);
}

.faq-item.active .faq-question svg { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer { max-height: 500px; }

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--gray-600);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ============================================
   CTA Banner
   ============================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--blue-navy) 0%, #0369a1 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: rgba(14,165,233,0.2);
  border-radius: 50%;
  filter: blur(80px);
}

.cta-banner .container { position: relative; z-index: 1; }
.cta-banner h2 { color: var(--white); font-size: 2rem; margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,0.85); font-size: 1.0625rem; max-width: 560px; margin: 0 auto 2rem; }

/* ============================================
   Sidebar
   ============================================ */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

.sidebar { position: sticky; top: 90px; }

.sidebar-card {
  background: linear-gradient(135deg, var(--blue-navy), #0369a1);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.sidebar-card h3 { color: var(--white); margin-bottom: 0.75rem; font-size: 1.25rem; }
.sidebar-card p { color: rgba(255,255,255,0.85); font-size: 0.9375rem; margin-bottom: 1.5rem; }

.sidebar-card .btn-white { width: 100%; justify-content: center; }

.sidebar-badges {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.9);
}
.sidebar-badge svg { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; }

/* Sidebar TOC */
.sidebar-toc {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-toc h4 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-500); margin-bottom: 1rem; }
.sidebar-toc ul { list-style: none; }
.sidebar-toc li { margin-bottom: 0.5rem; }
.sidebar-toc a {
  font-size: 0.875rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}
.sidebar-toc a:hover { color: var(--blue-sky); }
.sidebar-toc a::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gray-300);
  flex-shrink: 0;
}

/* ============================================
   Content / Article
   ============================================ */
.article-content h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

.article-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.article-content ul, .article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--gray-600);
}
.article-content li { margin-bottom: 0.5rem; }

.article-content strong { color: var(--gray-800); }

.info-box {
  background: var(--blue-50);
  border-left: 4px solid var(--blue-sky);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.info-box p { margin-bottom: 0; color: var(--gray-700); }
.info-box strong { color: var(--blue-navy); }

.warning-box {
  background: #fffbeb;
  border-left: 4px solid var(--orange);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.warning-box p { margin-bottom: 0; color: var(--gray-700); }

/* ============================================
   Contact Form
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue-sky);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
}

.form-group textarea { resize: vertical; min-height: 140px; }

.contact-info-card {
  background: var(--blue-50);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-info-item:last-child { margin-bottom: 0; }
.contact-info-icon {
  width: 44px; height: 44px;
  background: var(--white);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--blue-sky);
  box-shadow: var(--shadow-sm);
}
.contact-info-icon svg { width: 20px; height: 20px; }
.contact-info-item h4 { margin-bottom: 0.25rem; font-size: 0.9375rem; }
.contact-info-item p { margin-bottom: 0; font-size: 0.875rem; }

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p { font-size: 0.875rem; margin-top: 1rem; line-height: 1.6; }
.footer-brand .logo { margin-bottom: 0.5rem; }
.footer-brand .logo span { color: var(--blue-sky); }

.footer h4 {
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.5rem; }
.footer ul a { color: rgba(255,255,255,0.6); font-size: 0.875rem; }
.footer ul a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
}

/* ============================================
   404 Page
   ============================================ */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-page h1 { font-size: 8rem; color: var(--blue-sky); margin-bottom: 0.5rem; line-height: 1; }
.error-page h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.error-page p { max-width: 420px; margin: 0 auto 2rem; }

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.8125rem;
  color: var(--gray-400);
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--blue-sky); }
.breadcrumb span { margin: 0 0.375rem; }

/* ============================================
   Page Hero (internal pages)
   ============================================ */
.page-hero {
  background: linear-gradient(135deg, var(--blue-navy) 0%, #0369a1 100%);
  color: var(--white);
  padding: 3rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?w=1920&q=80') center/cover no-repeat;
  opacity: 0.06;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); font-size: 2.25rem; margin-bottom: 0.75rem; }
.page-hero p { color: rgba(255,255,255,0.85); font-size: 1.0625rem; max-width: 600px; margin: 0; }

/* ============================================
   Animations (fade in on scroll)
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 3.5rem 0 3rem; }
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
  .section { padding: 3.5rem 0; }

  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--white);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    gap: 0.75rem;
    border-top: 1px solid var(--gray-200);
  }
  .menu-toggle { display: flex; }

  .card-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .trust-items { gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }

  .comparison-table { font-size: 0.8125rem; }
  .comparison-table thead th,
  .comparison-table tbody td { padding: 0.75rem 0.75rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.625rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
