/* ============================================================
   pages.css — styles partagés pour les pages de contenu
   Expertise, Audit, Formations, Fiches formations
   Identité : #0d1f3c (navy) / #fff / #0066cc
   ============================================================ */

/* ---- Hero sombre générique ---- */
.page-hero-dark {
  background: linear-gradient(135deg, #0a1628 0%, #0d1f3c 55%, #162d54 100%);
  color: #fff;
  padding: 4.5rem 2rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Radial blue glow */
.page-hero-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%,
    rgba(0,102,204,0.22) 0%, transparent 70%);
  pointer-events: none;
}

/* Flight path contrail decoration */
.page-hero-dark::after {
  content: '';
  position: absolute;
  top: 30%;
  left: -5%;
  width: 110%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.04) 20%,
    rgba(255,255,255,0.12) 50%,
    rgba(77,157,224,0.18) 75%,
    transparent 100%);
  transform: rotate(-4deg);
  pointer-events: none;
}

.page-hero-dark .hero-badge {
  display: inline-block;
  padding: 0.28rem 0.85rem;
  background: rgba(0,102,204,0.2);
  border: 1px solid rgba(0,102,204,0.4);
  color: #6ab0f5;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.page-hero-dark h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.page-hero-dark .hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Plane SVG overlay inside hero */
.hero-plane-svg {
  position: absolute;
  right: 5%;
  bottom: 18%;
  opacity: 0.06;
  pointer-events: none;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #888;
  padding: 1rem 0 0;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb-sep {
  color: #ccc;
}

/* ============================================================
   PAGE CONTENT wrapper
   ============================================================ */
.page-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
}

@media (max-width: 768px) {
  .page-body { padding: 2rem 1.25rem; }
}

/* ============================================================
   GRILLE PRESTATIONS (Expertise & Audit)
   ============================================================ */
.section-intro {
  max-width: 720px;
  font-size: 1.05rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0066cc;
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0d1f3c;
  margin: 0 0 1rem;
}

.prestations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 3.5rem;
}

.prestation-card {
  background: #fff;
  border: 1.5px solid #e9ecef;
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.prestation-card:hover {
  border-color: #0066cc;
  box-shadow: 0 6px 24px rgba(0,102,204,0.1);
  transform: translateY(-2px);
}

.prestation-icon {
  width: 44px;
  height: 44px;
  background: #f0f5ff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: #0066cc;
}

.prestation-icon svg { width: 22px; height: 22px; }

.prestation-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0d1f3c;
  margin: 0 0 0.4rem;
}

.prestation-card p {
  font-size: 0.875rem;
  color: #555;
  line-height: 1.55;
  margin: 0;
}

/* Domaines d'intervention */
.domaines-section {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 2rem 2.5rem;
  margin: 0 0 3rem;
}

@media (max-width: 600px) {
  .domaines-section { padding: 1.5rem; }
}

.domaines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.domaine-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: #333;
  font-weight: 500;
}

.domaine-dot {
  width: 8px;
  height: 8px;
  background: #0066cc;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Bloc engagement */
.engagement-block {
  border-left: 4px solid #0d1f3c;
  padding: 1.25rem 1.75rem;
  background: #fff;
  border-radius: 0 12px 12px 0;
  margin-bottom: 3rem;
}

.engagement-block p {
  font-size: 1rem;
  color: #333;
  line-height: 1.65;
  margin: 0;
}

/* CTA pleine largeur */
.page-cta {
  background: linear-gradient(135deg, #0a1628 0%, #0d1f3c 60%, #162d54 100%);
  color: #fff;
  border-radius: 16px;
  padding: 2.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

/* Subtle contrail in CTA */
.page-cta::after {
  content: '';
  position: absolute;
  top: 40%;
  right: 0;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06));
  transform: rotate(-8deg);
  pointer-events: none;
}

@media (max-width: 600px) {
  .page-cta { padding: 2rem 1.5rem; }
}

.page-cta-text h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.35rem;
}

.page-cta-text p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  margin: 0;
}

.btn-cta-white {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  background: #fff;
  color: #0d1f3c;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease;
  min-height: 44px;
}

