:root {
  --primary: #4a148c;
  --primary-light: #6a1b9a;
  --primary-dark: #2a0a5e;
  --accent: #7b1fa2;
  --accent-hover: #5e1485;
  --text: #2a2a2a;
  --text-light: #555;
  --bg: #fff;
  --bg-light: #f3eef8;
  --bg-dark: #1a0a3a;
  --border: #d8cde8;
  --shadow: 0 2px 20px rgba(74,20,140,0.15);
  --radius: 8px;
  --transition: 0.3s ease;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: #f0f0f0;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
}

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

/* ========== HEADER ========== */
.top-bar {
  background: #ffffff;
  color: #333;
  padding: 8px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid #d0d0d0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar a {
  color: var(--primary);
}

.top-bar a:hover {
  color: var(--primary-dark);
}

.top-bar-contact {
  display: flex;
  gap: 20px;
  align-items: center;
}

header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: background 0.3s ease;
  border-bottom: 1px solid #d0d0d0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  transition: padding 0.3s ease;
}

.logo img {
  height: 110px;
  width: auto;
  background: transparent;
  padding: 4px;
  border-radius: 6px;
  display: block;
  transition: height 0.3s ease, padding 0.3s ease;
}

header.scrolled .logo {
  padding: 6px 0;
}

header.scrolled .logo img {
  height: 50px;
  padding: 4px 8px;
}

.logo-text {
  display: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0;
}

nav a {
  color: var(--primary);
  padding: 20px 18px;
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active {
  color: var(--primary-dark);
  background: rgba(74,20,140,0.08);
  border-bottom-color: var(--accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px;
}

/* ========== HERO ========== */
.hero {
  background:
    linear-gradient(135deg, rgba(42,10,94,0.92) 0%, rgba(26,10,58,0.95) 100%),
    url('../img/hero-bg.png') center/cover no-repeat;
  color: #fff;
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(123,31,162,0.25) 0%, transparent 70%);
  border-radius: 50%;
}

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

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 1.2rem;
  max-width: 650px;
  opacity: 0.9;
  margin-bottom: 30px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(123,31,162,0.4);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  color: #fff;
}

.btn-secondary {
  background: var(--primary);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--primary-light);
  color: #fff;
  transform: translateY(-2px);
}

/* ========== SECTIONS ========== */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 15px;
}

.section-title p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.section-title .accent-line {
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* ========== MESSAGE ALERTE ========== */
.alert-banner {
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 20px;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.7;
}

.alert-banner div + div {
  margin-top: 4px;
}

.alert-banner em {
  font-style: italic;
  opacity: 0.95;
}

/* ========== SERVICES GRID ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.services-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.services-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Cartes avec photo en haut */
.services-grid.with-photos .service-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card-photo {
  height: 100px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-light);
  position: relative;
}

.service-card-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(74,20,140,0) 50%, rgba(74,20,140,0.15) 100%);
  transition: background var(--transition);
}

.services-grid.with-photos .service-card:hover .service-card-photo::after {
  background: linear-gradient(180deg, rgba(74,20,140,0) 50%, rgba(74,20,140,0.3) 100%);
}

.service-card-body {
  padding: 25px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.services-grid.with-photos .service-icon {
  margin-top: -45px;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
  border: 4px solid #fff;
  width: 70px;
  height: 70px;
}

.services-grid.with-photos .service-card.clickable::after {
  margin: 15px 25px 0;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 35px 25px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
  color: #fff;
}

.service-card h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ========== ETAPES / PROCESS ========== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 15px;
}

.step h3 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 10px;
}

a.step.step-link {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
  transition: transform var(--transition);
  border-radius: var(--radius);
  padding: 10px;
}

a.step.step-link:hover {
  transform: translateY(-4px);
  background: rgba(74,20,140,0.05);
}

a.step.step-link:hover .step-number {
  background: var(--accent);
  box-shadow: 0 6px 18px rgba(123,31,162,0.35);
}

.step p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ========== STATS ========== */
.stats {
  background: var(--primary);
  color: #fff;
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-item p {
  font-size: 0.95rem;
  opacity: 0.85;
}

/* ========== OFFRES DETAILLEES ========== */
.offres-detail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.offre-block {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 35px;
  border-left: 4px solid var(--accent);
  position: relative;
  overflow: hidden;
  color: #fff;
  min-height: 320px;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.offre-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(42,10,94,0.88) 0%, rgba(26,10,58,0.92) 100%);
  z-index: -1;
}

.offre-block h3 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
}

.offre-block h3::first-letter {
  font-size: 1.6em;
}

.offre-block ul {
  list-style: none;
  padding: 0;
}

.offre-block li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
}

