/* ============================================
   ForMadOk.fr — Design System
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --color-primary: #1e3a5f;
  --color-primary-light: #2d5a8e;
  --color-primary-dark: #0f2440;
  --color-secondary: #0d9488;
  --color-secondary-light: #14b8a6;
  --color-accent: #f59e0b;
  --color-accent-light: #fbbf24;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-warning: #f97316;
  --color-bg: #f8fafc;
  --color-bg-alt: #f1f5f9;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-text-lighter: #94a3b8;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.12);
  --shadow-xl: 0 20px 48px rgba(0,0,0,.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --max-width: 1200px;
  --nav-height: 64px;
  --transition: 0.2s cubic-bezier(.4,0,.2,1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-secondary); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--alt { background: var(--color-bg-alt); }

/* --- Navigation --- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-height); max-width: var(--max-width);
  margin: 0 auto; padding: 0 20px;
}
.nav__logo {
  font-size: 22px; font-weight: 800; color: var(--color-primary);
  display: flex; align-items: center; gap: 8px;
}
.nav__logo span { color: var(--color-secondary); }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a {
  font-size: 14px; font-weight: 500; color: var(--color-text-light);
  padding: 6px 0; position: relative;
}
.nav__links a:hover { color: var(--color-primary); }
.nav__links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0;
  height: 2px; background: var(--color-secondary);
  transition: width var(--transition);
}
.nav__links a:hover::after { width: 100%; }
.nav__cta {
  background: var(--color-primary); color: #fff !important;
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
}
.nav__cta:hover { background: var(--color-primary-light); color: #fff !important; }
.nav__burger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--color-text); border-radius: 2px; transition: var(--transition); }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
  color: #fff; padding: 80px 0 88px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(13,148,136,.25) 0%, transparent 60%);
}
.hero__content { position: relative; z-index: 1; text-align: center; max-width: 720px; margin: 0 auto; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  padding: 6px 16px; border-radius: 50px; font-size: 13px; font-weight: 500;
  margin-bottom: 24px; backdrop-filter: blur(8px);
}
.hero__badge::before { content: '✦'; color: var(--color-accent); }
.hero h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--color-accent-light); }
.hero p { font-size: 18px; color: rgba(255,255,255,.8); margin-bottom: 32px; line-height: 1.6; }

/* --- Search Box --- */
.search-box {
  background: var(--color-surface); border-radius: var(--radius-lg);
  padding: 6px; display: flex; gap: 6px; box-shadow: var(--shadow-xl);
  max-width: 600px; margin: 0 auto;
}
.search-box input {
  flex: 1; border: none; outline: none; padding: 14px 20px;
  font-size: 15px; font-family: var(--font-sans); color: var(--color-text);
  border-radius: var(--radius-md); background: transparent;
}
.search-box input::placeholder { color: var(--color-text-lighter); }
.search-box button {
  background: var(--color-secondary); color: #fff;
  padding: 14px 28px; border-radius: var(--radius-md);
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background var(--transition);
}
.search-box button:hover { background: var(--color-secondary-light); }

/* --- Stats Bar --- */
.stats-bar {
  display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
  margin-top: 40px;
}
.stats-bar__item { text-align: center; }
.stats-bar__number { font-size: 28px; font-weight: 800; color: #fff; }
.stats-bar__label { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 2px; }

/* --- Cards --- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.card {
  background: var(--color-surface); border-radius: var(--radius-lg);
  border: 1px solid var(--color-border); padding: 28px;
  transition: all var(--transition); position: relative; overflow: hidden;
}
.card:hover { border-color: var(--color-secondary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card__tag {
  display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; padding: 4px 10px; border-radius: 50px;
  background: rgba(13,148,136,.1); color: var(--color-secondary);
  margin-bottom: 12px;
}
.card__title { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--color-text); line-height: 1.3; }
.card__title a { color: inherit; }
.card__title a:hover { color: var(--color-secondary); }
.card__desc { font-size: 14px; color: var(--color-text-light); line-height: 1.6; margin-bottom: 16px; }
.card__meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--color-text-lighter); }
.card__meta-item { display: flex; align-items: center; gap: 4px; }

/* --- Badges --- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 50px; font-size: 12px; font-weight: 600;
}
.badge--qualiopi { background: #ecfdf5; color: #059669; }
.badge--cpf { background: #eff6ff; color: #2563eb; }
.badge--rncp { background: #fef3c7; color: #d97706; }
.badge--niveau { background: #f1f5f9; color: var(--color-text-light); }

/* --- Section Headers --- */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: clamp(24px, 3.5vw, 36px); font-weight: 800; margin-bottom: 12px; }
.section-header p { font-size: 16px; color: var(--color-text-light); max-width: 560px; margin: 0 auto; }