.btn-cta-white:hover { background: #0066cc; color: #fff; }
.btn-cta-white svg { width: 16px; height: 16px; }

/* ============================================================
   PAGE CATALOGUE FORMATIONS
   ============================================================ */
.qualiopi-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(40,167,69,0.15);
  border: 1px solid rgba(40,167,69,0.35);
  color: #a3f0b9;
  padding: 0.28rem 0.85rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qualiopi-badge svg { width: 13px; height: 13px; }

/* Bloc besoin de formation */
.besoin-block {
  background: #f0f5ff;
  border: 1.5px solid #c5d8f8;
  border-radius: 16px;
  padding: 2rem 2.5rem;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .besoin-block { padding: 1.5rem; }
}

.besoin-block-text h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0d1f3c;
  margin: 0 0 0.4rem;
}

.besoin-block-text p {
  font-size: 0.875rem;
  color: #444;
  line-height: 1.55;
  margin: 0;
  max-width: 520px;
}

.btn-blue {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #0066cc;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  transition: background 150ms ease;
  flex-shrink: 0;
}

.btn-blue:hover { background: #0052a3; }
.btn-blue svg { width: 16px; height: 16px; }

/* ============================================================
   CATALOGUE FORMATIONS — défilement vertical
   ============================================================ */
.formations-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 3.5rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid #dde4f0;
}

.formation-scroll-item {
  background: #fff;
  padding: 2rem 2.5rem;
  border-bottom: 1.5px solid #dde4f0;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1.5rem;
  align-items: start;
  transition: background 200ms ease;
}

.formation-scroll-item:last-child {
  border-bottom: none;
}

.formation-scroll-item:hover {
  background: #f8faff;
}

@media (max-width: 640px) {
  .formation-scroll-item {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 0.75rem;
  }
}

/* Left: number column */
.fsi-num {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #0d1f3c;
  opacity: 0.12;
  line-height: 1;
  padding-top: 0.15rem;
  user-select: none;
}

/* Right: content */
.fsi-content {}

.fsi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.fsi-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0d1f3c;
  margin: 0;
  line-height: 1.3;
}

.fsi-subtitle {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0066cc;
  margin: 0.2rem 0 0.75rem;
}

.fsi-duration {
  background: #0d1f3c;
  color: rgba(255,255,255,0.9);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}

.fsi-objective {
  font-size: 0.9rem;
  color: #4a4a4a;
  line-height: 1.6;
  margin: 0 0 1rem;
  max-width: 700px;
}

.fsi-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.fsi-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.775rem;
  color: #4a6080;
  background: #f0f4fa;
  border: 1px solid #dde4f0;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-weight: 500;
}

