/* ============================================================
   style.css — AIMIA Formation
   Feuille de style globale commune à toutes les pages Formation.
   ============================================================ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --navy:    #0B1A4A;
  --blue:    #0052FF;
  --orange:  #FF7A00;
  --bg:      #F5F6FC;
  --bg-alt:  #ECEFF9;
  --surface: #FFFFFF;
  --text:    #10142E;
  --text-muted: #4B5578;
  --border:  #DCE0F1;
  --nav-bg:  rgba(245, 246, 252, 0.86);
  --shadow:  0 1px 2px rgba(11, 26, 74, 0.06), 0 8px 24px rgba(11, 26, 74, 0.06);
}

/* ── Reset ──────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
}

/* ── Layout helpers ─────────────────────────────────────────── */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Header / Navigation ────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: 1180px;
  margin: 0 auto;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

nav.primary {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

nav.primary a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

nav.primary a:hover,
nav.primary a:focus-visible {
  color: var(--blue);
  border-color: var(--blue);
}

.cta-devis {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.15s, transform 0.15s;
  display: inline-block;
}
.cta-devis:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* Hamburger toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; }

@media (max-width: 900px) {
  nav.primary {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 12px 28px 20px;
    border-bottom: 1px solid var(--border);
    display: none;
    gap: 4px;
  }
  nav.primary.open { display: flex; }
  nav.primary a { padding: 10px 0; }
  .nav-toggle { display: block; }
  .cta-devis.desktop-only { display: none; }
}

/* ── Return links ───────────────────────────────────────────── */
.return-link {
  background: var(--orange);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.return-link a {
  text-decoration: none;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}
.return-link.sticky {
  position: sticky;
  top: 70px;
  z-index: 49;
}
.return-link.relative {
  position: relative;
}

/* ── Page title banner ──────────────────────────────────────── */
.page-title {
  background: var(--navy);
  color: #F2F3FC;
  padding: 48px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  border-bottom: 3px solid var(--blue);
}
.page-title h1 {
  font-size: 2em;
  margin-bottom: 12px;
  font-weight: 700;
}
.page-title p {
  font-size: 1.05em;
  opacity: 0.95;
}

/* ── Main content layout (detail pages with sidebar) ─────────── */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  padding: 40px 28px;
}

.sidebar {
  padding: 24px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 120px;
}
.sidebar h3 {
  font-size: 1.1em;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue);
}
.sidebar-item {
  margin-bottom: 24px;
}
.sidebar-item strong {
  display: block;
  color: var(--blue);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.sidebar-item p {
  color: var(--text);
  font-size: 0.95em;
}

/* Price box in sidebar */
.price-box {
  background: linear-gradient(135deg, var(--navy), #1a2a5a);
  color: white;
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 24px;
  border: 2px solid var(--blue);
}
.price-box .label {
  font-size: 0.8em;
  opacity: 0.9;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.price-box .amount {
  font-size: 2em;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 8px;
}

/* ── Content sections ───────────────────────────────────────── */
.section {
  margin-bottom: 40px;
  padding: 32px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.section h2 {
  color: var(--navy);
  font-size: 1.4em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue);
}
.section h3 {
  color: var(--blue);
  font-size: 1.1em;
  margin-top: 24px;
  margin-bottom: 12px;
  font-weight: 600;
}
.section p {
  margin-bottom: 14px;
  color: var(--text-muted);
}
.section ul {
  padding-left: 24px;
  margin: 16px 0;
}
.section li {
  margin-bottom: 8px;
  color: var(--text-muted);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-download {
  display: inline-block;
  padding: 12px 24px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
  text-align: center;
  margin-top: 24px;
}
.btn-download:hover {
  background: #0041CC;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.cta-btn {
  display: inline-block;
  padding: 14px 24px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  text-align: center;
  font-size: 1em;
}
.cta-btn:hover {
  background: #0041CC;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ── Container (wide pages without sidebar) ─────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 28px;
}

/* ── Intro section ──────────────────────────────────────────── */
.intro-section {
  text-align: center;
  margin-bottom: 60px;
}
.intro-section h2 {
  font-size: 2em;
  color: var(--navy);
  margin-bottom: 20px;
}
.intro-section p {
  font-size: 1.1em;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 30px;
}

/* ── Section group / title (category index pages) ───────────── */
.section-group {
  margin-bottom: 80px;
}
.section-title {
  font-size: 1.8em;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--blue);
}

/* ── Formations grid & cards ────────────────────────────────── */
.formations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}
.formation-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 40px 32px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.formation-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(11, 26, 74, 0.12);
}
.formation-card h3 {
  font-size: 1.5em;
  color: var(--navy);
  margin-bottom: 12px;
}
.formation-card p {
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-grow: 1;
}

.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.detail-item {
  font-size: 0.9em;
}
.detail-item strong {
  color: var(--blue);
  display: block;
  margin-bottom: 4px;
}
.detail-item p {
  color: var(--text-muted);
  margin: 0;
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.footer-links {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.footer-col h5 {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.footer-col a:hover {
  color: var(--blue);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .page-title h1      { font-size: 1.4em; }
  .main-content       { grid-template-columns: 1fr; }
  .sidebar            { position: relative; top: 0; }
  .formations-grid    { grid-template-columns: 1fr; }
  .footer-bottom      { flex-direction: column; align-items: flex-start; }
}