/* --- Breadcrumbs --- */
.breadcrumbs { padding: 16px 0; font-size: 13px; color: var(--color-text-lighter); }
.breadcrumbs a { color: var(--color-text-light); }
.breadcrumbs a:hover { color: var(--color-secondary); }
.breadcrumbs span { margin: 0 6px; }

/* --- Page Header --- */
.page-header { padding: 40px 0 32px; border-bottom: 1px solid var(--color-border); background: var(--color-surface); }
.page-header h1 { font-size: clamp(22px, 3.5vw, 32px); font-weight: 800; margin-bottom: 8px; }
.page-header p { font-size: 16px; color: var(--color-text-light); max-width: 640px; }

/* --- Content Blocks --- */
.content-block { background: var(--color-surface); border-radius: var(--radius-lg); border: 1px solid var(--color-border); padding: 32px; margin-bottom: 24px; }
.content-block h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--color-bg-alt); }
.content-block h3 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
.content-block p { margin-bottom: 12px; color: var(--color-text); line-height: 1.7; }
.content-block ul { margin: 12px 0; padding-left: 20px; }
.content-block ul li { margin-bottom: 6px; position: relative; padding-left: 16px; color: var(--color-text); }
.content-block ul li::before { content: '›'; position: absolute; left: 0; color: var(--color-secondary); font-weight: 700; }

/* --- Info Table --- */
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.info-table th { font-weight: 600; color: var(--color-text-light); width: 35%; background: var(--color-bg); }
.info-table td { color: var(--color-text); }

/* --- FAQ Accordion --- */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item summary {
  padding: 16px 0; cursor: pointer; font-weight: 600; font-size: 15px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 20px; color: var(--color-text-lighter); transition: transform var(--transition); }
.faq-item[open] summary::after { content: '−'; }
.faq-item .faq-answer { padding: 0 0 16px; font-size: 14px; color: var(--color-text-light); line-height: 1.7; }

/* --- Footer --- */
.footer { background: var(--color-primary-dark); color: rgba(255,255,255,.7); padding: 64px 0 32px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer__brand p { font-size: 14px; line-height: 1.7; margin-top: 12px; max-width: 280px; }
.footer h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: .5px; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { color: rgba(255,255,255,.6); font-size: 14px; }
.footer ul a:hover { color: var(--color-accent-light); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(255,255,255,.4); flex-wrap: wrap; gap: 12px;
}
.footer__data-source { font-size: 11px; color: rgba(255,255,255,.3); margin-top: 8px; }

/* --- Sidebar Layout --- */
.layout-sidebar { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.sidebar { position: sticky; top: calc(var(--nav-height) + 24px); }
.sidebar-block { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.sidebar-block h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; transition: all var(--transition);
}
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-light); color: #fff; }
.btn--secondary { background: var(--color-secondary); color: #fff; }
.btn--secondary:hover { background: var(--color-secondary-light); color: #fff; }
.btn--outline { border: 1px solid var(--color-border); color: var(--color-text); background: var(--color-surface); }
.btn--outline:hover { border-color: var(--color-secondary); color: var(--color-secondary); }

/* --- Responsive --- */
@media (max-width: 968px) {
  .layout-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__links.active {
    display: flex; flex-direction: column; position: absolute;
    top: var(--nav-height); left: 0; right: 0;
    background: var(--color-surface); border-bottom: 1px solid var(--color-border);
    padding: 20px; gap: 12px; box-shadow: var(--shadow-lg);
  }
  .hero { padding: 48px 0 56px; }
  .stats-bar { gap: 24px; }
  .stats-bar__number { font-size: 22px; }
  .card-grid { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .search-box { flex-direction: column; }
  .search-box button { width: 100%; justify-content: center; }
}
