/* =========================================================
   Livres Blancs Pro — CSS vanilla
   Design tokens: #35194D (primary), #270346 (dark), #2977C9 (accent)
   ========================================================= */

:root {
  --primary: #35194D;
  --primary-dark: #270346;
  --accent: #2977C9;
  --accent-light: #5B9BD5;
  --text: #1A1A2E;
  --text-muted: #4A4A4A;
  --text-light: #E1DFE3;
  --bg: #FFFFFF;
  --bg-light: #F8F7FA;
  --border: #E8E4EE;
  --success: #22BC66;
  --error: #E53E3E;
  --shadow-card: 0 2px 4px rgba(17,17,17,.04), 0 8px 32px rgba(33,33,33,.08);
  --radius: 8px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: 200ms ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.5rem; border-radius: var(--radius);
  font-size: .9375rem; font-weight: 600; cursor: pointer;
  border: none; transition: background var(--transition), transform var(--transition);
  text-decoration: none; white-space: nowrap; font-family: var(--font);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); }
.btn-outline { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.15); }
.btn-purple { background: var(--primary); color: #fff; }
.btn-purple:hover { background: var(--primary-dark); }
.btn-sm { padding: .5rem 1rem; font-size: .875rem; }

/* NAV */
.nav { position: sticky; top: 0; z-index: 100; background: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.nav-logo { font-size: 1.125rem; font-weight: 700; color: #fff; text-decoration: none; display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.nav-logo:hover { text-decoration: none; color: var(--text-light); }
.nav-logo span { color: var(--accent-light); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; }
.nav-links a { color: var(--text-light); font-size: .9375rem; font-weight: 500; transition: color var(--transition); }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links a.active { color: #fff; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.nav-auth { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
#btn-signout { display: none; background: rgba(255,255,255,.2); color: #fff; }
.nav-mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; color: #fff; font-size: 1.5rem; }
.nav-mobile { display: none; background: var(--primary-dark); border-top: 1px solid rgba(255,255,255,.1); padding: 1rem; }
.nav-mobile.open { display: block; }
.nav-mobile a { display: block; color: var(--text-light); padding: .75rem 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .9375rem; }
.nav-mobile a:hover { color: #fff; }

/* HERO */
.hero { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #4a2370 100%); color: #fff; padding: 5rem 1.5rem; text-align: center; }
.hero h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.hero p { font-size: 1.125rem; opacity: .88; max-width: 580px; margin: 0 auto 2rem; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* SECTIONS */
section { padding: 4rem 0; }
.section-title { font-size: clamp(1.375rem, 3vw, 1.875rem); font-weight: 700; color: var(--primary); margin-bottom: .5rem; }
.section-subtitle { color: var(--text-muted); margin-bottom: 2.5rem; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.bg-light { background: var(--bg-light); }

/* FEATURE CARDS */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.feature-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-card); transition: transform var(--transition), box-shadow var(--transition); }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 8px 40px rgba(53,25,77,.12); }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.0625rem; font-weight: 700; color: var(--primary); margin-bottom: .5rem; }
.feature-card p { color: var(--text-muted); font-size: .9375rem; }

/* RESOURCE CARDS */
.resources-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.resource-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); display: flex; flex-direction: column; transition: transform var(--transition), box-shadow var(--transition); }
.resource-card:hover { transform: translateY(-4px); box-shadow: 0 8px 40px rgba(53,25,77,.12); }
.resource-card-img { width: 100%; height: 160px; background: var(--bg-light); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 3rem; overflow: hidden; }
.resource-card-img img { width: 100%; height: 100%; object-fit: cover; }
.resource-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.resource-card-type { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin-bottom: .5rem; }
.resource-card-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: .5rem; line-height: 1.3; }
.resource-card-desc { font-size: .875rem; color: var(--text-muted); flex: 1; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.resource-card-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; font-weight: 600; background: var(--bg-light); color: var(--primary); border: 1px solid var(--border); }
.resource-card-footer { margin-top: auto; }

/* SECTOR CARDS */
.sectors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.sector-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-card); transition: all var(--transition); text-decoration: none; display: flex; align-items: center; gap: .75rem; }
.sector-card:hover { border-color: var(--accent); box-shadow: 0 4px 20px rgba(41,119,201,.15); text-decoration: none; transform: translateY(-2px); }
.sector-card-icon { font-size: 1.5rem; flex-shrink: 0; }
.sector-card-name { font-size: .9375rem; font-weight: 600; color: var(--text); }

