/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== VARIABLES — MODE CLAIR (défaut) ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --bg-accent: #0d1b2a;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1a2d45;
  --text-muted: #64748b;
  --blue: #0078d4;
  --blue-light: #50a8ff;
  --blue-bg: #edf4ff;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.07);
  --header-bg: rgba(255,255,255,0.95);
  --header-border: rgba(0,0,0,0.08);
  --nav-text: #1a2d45;
  --nav-hover-bg: rgba(0,0,0,0.05);
  --stat-bg: #f4f6f9;
  --stat-number: var(--blue);
  --stat-label: #64748b;
  --footer-bg: #0d1b2a;
}

/* ===== VARIABLES — MODE SOMBRE ===== */
body.dark {
  --bg: #0d1b2a;
  --bg-alt: #162032;
  --bg-accent: #0d1b2a;
  --surface: #162032;
  --border: rgba(255,255,255,0.08);
  --text: #f0f4f8;
  --text-muted: #8a9bb0;
  --blue-bg: rgba(0,120,212,0.15);
  --header-bg: rgba(13,27,42,0.95);
  --header-border: rgba(255,255,255,0.06);
  --nav-text: rgba(255,255,255,0.8);
  --nav-hover-bg: rgba(255,255,255,0.07);
  --stat-bg: #162032;
  --stat-number: var(--blue-light);
  --stat-label: rgba(255,255,255,0.45);
  --shadow: 0 4px 24px rgba(0,0,0,0.25);
  --footer-bg: #080f18;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  transition: background 0.3s, color 0.3s;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #006abc; transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,0.1); color: #fff; border: 1.5px solid rgba(255,255,255,0.25); }
.btn-secondary:hover { background: rgba(255,255,255,0.18); }
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { background: #f0f7ff; }
.btn-outline { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-full { width: 100%; justify-content: center; }

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.header.scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--header-border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.logo { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: 1px; transition: color 0.3s; }
.logo-sub { font-size: 10px; color: var(--blue-light); letter-spacing: 0; text-transform: uppercase; font-weight: 600; transition: color 0.3s; display: inline-block; transform-origin: left center; }
.header.scrolled .logo-text { color: var(--text); }
.header.scrolled .logo-sub { color: var(--blue); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.2s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.1); }
.header.scrolled .nav-link { color: var(--nav-text); opacity: 0.8; }
.header.scrolled .nav-link:hover { opacity: 1; background: var(--nav-hover-bg); color: var(--text); }
.nav-link.nav-cta {
  background: var(--blue);
  color: #fff;
  margin-left: 8px;
}
.nav-link.nav-cta:hover { background: #006abc; }
.header.scrolled .nav-link.nav-cta { opacity: 1; color: #fff; }

/* Contrôles nav (langue + dark mode) */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Bouton langue */
.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  height: 36px;
  min-width: 40px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.lang-toggle:hover { color: #fff; border-color: rgba(255,255,255,0.5); }
.header.scrolled .lang-toggle { background: var(--bg-alt); border-color: var(--border); color: var(--text-muted); }
.header.scrolled .lang-toggle:hover { color: var(--text); border-color: var(--blue); }

/* Bouton dark mode */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  transition: all 0.2s;
  flex-shrink: 0;
}
.theme-label {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.theme-toggle:hover { color: #fff; border-color: rgba(255,255,255,0.5); }
.header.scrolled .theme-toggle { background: var(--bg-alt); border-color: var(--border); color: var(--text-muted); }
.header.scrolled .theme-toggle:hover { color: var(--text); border-color: var(--blue); }
.theme-toggle svg { width: 17px; height: 17px; }
.icon-moon { display: none; }
body.dark .icon-sun { display: none; }
body.dark .icon-moon { display: block; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== HERO — toujours sombre ===== */
.hero {
  min-height: 100vh;
  background: #0d1b2a;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 100px 0 60px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 70% 50%, rgba(0,120,212,0.15) 0%, transparent 70%),
              radial-gradient(ellipse 40% 40% at 20% 80%, rgba(0,120,212,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero-badge {
  display: inline-block;
  background: rgba(0,120,212,0.18);
  color: var(--blue-light);
  border: 1px solid rgba(0,120,212,0.3);
  font-size: 13px; font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 24px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--blue-light), #a8d8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc { color: rgba(255,255,255,0.65); font-size: 18px; line-height: 1.7; margin-bottom: 40px; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-wave {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: 80px; display: block; }

/* ===== STATS ===== */
.stats {
  background: var(--stat-bg);
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-number { display: block; font-size: 36px; font-weight: 800; color: var(--stat-number); line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: 13px; color: var(--stat-label); font-weight: 500; }

/* ===== SECTIONS ===== */
.section { padding: 96px 0; background: var(--bg); transition: background 0.3s; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: #0d1b2a; }

.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-dark .section-tag { color: var(--blue-light); }
.section-title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800; line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text);
}
.section-dark .section-title { color: #fff; }
.section-desc { font-size: 17px; color: var(--text-muted); max-width: 560px; margin: 0 auto; line-height: 1.7; }
.section-dark .section-desc { color: rgba(255,255,255,0.55); }

/* ===== EXPERTISES ===== */
.expertises-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.expertise-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: all 0.25s;
}
.expertise-card:hover { border-color: var(--blue); box-shadow: 0 8px 32px rgba(0,120,212,0.1); transform: translateY(-3px); }
.expertise-icon {
  width: 48px; height: 48px;
  background: var(--blue-bg);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--blue);
}
.expertise-icon svg { width: 24px; height: 24px; }
.expertise-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.expertise-card ul { display: flex; flex-direction: column; gap: 10px; }
.expertise-card li { font-size: 14px; color: var(--text-muted); padding-left: 14px; position: relative; }
.expertise-card li::before { content: ''; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; background: var(--blue); border-radius: 50%; }

/* ===== OFFRES ===== */
.offres-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.offre-card {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 40px;
}
.offre-card-accent { background: rgba(0,120,212,0.12); border-color: rgba(0,120,212,0.3); }
.offre-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--blue-light); margin-bottom: 16px; }
.offre-card h3 { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 16px; }
.offre-card > p { color: rgba(255,255,255,0.6); font-size: 15px; line-height: 1.7; margin-bottom: 28px; }
.offre-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; }
.offre-list li { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.85); font-size: 15px; }
.offre-list li svg { width: 18px; height: 18px; color: var(--blue-light); flex-shrink: 0; }

/* ===== FORMATIONS ===== */
.formations-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 48px; }
.formation-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.25s;
}
.formation-card:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-3px); }
.formation-level { font-size: 11px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.formation-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.formation-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }
.formation-info { display: flex; flex-direction: column; gap: 4px; }
.formation-info span { font-size: 13px; font-weight: 600; color: var(--text); }
.formation-info span:last-child { color: var(--text-muted); font-weight: 400; }
.formations-cta { text-align: center; }

/* ===== POURQUOI ===== */
.why-grid { display: grid; grid-template-columns: 1fr 420px; gap: 80px; align-items: center; }
.why-intro { font-size: 20px; font-weight: 600; color: var(--text); line-height: 1.5; margin-bottom: 40px; }
.why-items { display: flex; flex-direction: column; gap: 32px; }
.why-item { display: flex; gap: 16px; align-items: flex-start; }
.why-icon { width: 44px; height: 44px; background: var(--blue-bg); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--blue); flex-shrink: 0; }
.why-icon svg { width: 22px; height: 22px; }
.why-item h4 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.why-item p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.profile-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; padding: 36px; box-shadow: var(--shadow); }
.profile-avatar {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; color: #fff;
  margin-bottom: 20px;
}
.profile-info h4 { font-size: 20px; font-weight: 800; margin-bottom: 4px; color: var(--text); }
.profile-info > p { font-size: 14px; color: var(--blue); font-weight: 600; margin-bottom: 16px; }
.profile-bio { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }
.profile-certs { display: flex; flex-wrap: wrap; gap: 8px; }
.cert { background: var(--blue-bg); color: var(--blue); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.cert-mct { background: #0078d4; color: #fff; }

.mct-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  background: var(--blue-bg);
  border: 1.5px solid rgba(0,120,212,0.2);
  color: var(--text);
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 30px;
}
.mct-badge svg { width: 18px; height: 18px; color: var(--blue); flex-shrink: 0; }
.mct-badge strong { color: var(--blue); }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 360px; gap: 64px; align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.8); }
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: #fff;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.3); }
.form-group select option { background: #0d1b2a; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--blue); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 13px; color: rgba(255,255,255,0.3); text-align: center; margin-top: -8px; }

.contact-info { display: flex; flex-direction: column; gap: 28px; padding-top: 8px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon { width: 44px; height: 44px; background: rgba(0,120,212,0.15); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--blue-light); flex-shrink: 0; }
.contact-icon svg { width: 20px; height: 20px; }
.contact-item span { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 4px; }
.contact-item a,
.contact-item p { color: rgba(255,255,255,0.85); font-size: 15px; line-height: 1.5; }
.contact-item a:hover { color: var(--blue-light); }

/* ===== FOOTER ===== */
.footer { background: var(--footer-bg); padding: 48px 0 32px; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.footer-brand .logo-text { color: #fff; }
.footer-brand .logo-sub { color: var(--blue-light); }
.footer-brand p { color: rgba(255,255,255,0.35); font-size: 14px; margin-top: 8px; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: rgba(255,255,255,0.45); font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-copy { color: rgba(255,255,255,0.2); font-size: 13px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .expertises-grid { grid-template-columns: repeat(2, 1fr); }
  .formations-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: 1fr; gap: 48px; }
  .why-profile { max-width: 420px; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-link { width: 100%; }
  .hamburger { display: flex; }

  .theme-label { display: none; }
  .theme-toggle { padding: 0 10px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .offres-grid { grid-template-columns: 1fr; }
  .expertises-grid { grid-template-columns: 1fr; }
  .formations-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .offre-card { padding: 28px 20px; }
}