.fsi-tag svg { width: 12px; height: 12px; color: #0066cc; }

.fsi-tag.price {
  background: #f0f5ff;
  border-color: #c5d8f8;
  color: #0052a3;
  font-weight: 600;
}

.fsi-prerequisites {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: #666;
  line-height: 1.5;
  padding: 0.6rem 0.9rem;
  background: #fafafa;
  border-left: 3px solid #dde4f0;
  border-radius: 0 6px 6px 0;
}

.fsi-prerequisites strong {
  color: #0d1f3c;
  font-weight: 600;
}

.fsi-admin-edit {
  font-size: 0.75rem;
  color: #aaa;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.75rem;
  border-top: 1px dashed #e9ecef;
  padding-top: 0.5rem;
}

.fsi-admin-edit:hover { color: #0066cc; }

/* Empty state */
.formations-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #888;
}

/* Grille catalogue formations (legacy — kept for detail page) */
.formations-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.formation-catalog-card {
  background: #fff;
  border: 1.5px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
  text-decoration: none;
}

.formation-catalog-card:hover {
  border-color: #0066cc;
  box-shadow: 0 6px 24px rgba(0,102,204,0.1);
  transform: translateY(-2px);
}

.formation-catalog-card-header {
  background: #0d1f3c;
  padding: 1.25rem 1.5rem;
  color: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.formation-catalog-card-header h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

.formation-catalog-duration {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.formation-catalog-card-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.formation-catalog-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0066cc;
}

.formation-catalog-objective {
  font-size: 0.875rem;
  color: #444;
  line-height: 1.55;
}

.formation-catalog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
}

.formation-meta-tag {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: #666;
  background: #f8f9fa;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.formation-meta-tag svg { width: 12px; height: 12px; }

.formation-catalog-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0066cc;
  margin-top: 0.5rem;
}

.formation-catalog-link svg { width: 14px; height: 14px; }

.formation-catalog-card:hover .formation-catalog-link { color: #0052a3; }

/* Edit button for admin */
.formation-admin-edit {
  font-size: 0.78rem;
  color: #888;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #e9ecef;
  margin-top: 0.25rem;
}

.formation-admin-edit:hover { color: #0066cc; }

/* Modalités — accordion */
.modalites-section {
  margin-bottom: 3rem;
}

.modalites-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0d1f3c;
  margin-bottom: 1rem;
}

.modalites-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1.5px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
}

.modalites-list li {
  padding: 0.9rem 1.25rem;
  font-size: 0.875rem;
  color: #333;
  line-height: 1.55;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.modalites-list li:last-child { border-bottom: none; }

.modalite-dot {
  width: 6px;
  height: 6px;
  background: #0066cc;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.45rem;
}

.modalites-list li a { color: #0066cc; }

.page-note {
  font-size: 0.78rem;
  color: #aaa;
  margin-top: 2rem;
  line-height: 1.5;
}

/* ============================================================
   FICHE FORMATION DÉTAIL — layout 2 colonnes
   ============================================================ */
.formation-detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .formation-detail-layout {
    grid-template-columns: 1fr;
  }

  .formation-sidebar {
    order: -1;
  }
}

/* Contenu principal */
.formation-main-content {}

.formation-section {
  margin-bottom: 2.5rem;
}

.formation-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0066cc;
  margin-bottom: 0.5rem;
}

.formation-section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0d1f3c;
  margin: 0 0 0.75rem;
}

.formation-objectif-text {
  font-size: 1.05rem;
  color: #222;
  line-height: 1.7;
  padding: 1.25rem 1.5rem;
  background: #f8f9fa;
  border-left: 4px solid #0066cc;
  border-radius: 0 10px 10px 0;
}

.formation-programme-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.formation-programme-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #333;
  line-height: 1.5;
}

.prog-num {
  width: 24px;
  height: 24px;
  background: #0d1f3c;
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.formation-public-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.formation-public-tag {
  background: #f0f5ff;
  border: 1px solid #c5d8f8;
  color: #0052a3;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
}

/* Sidebar */
.formation-sidebar {
  position: sticky;
  top: 130px;
}

.formation-sidebar-card {
  background: #fff;
  border: 1.5px solid #e9ecef;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.formation-sidebar-header {
  background: linear-gradient(135deg, #0a1628 0%, #0d1f3c 100%);
  color: #fff;
  padding: 1.25rem 1.5rem;
}

.formation-sidebar-header h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.25rem;
}

.formation-sidebar-header .sidebar-subtitle {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
}

.formation-sidebar-body {
  padding: 0;
}

.sidebar-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-meta-item:last-of-type { border-bottom: none; }

.sidebar-meta-icon {
  width: 36px;
  height: 36px;
  background: #f8f9fa;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #0066cc;
}

.sidebar-meta-icon svg { width: 16px; height: 16px; }

.sidebar-meta-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #aaa;
  margin-bottom: 0.15rem;
}

.sidebar-meta-value {
  font-size: 0.875rem;
  color: #222;
  font-weight: 500;
  line-height: 1.4;
}

.sidebar-cta {
  padding: 1.25rem;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-sidebar-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  background: #0066cc;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  min-height: 44px;
  transition: background 150ms ease;
  text-align: center;
}

.btn-sidebar-primary:hover { background: #0052a3; }
.btn-sidebar-primary svg { width: 16px; height: 16px; }

.btn-sidebar-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #666;
  text-decoration: none;
  text-align: center;
}

.btn-sidebar-back:hover { color: #0066cc; }
.btn-sidebar-back svg { width: 14px; height: 14px; }

/* ============================================================
   Responsive final
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .prestation-card,
  .formation-catalog-card,
  .formation-scroll-item,
  .btn-cta-white,
  .btn-blue,
  .btn-sidebar-primary { transition: none; }
}