/* SEARCH */
.search-bar-wrap { margin-bottom: 2rem; }
.search-bar { width: 100%; max-width: 500px; padding: .75rem 1.25rem; border: 2px solid var(--border); border-radius: 40px; font-size: 1rem; font-family: var(--font); outline: none; transition: border-color var(--transition); }
.search-bar:focus { border-color: var(--accent); }

/* NEWSLETTER */
.newsletter { background: var(--bg-light); }
.newsletter-form { display: flex; gap: .75rem; max-width: 480px; margin: 0 auto; }
.newsletter-input { flex: 1; padding: .75rem 1.25rem; border: 2px solid var(--border); border-radius: 40px; font-size: 1rem; font-family: var(--font); outline: none; transition: border-color var(--transition); }
.newsletter-input:focus { border-color: var(--accent); }
.newsletter-msg { margin-top: .75rem; font-size: .875rem; text-align: center; }
.newsletter-msg.success { color: var(--success); }
.newsletter-msg.error { color: var(--error); }

/* CTA BAND */
.cta-band { background: var(--primary); color: #fff; text-align: center; }
.cta-band h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 700; margin-bottom: 1rem; }
.cta-band p { opacity: .88; margin-bottom: 1.5rem; max-width: 520px; margin-left: auto; margin-right: auto; }

