/* === COUT-EMPLOYE.FR — Global Stylesheet === */

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

:root {
  --blue-900: #0f1b2d;
  --blue-800: #1a2744;
  --blue-700: #1e3a5f;
  --blue-600: #1d4ed8;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --blue-300: #60a5fa;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --green-600: #059669;
  --green-500: #10b981;
  --green-100: #d1fae5;
  --green-50: #ecfdf5;
  --orange-500: #f59e0b;
  --orange-100: #fef3c7;
  --red-500: #ef4444;
  --red-100: #fee2e2;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1100px;
  --header-h: 64px;
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.has-sticky-cta { padding-bottom: 72px; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-500); text-decoration: underline; }
ul, ol { padding-left: 1.25em; }

/* --- Container --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

/* === HEADER === */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.site-logo {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1.1rem; color: var(--blue-700);
  text-decoration: none;
}
.site-logo:hover { color: var(--blue-600); text-decoration: none; }
.logo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--blue-600); color: var(--white);
  border-radius: 8px; font-size: .8rem; font-weight: 800;
  letter-spacing: -.5px;
}

/* Nav */
.main-nav ul {
  list-style: none; padding: 0; display: flex; gap: .25rem;
}
.main-nav a {
  display: block; padding: .5rem .75rem;
  font-size: .9rem; font-weight: 500; color: var(--gray-600);
  border-radius: 6px; text-decoration: none; transition: .15s;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--blue-50); color: var(--blue-600); text-decoration: none;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; background: var(--gray-700);
  border-radius: 2px; transition: .2s;
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--gray-200);
    padding: .5rem 1rem; box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: .75rem .5rem; }
}

/* === BREADCRUMB === */
.breadcrumb {
  max-width: var(--max-width); margin: 0 auto;
  padding: .75rem 1.25rem;
  font-size: .85rem; color: var(--gray-500);
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--blue-600); }
.breadcrumb span { margin: 0 .35rem; }

/* === PAGE HEADER === */
.page-header {
  max-width: var(--max-width); margin: 0 auto;
  padding: 2rem 1.25rem 1.5rem;
}
.page-header h1 {
  font-size: 2rem; font-weight: 800; color: var(--gray-900);
  line-height: 1.2; margin-bottom: .5rem;
}
.page-header p {
  font-size: 1.1rem; color: var(--gray-600); max-width: 680px;
}

/* === CONTENT SECTIONS === */
.content-section {
  padding: 2rem 0;
}
.content-section:nth-child(even) {
  background: var(--white);
}
.content-section h2 {
  font-size: 1.5rem; font-weight: 700; color: var(--gray-900);
  margin-bottom: 1rem; line-height: 1.3;
}
.content-section h3 {
  font-size: 1.15rem; font-weight: 600; color: var(--gray-800);
  margin: 1.5rem 0 .5rem;
}
.content-section p {
  margin-bottom: 1rem; color: var(--gray-700);
}
.content-section ul, .content-section ol {
  margin-bottom: 1rem;
}
.content-section li {
  margin-bottom: .35rem; color: var(--gray-700);
}

/* === SIMULATOR === */
.simulator-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}
.simulator-card h2 {
  font-size: 1.3rem; font-weight: 700; color: var(--blue-700);
  margin-bottom: 1.5rem; text-align: center;
}
.sim-form { display: grid; gap: 1rem; }
.sim-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .sim-row { grid-template-columns: 1fr; } }

