/* ==========================================================================
   MatureConnect — Design system
   ========================================================================== */

:root {
  --primary: #7B1E3A;
  --primary-dark: #5A1329;
  --primary-light: #A34364;
  --secondary: #D4A373;
  --secondary-light: #F1E0CB;
  --cream: #FBF6F1;
  --ink: #2C1F24;
  --ink-soft: #6B5A5F;
  --border: #E8DDD3;
  --success: #4C8C6B;
  --white: #FFFFFF;

  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(44, 31, 36, 0.06);
  --shadow-md: 0 8px 24px rgba(44, 31, 36, 0.10);
  --shadow-lg: 0 20px 48px rgba(44, 31, 36, 0.16);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-3);
  color: var(--primary-dark);
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 var(--space-3); color: var(--ink-soft); }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { padding: 0; margin: 0; list-style: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

section { padding: var(--space-7) 0; }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--secondary-light);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: var(--space-3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--white); color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary); color: var(--white); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 246, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--space-4);
  gap: var(--space-4);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-size: 1.2rem; color: var(--primary-dark);
  flex-shrink: 0;
}
.logo strong { color: var(--primary); }
.main-nav { display: flex; gap: var(--space-4); flex: 1; justify-content: center; }
.main-nav a { font-weight: 600; color: var(--ink); font-size: 0.95rem; padding: 8px 0; position: relative; }
.main-nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--primary);
  transition: width 0.25s ease;
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--primary); }
.header-cta { flex-shrink: 0; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--primary-dark); }

/* Hero */
.hero {
  position: relative;
  padding: var(--space-8) 0 var(--space-7);
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-6); align-items: center;
}
.hero-text p.lead { font-size: 1.15rem; }
.hero-stats { display: flex; gap: var(--space-5); margin: var(--space-5) 0; }
.hero-stat strong { display: block; font-family: var(--font-heading); font-size: 1.8rem; color: var(--primary); }
.hero-stat span { font-size: 0.85rem; color: var(--ink-soft); }
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.hero-image { position: relative; }
.hero-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; height: 480px; object-fit: cover;
}
.hero-badge {
  position: absolute; bottom: -20px; left: -20px;
  background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  padding: 14px 18px; display: flex; align-items: center; gap: 10px; max-width: 240px;
}
.hero-badge i { color: var(--success); flex-shrink: 0; }
.hero-badge span { font-size: 0.85rem; font-weight: 600; color: var(--ink); }

/* Cards grid generic */
.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.icon-badge {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--secondary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-3);
}

/* Section header */
.section-head { max-width: 680px; margin: 0 auto var(--space-6); text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }

/* Platform comparison cards */
.platform-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
  display: grid;
  grid-template-columns: 200px 1fr 220px;
  gap: var(--space-5);
  align-items: center;
  margin-bottom: var(--space-4);
  position: relative;
}
.platform-card.featured { border: 2px solid var(--secondary); }
.platform-rank-badge {
  position: absolute; top: -14px; left: 24px;
  background: var(--primary); color: var(--white);
  font-size: 0.78rem; font-weight: 700;
  padding: 5px 14px; border-radius: 999px;
}
.platform-identity { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.platform-logo-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--secondary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.4rem;
}
.stars { display: flex; align-items: center; gap: 4px; color: var(--secondary); }
.stars .note { font-weight: 700; color: var(--ink); margin-left: 6px; }
.platform-points { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.platform-points ul li { display: flex; gap: 8px; font-size: 0.9rem; margin-bottom: 6px; align-items: flex-start; }
.platform-points ul li i { flex-shrink: 0; margin-top: 3px; }
.points-forts i { color: var(--success); }
.points-faibles i { color: var(--primary); }
.platform-cta { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.platform-price { font-weight: 700; color: var(--primary-dark); }

/* Table */
.compare-table-wrap { overflow-x: auto; margin-bottom: var(--space-6); }
table.compare-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
table.compare-table th, table.compare-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
table.compare-table th { background: var(--primary); color: var(--white); font-weight: 700; }
table.compare-table tr:last-child td { border-bottom: none; }

/* Profiles */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.profile-card { text-align: center; padding-bottom: var(--space-4); display: flex; flex-direction: column; }
.profile-photo { width: 100%; height: 220px; object-fit: cover; border-radius: var(--radius-md); margin-bottom: var(--space-3); }
.profile-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; color: var(--primary-dark); }
.profile-meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: var(--space-3); }
.profile-contact-btn { margin-top: auto; }
.profile-note {
  background: var(--secondary-light); color: var(--primary-dark);
  font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  display: inline-block; margin-top: 6px;
}
.profile-section-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: var(--space-3); }

/* Villes */
.ville-chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.ville-chip {
  background: var(--white); border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 18px; font-weight: 600; font-size: 0.9rem; color: var(--ink);
  transition: all 0.2s ease;
}
.ville-chip:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }
.region-block { margin-bottom: var(--space-5); }
.region-title { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; color: var(--primary); margin-bottom: var(--space-3); font-weight: 700; font-family: var(--font-body); }