.offre-block li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #d8b4fe;
  font-weight: 700;
}

/* Gros pavé horizontal */
.offre-banner {
  margin-top: 30px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 40px 50px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 40px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.offre-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(74,20,140,0.3);
}

.offre-banner::before {
  content: '';
  position: absolute;
  right: -50px;
  top: -50px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.offre-banner .icon-large {
  font-size: 3.5rem;
  width: 90px;
  height: 90px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.offre-banner h3 {
  font-size: 1.6rem;
  margin-bottom: 8px;
  color: #fff;
}

.offre-banner p {
  opacity: 0.9;
  margin: 0;
  max-width: 600px;
}

.offre-banner .btn-arrow {
  background: #fff;
  color: var(--primary);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* BPI Badge */
.bpi-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.bpi-section.dark {
  background: linear-gradient(135deg, #424242 0%, #212121 100%);
}

.bpi-section.dark .bpi-badge-label {
  color: #424242;
}

.bpi-section.dark .bpi-badge-main {
  color: #212121;
}

.bpi-section.dark .bpi-text .btn {
  background: #ffc107;
  color: #212121;
}

.bpi-section.dark .bpi-text .btn:hover {
  background: #ffa000;
  color: #212121;
}

.bpi-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,193,7,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.bpi-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.bpi-badge {
  background: #fff;
  color: #0d47a1;
  padding: 20px 30px;
  border-radius: var(--radius);
  text-align: center;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.bpi-badge.bpi-badge-img {
  padding: 12px;
  background: #fff;
}

.bpi-badge.bpi-badge-img img {
  display: block;
  max-width: 200px;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.bpi-badge-label {
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 5px;
}

.bpi-badge-main {
  font-size: 1.6rem;
  color: var(--primary-dark);
}

.bpi-badge-year {
  font-size: 0.9rem;
  color: #ffa000;
  margin-top: 5px;
}

.bpi-text h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: #fff;
}

.bpi-text p {
  opacity: 0.95;
  margin: 0;
  max-width: 600px;
}

.bpi-text .btn {
  margin-top: 15px;
  background: #ffc107;
  color: var(--primary-dark);
}

.bpi-text .btn:hover {
  background: #ffa000;
  color: var(--primary-dark);
}

@media (max-width: 768px) {
  .offre-banner,
  .bpi-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
    padding: 30px 25px;
  }

  .offre-banner .btn-arrow {
    margin: 0 auto;
  }
}

/* ========== ABOUT / QUI SOMMES-NOUS ========== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 15px;
}

.portrait-photo {
  float: right;
  width: 180px;
  height: auto;
  border-radius: 50%;
  margin: 0 0 15px 25px;
  box-shadow: 0 8px 25px rgba(74,20,140,0.2);
  border: 4px solid #fff;
  background: var(--bg-light);
}

@media (max-width: 600px) {
  .portrait-photo {
    float: none;
    display: block;
    margin: 0 auto 20px;
    width: 150px;
  }
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 15px;
}

.about-info {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 35px;
}

.about-info-item {
  display: flex;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.about-info-item:last-child {
  border-bottom: none;
}

.about-info-item strong {
  min-width: 140px;
  color: var(--primary);
}

/* ========== PARTENAIRES ========== */
.partners {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

.partner-badge {
  background: var(--bg-light);
  padding: 20px 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  font-size: 1.1rem;
}

/* Bandeau labels / affiliations */
.labels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 25px;
  align-items: center;
  justify-items: center;
  margin-top: 30px;
}

.label-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.label-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.label-item img {
  max-width: 100%;
  max-height: 70px;
  width: auto;
  object-fit: contain;
  filter: grayscale(30%);
  transition: filter var(--transition);
}

.label-item:hover img {
  filter: grayscale(0%);
}

/* ========== CONTACT ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info-card {
  display: flex;
  gap: 15px;
  padding: 20px;
  background: var(--bg-light);
  border-radius: var(--radius);
  margin-bottom: 15px;
  align-items: flex-start;
}

.contact-info-card .icon {
  width: 45px;
  height: 45px;
  min-width: 45px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.contact-info-card h4 {
  color: var(--primary);
  margin-bottom: 4px;
}

.contact-info-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.contact-form {
  background: var(--bg-light);
  padding: 35px;
  border-radius: var(--radius);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition);
  background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-consent {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 10px;
}

/* ========== FOOTER ========== */
footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 10px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 15px;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.social-links a:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
}

.social-links svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.social-links a.social-google {
  background: #fff;
}

.social-links a.social-google:hover {
  background: #f1f1f1;
  transform: translateY(-3px);
}

.social-links a.social-google svg {
  fill: #4285F4;
}

.social-links a.social-img {
  width: auto;
  min-width: 40px;
  height: 40px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #fff;
}

.social-links a.social-img:hover {
  background: #f1f1f1;
}

.social-links a.social-img img {
  max-height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* ========== THREAT SECTION ========== */
.threat-section {
  background: var(--bg-light);
  padding: 70px 0;
}

.threat-illustration {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 8px 30px rgba(74,20,140,0.08);
  border: 1px solid var(--border);
}

.threat-illustration img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 20px;
  border-radius: 6px;
}

.threat-caption {
  color: var(--text);
  font-size: 0.92rem;
  font-style: italic;
  text-align: center;
  max-width: 850px;
  margin: 20px auto 0;
  line-height: 1.7;
  background: #ede4f7;
  padding: 18px 25px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-light);
}

/* ========== QUIZ EVALUATION ========== */
.quiz-card {
  background: #fff;
  border-radius: 16px;
  padding: 50px 45px;
  box-shadow: 0 10px 40px rgba(74,20,140,0.08);
  border: 1px solid var(--border);
}

.quiz-step {
  text-align: center;
}

.quiz-icon {
  font-size: 3.5rem;
  margin-bottom: 15px;
}

.quiz-step h2 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 1.6rem;
}

.quiz-step > p {
  color: var(--text-light);
  margin-bottom: 25px;
}

.quiz-info {
  list-style: none;
  padding: 0;
  margin: 25px 0;
  display: inline-block;
  text-align: left;
}

.quiz-info li {
  padding: 5px 0;
  color: var(--text);
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.quiz-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 10%;
  transition: width 0.4s ease;
}

.quiz-progress-text {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 600;
  white-space: nowrap;
}

#quiz-question h2 {
  text-align: left;
  margin-bottom: 8px;
}