/* AUTH MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 200; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; }
.modal-header { background: var(--primary); color: #fff; padding: 1.5rem 1.75rem; display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { font-size: 1.125rem; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: #fff; font-size: 1.5rem; line-height: 1; }
.modal-tabs { display: flex; border-bottom: 1px solid var(--border); }
.modal-tab { flex: 1; padding: .875rem; text-align: center; font-size: .875rem; font-weight: 600; cursor: pointer; border: none; background: none; color: var(--text-muted); transition: color var(--transition); font-family: var(--font); }
.modal-tab.active { color: var(--primary); border-bottom: 2px solid var(--primary); }
.modal-body { padding: 1.75rem; }
.modal-form { display: none; }
.modal-form.active { display: block; }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .875rem; font-weight: 600; color: var(--text); margin-bottom: .375rem; }
.form-input { width: 100%; padding: .6875rem .875rem; border: 2px solid var(--border); border-radius: var(--radius); font-size: .9375rem; font-family: var(--font); outline: none; transition: border-color var(--transition); }
.form-input:focus { border-color: var(--accent); }
.form-msg { margin-top: .75rem; font-size: .875rem; padding: .5rem .75rem; border-radius: var(--radius); min-height: 1rem; }
.form-msg.success { background: #f0fff4; color: #22543d; border: 1px solid #9ae6b4; }
.form-msg.error { background: #fff5f5; color: #742a2a; border: 1px solid #feb2b2; }

/* ARTICLE / PILLAR PAGE */
.article-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 3rem; align-items: start; }
.article-content h2 { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin: 2rem 0 1rem; }
.article-content h3 { font-size: 1.1875rem; font-weight: 700; color: var(--text); margin: 1.5rem 0 .75rem; }
.article-content p { margin-bottom: 1rem; color: var(--text); }
.article-content ul, .article-content ol { margin: 1rem 0 1rem 1.5rem; }
.article-content li { margin-bottom: .375rem; }
.article-content a { color: var(--accent); }
.article-sidebar { position: sticky; top: 80px; }
.sidebar-card { background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.sidebar-card h3 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; }
.toc a { display: block; color: var(--text-muted); font-size: .875rem; padding: .3rem 0 .3rem .75rem; border-left: 2px solid var(--border); transition: all var(--transition); margin-bottom: .125rem; }
.toc a:hover { color: var(--accent); border-left-color: var(--accent); text-decoration: none; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-btn { width: 100%; text-align: left; padding: 1.125rem 0; background: none; border: none; cursor: pointer; font-size: 1rem; font-weight: 600; color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: var(--font); }
.faq-icon { font-size: 1.25rem; color: var(--primary); flex-shrink: 0; transition: transform var(--transition); display: inline-block; }
.faq-btn[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding-bottom: 1.125rem; color: var(--text-muted); }
.faq-answer.open { display: block; }

/* FORM PAGE */
.form-page { max-width: 680px; margin: 0 auto; }
.form-section { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-card); }
.form-section + .form-section { margin-top: 1.5rem; }
.form-section-title { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
textarea.form-input { resize: vertical; min-height: 120px; }
select.form-input { cursor: pointer; }
.form-hint { font-size: .8125rem; color: var(--text-muted); margin-top: .25rem; }
.form-submit-area { margin-top: 2rem; text-align: center; }

/* SKELETON */
.skeleton { background: linear-gradient(90deg, #f0edf5 25%, #e8e4ee 50%, #f0edf5 75%); background-size: 200% 100%; animation: skeleton-shine 1.4s ease infinite; border-radius: var(--radius); }
@keyframes skeleton-shine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.skeleton-img { width: 100%; height: 160px; }
.skeleton-body { padding: 1.25rem; }
.skeleton-line { height: 14px; margin-bottom: .75rem; }
.skeleton-line.short { width: 60%; }
.skeleton-line.long { width: 90%; }

/* BREADCRUMB */
.breadcrumb { padding: 1rem 0; display: flex; gap: .5rem; align-items: center; font-size: .875rem; color: var(--text-muted); flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* PAGE HERO (inner pages) */
.page-hero { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; padding: 3rem 1.5rem; }
.page-hero h1 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; margin-bottom: .75rem; }
.page-hero p { opacity: .88; max-width: 580px; }

/* LEAD MAGNET */
.lead-magnet-box { background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-top: 1.5rem; }
.lead-magnet-box h3 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: .5rem; }
.lead-magnet-form { display: flex; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }
.lead-magnet-form .form-input { flex: 1; min-width: 200px; }
.lead-msg { margin-top: .5rem; font-size: .875rem; }
.lead-msg.success { color: var(--success); }
.lead-msg.error { color: var(--error); }

/* BLOG LINKS */
.blog-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.blog-link-card { background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; transition: all var(--transition); text-decoration: none; display: flex; flex-direction: column; gap: .375rem; }
.blog-link-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.blog-link-card .blog-tag { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--accent); }
.blog-link-card .blog-title { font-size: .9375rem; font-weight: 700; color: var(--text); }
.blog-link-card .blog-desc { font-size: .8125rem; color: var(--text-muted); }

/* ALERT */
.alert { padding: .875rem 1.125rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .9375rem; }
.alert-info { background: #EBF8FF; color: #1a365d; border: 1px solid #90CDF4; }
.alert-success { background: #F0FFF4; color: #22543d; border: 1px solid #9AE6B4; }
.alert-warning { background: #FFFBEB; color: #744210; border: 1px solid #F6E05E; }

/* FOOTER */
.footer { background: var(--primary-dark); color: var(--text-light); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand .footer-logo { font-size: 1.125rem; font-weight: 700; color: #fff; margin-bottom: .75rem; }
.footer-brand .footer-logo span { color: var(--accent-light); }
.footer-brand p { font-size: .875rem; opacity: .8; line-height: 1.7; }
.footer-col h4 { font-size: .875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; margin-bottom: 1rem; }
.footer-col a { display: block; font-size: .875rem; color: var(--text-light); opacity: .8; margin-bottom: .5rem; transition: opacity var(--transition); }
.footer-col a:hover { opacity: 1; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .8125rem; opacity: .7; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .article-wrap { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-auth { display: none; }
  .nav-mobile-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
}
@media (max-width: 480px) {
  .hero { padding: 3rem 1.25rem; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .sectors-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