/* Régions / départements — cartes hub pSEO */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-2);
}
.dept-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dept-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--secondary); }
.dept-card-code {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--secondary-light); color: var(--primary-dark);
  font-family: var(--font-heading); font-weight: 700; font-size: 0.85rem;
  margin-bottom: 4px;
}
.dept-card-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; color: var(--primary-dark); }
.dept-card-link { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; }
.dept-card-link i { width: 14px; height: 14px; }

/* Breadcrumb */
.breadcrumb { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: var(--space-4); }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--primary); }

/* City / thematic page hero */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: var(--space-7) 0 var(--space-6);
}
.page-hero h1, .page-hero p { color: var(--white); }
.page-hero .breadcrumb, .page-hero .breadcrumb a { color: rgba(255,255,255,0.75); }

.stat-strip { display: flex; gap: var(--space-6); flex-wrap: wrap; margin-top: var(--space-4); }
.stat-strip div strong { display: block; font-size: 1.6rem; font-family: var(--font-heading); }
.stat-strip div span { font-size: 0.82rem; opacity: 0.85; }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--border); padding: var(--space-3) 0; }
.faq-question {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-weight: 700; font-size: 1.02rem; color: var(--ink);
}
.faq-question i { transition: transform 0.25s ease; color: var(--primary); flex-shrink: 0; }
.faq-item.open .faq-question i { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-answer { max-height: 600px; padding-top: var(--space-3); }

/* Guides */
.guide-hero-img { width: 100%; height: 340px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); margin: var(--space-5) 0; }
.guide-content h2 { margin-top: var(--space-6); }
.guide-content ul, .guide-content ol { margin: 0 0 var(--space-4); padding-left: 1.4rem; list-style: disc; }
.guide-content ol { list-style: decimal; }
.guide-content li { margin-bottom: 8px; color: var(--ink-soft); }
.callout {
  background: var(--secondary-light); border-left: 4px solid var(--secondary);
  border-radius: var(--radius-sm); padding: var(--space-4); margin: var(--space-5) 0;
}
.callout.danger { background: #FBE9E7; border-color: var(--primary); }
.callout strong { color: var(--primary-dark); }

/* Widget / calculator */
.widget-box {
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: var(--space-5); border: 1px solid var(--border);
}
.widget-box label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.widget-box select, .widget-box input[type="range"] {
  width: 100%; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  font-family: var(--font-body); font-size: 0.95rem; margin-bottom: var(--space-4); background: var(--cream);
}
.widget-result {
  background: var(--cream); border-radius: var(--radius-md); padding: var(--space-4);
  margin-top: var(--space-4); border: 1px dashed var(--secondary);
}
.widget-result .result-value { font-family: var(--font-heading); font-size: 2rem; color: var(--primary); }

/* Forms (contact) */
.form-field { margin-bottom: var(--space-4); }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  font-family: var(--font-body); font-size: 0.95rem; background: var(--white);
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--primary); }

/* Admin */
.admin-box { max-width: 520px; margin: var(--space-8) auto; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); }
.admin-table th, .admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 0.85rem; text-align: left; }
.admin-table img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: var(--space-4); font-size: 0.9rem; }
.alert-success { background: #E4F3EA; color: var(--success); }
.alert-error { background: #FBE4E4; color: #B23A3A; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  color: var(--white);
}
.cta-band h2, .cta-band p { color: var(--white); }

/* Footer */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,0.85); padding: var(--space-7) 0 var(--space-4); margin-top: var(--space-7); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-5); }
.footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.9rem; margin-top: var(--space-3); }
.footer-brand .logo { color: var(--white); }
.footer-col h3 { color: var(--white); font-family: var(--font-body); font-size: 0.95rem; margin-bottom: var(--space-3); }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-col a:hover { color: var(--secondary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); margin-top: var(--space-6); padding-top: var(--space-4); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; color: rgba(255,255,255,0.55); }

/* Reveal on scroll */
.reveal-on-scroll { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-on-scroll.revealed { opacity: 1; transform: translateY(0); }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--space-3) 0; }
.tag { background: var(--secondary-light); color: var(--primary-dark); font-size: 0.8rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-image { order: -1; }
  .hero-image img { height: 320px; }
  .platform-card { grid-template-columns: 1fr; text-align: center; }
  .platform-identity { align-items: center; }
  .platform-points { grid-template-columns: 1fr; text-align: left; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: repeat(3, 1fr); }
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); flex-direction: column; padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border); display: none; gap: var(--space-2);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-stats { gap: var(--space-4); flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  section { padding: var(--space-6) 0; }
  .profile-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .profile-grid .profile-photo { height: 150px; }
  .profile-grid .profile-name { font-size: 0.92rem; }
  .profile-grid .profile-meta { font-size: 0.75rem; margin-bottom: var(--space-2); }
  .profile-grid .btn { padding: 10px 12px; font-size: 0.78rem; }
  .dept-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-badge { display: none; }
  .btn { width: 100%; }
  .hero-actions .btn { width: auto; }
  .profile-grid { gap: var(--space-2); }
}