.quiz-help {
  color: var(--text-light);
  font-size: 0.92rem;
  text-align: left;
  margin-bottom: 25px;
  font-style: italic;
}

.quiz-answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.quiz-answer {
  background: #fff;
  border: 2px solid var(--border);
  color: var(--text);
  padding: 16px 20px;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-weight: 500;
  transition: all var(--transition);
}

.quiz-answer:hover {
  border-color: var(--primary);
  background: var(--bg-light);
  transform: translateX(4px);
}

.quiz-answer.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.quiz-nav {
  display: flex;
  justify-content: flex-start;
}

/* Résultat */
.quiz-score-circle {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 25px;
}

.quiz-score-svg {
  width: 100%;
  height: 100%;
  transition: stroke-dashoffset 1.2s ease;
}

.quiz-score-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--primary);
}

.quiz-score-value small {
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 500;
}

.quiz-result-detail {
  background: var(--bg-light);
  border-radius: 10px;
  padding: 25px;
  margin-top: 25px;
  text-align: left;
}

.quiz-result-detail h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.quiz-result-detail ul {
  list-style: none;
  padding: 0;
}

.quiz-result-detail li {
  padding: 6px 0 6px 24px;
  position: relative;
  color: var(--text);
}

.quiz-result-detail li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 600px) {
  .quiz-card {
    padding: 30px 20px;
  }
  #quiz-question h2 {
    font-size: 1.2rem;
  }
}

/* Diagnostic 2H - modules */
.diag-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin: 30px 0;
}

.diag-module {
  background: var(--bg-light);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  transition: all var(--transition);
}

.diag-module:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.diag-module-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.diag-module h3 {
  color: var(--primary);
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.diag-module h3 small {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 4px;
}

.diag-module-stat {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.diag-module p {
  color: var(--text-light);
  font-size: 0.92rem;
  text-align: left;
}

.diag-soon {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: 12px;
  padding: 30px;
  margin-top: 30px;
}

.diag-soon strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.diag-soon p {
  margin: 0;
  opacity: 0.92;
}

@media (max-width: 600px) {
  .diag-modules {
    grid-template-columns: 1fr;
  }
}

/* ========== CHATBOT ========== */
#mederi-chatbot {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

#cb-toggle {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(74,20,140,0.4);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#cb-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(74,20,140,0.55);
}

#cb-toggle svg {
  width: 28px;
  height: 28px;
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#cb-toggle .cb-icon-close {
  opacity: 0;
  transform: rotate(-90deg);
}

#cb-toggle.open .cb-icon-open {
  opacity: 0;
  transform: rotate(90deg);
}

#cb-toggle.open .cb-icon-close {
  opacity: 1;
  transform: rotate(0deg);
}

#cb-toggle.cb-pulse::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  animation: cb-pulse 1.5s ease-out infinite;
}