.sim-field label {
  display: block; font-size: .85rem; font-weight: 600;
  color: var(--gray-700); margin-bottom: .35rem;
}
.sim-field input, .sim-field select {
  width: 100%; padding: .6rem .75rem;
  border: 1px solid var(--gray-300); border-radius: var(--radius);
  font-size: 1rem; color: var(--gray-800);
  background: var(--white);
  transition: border-color .15s;
}
.sim-field input:focus, .sim-field select:focus {
  outline: none; border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* Results */
.sim-results {
  margin-top: 1.5rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
@media (max-width: 600px) { .sim-results { grid-template-columns: 1fr; } }

.result-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.result-box.highlight-blue {
  background: var(--blue-50);
  border-color: var(--blue-300);
}
.result-box.highlight-green {
  background: var(--green-50);
  border-color: var(--green-500);
}
.result-box.highlight-orange {
  background: var(--orange-100);
  border-color: var(--orange-500);
}
.result-box .label {
  font-size: .8rem; font-weight: 600; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: .25rem;
}
.result-box .value {
  font-size: 1.6rem; font-weight: 800; color: var(--gray-900);
}
.result-box.highlight-blue .value { color: var(--blue-600); }
.result-box.highlight-green .value { color: var(--green-600); }
.result-box.highlight-orange .value { color: var(--orange-500); }
.result-box .sub {
  font-size: .75rem; color: var(--gray-500); margin-top: .25rem;
}

/* Detail table in simulator */
.sim-detail {
  margin-top: 1.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.sim-detail-toggle {
  width: 100%; padding: .75rem 1rem;
  background: var(--gray-100);
  border: none; cursor: pointer;
  font-size: .9rem; font-weight: 600; color: var(--gray-700);
  text-align: left;
  display: flex; justify-content: space-between; align-items: center;
}
.sim-detail-toggle:hover { background: var(--gray-200); }
.sim-detail-body { display: none; padding: 1rem; }
.sim-detail-body.open { display: block; }

/* === TABLES === */
.table-wrapper { overflow-x: auto; margin-bottom: 1.5rem; }
table {
  width: 100%; border-collapse: collapse;
  font-size: .9rem;
}
thead { background: var(--blue-700); }
thead th {
  padding: .75rem 1rem; text-align: left;
  color: var(--white); font-weight: 600; font-size: .85rem;
  white-space: nowrap;
}
tbody td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
}
tbody tr:hover { background: var(--blue-50); }
td.highlight {
  font-weight: 700; color: var(--blue-600);
}

/* === INFO BOX === */
.info-box {
  background: var(--blue-50);
  border-left: 4px solid var(--blue-500);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: .9rem;
}
.info-box.warning {
  background: var(--orange-100);
  border-left-color: var(--orange-500);
}
.info-box.success {
  background: var(--green-100);
  border-left-color: var(--green-500);
}
.info-box strong { color: var(--gray-900); }

/* === FAQ === */
.faq-section { max-width: 780px; }
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: .5rem;
  overflow: hidden;
}
.faq-question {
  width: 100%; padding: 1rem 1.25rem;
  background: var(--white);
  border: none; cursor: pointer;
  font-size: .95rem; font-weight: 600;
  color: var(--gray-800); text-align: left;
  display: flex; justify-content: space-between; align-items: center;
  transition: background .15s;
}
.faq-question:hover { background: var(--gray-50); }
.faq-question::after { content: '+'; font-size: 1.25rem; color: var(--gray-400); font-weight: 400; }
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height .3s ease;
}
.faq-item.open .faq-answer { max-height: 500px; }
.faq-answer p, .faq-answer ul { padding: 0 1.25rem; }
.faq-answer p:last-child { padding-bottom: 1rem; }

/* === LINK CARDS (hub pages) === */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem; margin: 1.5rem 0;
}
.card-link {
  display: block; padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  text-decoration: none;
  transition: .2s;
}
.card-link:hover {
  border-color: var(--blue-400);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: translateY(-2px);
}
.card-link h3 {
  font-size: 1rem; font-weight: 700; color: var(--blue-700);
  margin-bottom: .35rem;
}
.card-link p {
  font-size: .85rem; color: var(--gray-500); margin: 0; line-height: 1.5;
}

/* === STICKY CTA === */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--blue-700);
  padding: .75rem 1.25rem;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  z-index: 90;
  box-shadow: 0 -2px 10px rgba(0,0,0,.15);
}
.sticky-cta p {
  color: var(--white); font-size: .9rem; font-weight: 500;
  margin: 0;
}
.btn-cta {
  display: inline-block; padding: .55rem 1.5rem;
  background: var(--orange-500); color: var(--white);
  font-weight: 700; font-size: .9rem;
  border-radius: 6px; text-decoration: none;
  transition: .15s; white-space: nowrap;
}
.btn-cta:hover { background: #d97706; color: var(--white); text-decoration: none; }

@media (max-width: 500px) {
  .sticky-cta p { display: none; }
  .sticky-cta { justify-content: center; }
}

/* === FOOTER === */
.site-footer {
  background: var(--blue-900);
  color: var(--gray-400);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem; margin-bottom: 2rem;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-col h4 {
  color: var(--white); font-size: .95rem; font-weight: 700;
  margin-bottom: .75rem;
}
.footer-col p { font-size: .85rem; line-height: 1.6; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: .4rem; }
.footer-col a {
  color: var(--gray-400); font-size: .85rem; text-decoration: none;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: .8rem;
}
.footer-bottom p { margin-bottom: .35rem; }

/* === HERO (homepage) === */
.hero {
  background: linear-gradient(135deg, var(--blue-700) 0%, var(--blue-900) 100%);
  padding: 3rem 0 2rem;
  color: var(--white);
  text-align: center;
}
.hero h1 {
  font-size: 2.25rem; font-weight: 800;
  margin-bottom: .75rem;
}
.hero p {
  font-size: 1.15rem; opacity: .85;
  max-width: 600px; margin: 0 auto 2rem;
}
@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 1rem; }
}

/* === KEY FIGURES === */
.key-figures {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; margin: 2rem 0;
}
@media (max-width: 768px) { .key-figures { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .key-figures { grid-template-columns: 1fr; } }
.key-figure {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.key-figure .num {
  font-size: 1.75rem; font-weight: 800; color: var(--blue-600);
  display: block;
}
.key-figure .desc {
  font-size: .8rem; color: var(--gray-500); margin-top: .25rem;
}

/* === SECTION INTRO (hub pages) === */
.section-intro {
  max-width: 720px;
  font-size: 1.05rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}

/* === UTILITY === */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