@keyframes cb-pulse {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

#cb-window {
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 360px;
  max-width: calc(100vw - 50px);
  height: 520px;
  max-height: calc(100vh - 130px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#cb-window.open {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

#cb-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cb-avatar {
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
  overflow: hidden;
  flex-shrink: 0;
}

.cb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cb-title {
  font-weight: 600;
  font-size: 1rem;
}

.cb-subtitle {
  font-size: 0.78rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cb-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  display: inline-block;
}

#cb-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f7f5fb;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cb-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.45;
  animation: cb-fade-in 0.25s ease;
}

@keyframes cb-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.cb-msg-bot {
  background: #fff;
  border: 1px solid #e9e0f5;
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.cb-msg-user {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.cb-typing {
  display: flex;
  gap: 4px;
  padding: 14px;
  align-items: center;
}

.cb-typing span {
  width: 7px;
  height: 7px;
  background: var(--primary-light);
  border-radius: 50%;
  animation: cb-bounce 1.2s infinite;
}

.cb-typing span:nth-child(2) { animation-delay: 0.15s; }
.cb-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes cb-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

#cb-options {
  padding: 10px 14px;
  background: #fff;
  border-top: 1px solid #e9e0f5;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.cb-option {
  background: #f3eef8;
  border: 1px solid var(--border);
  color: var(--primary-dark);
  padding: 9px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.2s ease;
}

.cb-option:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateX(3px);
}

#cb-footer {
  padding: 8px;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-light);
  background: #fff;
  border-top: 1px solid #e9e0f5;
}

@media (max-width: 480px) {
  #cb-window {
    bottom: 90px;
    right: 15px;
    left: 15px;
    width: auto;
    height: calc(100vh - 110px);
  }
  #cb-toggle {
    bottom: 18px;
    right: 18px;
    width: 54px;
    height: 54px;
  }
}

/* ========== PAGE HEADER (pages internes) ========== */
.page-header {
  background: #ffffff;
  color: var(--primary-dark);
  padding: 40px 0;
  text-align: center;
  border-bottom: 1px solid #d0d0d0;
}

.page-header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: var(--primary-dark);
}

.page-header p {
  opacity: 0.85;
  font-size: 1.1rem;
  color: var(--text-light);
}

.breadcrumb {
  font-size: 0.9rem;
  margin-top: 10px;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--primary);
}

.breadcrumb a:hover {
  color: var(--primary-dark);
}

/* ========== MENTIONS LEGALES ========== */
.legal-content h3 {
  color: var(--primary);
  margin: 30px 0 15px;
  font-size: 1.3rem;
}

.legal-content p {
  color: var(--text-light);
  margin-bottom: 12px;
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 22, 89, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal {
  background: #fff;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  border-radius: var(--radius);
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: translateY(20px);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal .modal-body {
  overflow-y: auto;
  flex: 1;
}

.modal .modal-footer {
  flex-shrink: 0;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-photo {
  width: 100%;
  height: 120px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-light);
  border-radius: var(--radius) var(--radius) 0 0;
  display: none;
  position: relative;
  flex-shrink: 0;
}

.modal-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(74,20,140,0.4) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 22px 25px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.modal-photo + .modal-header {
  border-radius: 0;
}

.modal-header .icon {
  font-size: 2rem;
  background: rgba(255,255,255,0.15);
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header h3 {
  font-size: 1.5rem;
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.modal-close:hover {
  background: rgba(255,255,255,0.35);
}

.modal-body {
  padding: 30px;
}

.modal-body p {
  color: var(--text);
  margin-bottom: 15px;
  line-height: 1.7;
}

.modal-body ul {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}

.modal-body li {
  padding: 10px 0 10px 28px;
  position: relative;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.modal-body li:last-child {
  border-bottom: none;
}

.modal-body li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}

.modal-footer {
  padding: 20px 30px 30px;
  text-align: center;
}

/* Cliquable */
.service-card.clickable {
  cursor: pointer;
}

.service-card.clickable:hover {
  border-color: var(--primary-light);
}

.service-card.clickable::after {
  content: '→ En savoir plus';
  display: block;
  margin-top: 15px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(-5px);
  transition: all var(--transition);
}

.service-card.clickable:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .offres-detail,
  .services-grid.cols-3,
  .services-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  }

  nav ul.open {
    display: flex;
  }

  nav a {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(74,20,140,0.1);
  }

  .hero {
    padding: 50px 0;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  section {
    padding: 50px 0;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .offres-detail,
  .services-grid.cols-3,
  .services-grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .top-bar .container {
    justify-content: center;
    text-align: center;
  }

  .top-bar-contact {
    flex-direction: column;
    gap: 5px;
  }
}
