/* ============================================================
   DESIGN SYSTEM — Synaps Network Academy
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

/* Variables */
:root {
  --black:       #111827;
  --white:       #ffffff;
  --off-white:   #fafaf9;
  --border:      #e7e5e4;
  --grey-text:   #6b7280;
  --grey-light:  #9ca3af;
  --grey-faint:  #f3f4f6;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 4px;
  --transition: 160ms ease;
  --shadow-hover: 0 4px 16px rgba(17,24,39,.08);

  --max-width: 1100px;
  --nav-height: 64px;
  --section-pad: 72px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font); background: var(--white); color: var(--black); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-pad) 0;
}

.section--alt {
  background: var(--off-white);
}

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--grey-light);
}

.section-header {
  margin-bottom: 36px;
}

.section-header .label {
  display: block;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
}

.section-header__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.link-underline {
  font-size: 13px;
  color: var(--grey-text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color var(--transition), border-color var(--transition);
}
.link-underline:hover { color: var(--black); border-color: var(--black); }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 2px solid var(--black);
  height: var(--nav-height);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav__name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .2px;
}

.nav__sub {
  font-size: 9px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__link {
  font-size: 13px;
  color: var(--grey-text);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--black);
  transition: width 220ms ease;
}
.nav__link:hover { color: var(--black); }
.nav__link:hover::after { width: 100%; }

.nav__lang {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--white);
  background: var(--black);
  padding: 4px 10px;
  border-radius: var(--radius);
  transition: opacity var(--transition);
}
.nav__lang:hover { opacity: .8; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav--open .nav__links {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--nav-height); left: 0; right: 0;
  background: var(--white);
  padding: 24px;
  border-bottom: 1px solid var(--border);
  gap: 20px;
  align-items: flex-start;
}
.nav--open .nav__hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--open .nav__hamburger span:nth-child(2) { opacity: 0; }
.nav--open .nav__hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Publications dropdown --------------------------------- */
.nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--grey-light);
  border-radius: var(--radius);
  transition: color var(--transition), transform var(--transition);
}
.nav__caret:hover { color: var(--black); }
.nav__item--open .nav__caret { color: var(--black); transform: rotate(180deg); }

.nav__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 18px);
  left: 0;
  flex-direction: column;
  gap: 18px;
  width: 250px;
  max-width: calc(100vw - 48px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 18px;
  z-index: 110;
}
.nav__item--open .nav__dropdown { display: flex; }

.nav__dropdown-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav__dropdown-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--grey-light);
}
.nav__dropdown-link {
  font-size: 13px;
  color: var(--grey-text);
  transition: color var(--transition);
}
.nav__dropdown-link:hover { color: var(--black); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--black);
  padding: 36px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer__name {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

.footer__sub {
  color: var(--grey-text);
  font-size: 12px;
  margin-top: 3px;
}

.footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  color: var(--black);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius);
  transition: opacity var(--transition);
}
.footer__cta:hover { opacity: .85; }

.footer__emails {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}
.footer__email {
  font-size: 12px;
  color: var(--grey-text);
  transition: color var(--transition);
}
.footer__email:hover { color: var(--white); }
.footer__email-label {
  font-weight: 700;
  color: var(--grey-light);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--border);
}

.hero__eyebrow {
  display: block;
  margin-bottom: 16px;
}

.hero__title {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero__title--dot { color: var(--grey-light); }

.hero__desc {
  max-width: 520px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--grey-text);
  margin-bottom: 32px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn-primary {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--radius);
  transition: opacity var(--transition);
}
.btn-primary:hover { opacity: .85; }

.hero__stats {
  display: flex;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--grey-faint);
}

.stat__number {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.stat__label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--grey-light);
}

/* ============================================================
   FORMATION CARDS (grid)
   ============================================================ */
.formations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.formation-card {
  background: var(--white);
  padding: 24px;
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}

.formation-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  position: relative;
  z-index: 1;
}

.formation-card__title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.formation-card__desc {
  font-size: 12px;
  color: var(--grey-light);
  line-height: 1.55;
}

.formation-card__arrow {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--grey-light);
  transition: color var(--transition), transform var(--transition);
}
.formation-card:hover .formation-card__arrow { color: var(--black); transform: translateX(3px); }

/* ============================================================
   PUBLICATIONS LIST
   ============================================================ */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.pub-row {
  background: var(--white);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition);
}
.pub-row:hover { background: var(--off-white); }

.pub-row__title {
  font-size: 13px;
  font-weight: 600;
}

.pub-row__tag {
  font-size: 10px;
  color: var(--grey-light);
  margin-top: 3px;
}

.pub-row__arrow {
  font-size: 16px;
  color: var(--border);
  transition: color var(--transition), transform var(--transition);
}
.pub-row:hover .pub-row__arrow { color: var(--black); transform: translateX(3px); }

.pub-more {
  background: var(--off-white);
  padding: 12px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--grey-light);
  cursor: pointer;
  transition: color var(--transition);
}
.pub-more:hover { color: var(--black); }

/* ============================================================
   ABOUT
   ============================================================ */
.about__inner {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
}

.about__photo {
  background: var(--border);
  border-radius: var(--radius);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about__photo img { width: 100%; height: 100%; object-fit: cover; }

.about__photo-placeholder {
  color: var(--grey-light);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about__name {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
}

.about__text {
  font-size: 14px;
  color: var(--grey-text);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 11px;
  color: var(--grey-text);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--grey-light);
}

.breadcrumb a { transition: color var(--transition); }
.breadcrumb a:hover { color: var(--black); }
.breadcrumb__sep { margin: 0 8px; color: var(--border); }
.breadcrumb__current { color: var(--black); font-weight: 600; }

/* ============================================================
   FORMATION DETAIL PAGE
   ============================================================ */
.formation-header {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
}

.formation-header__eyebrow {
  display: block;
  margin-bottom: 10px;
}

.formation-header__title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  margin-bottom: 12px;
}

.formation-header__desc {
  max-width: 560px;
  font-size: 15px;
  color: var(--grey-text);
  line-height: 1.75;
  margin-bottom: 28px;
}

.modules-section {
  padding: 48px 0;
}

.module-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.module-card__header {
  background: var(--white);
  padding: 18px 20px;
  border-bottom: 1px solid var(--grey-faint);
}

.module-card__title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 5px;
}

.module-card__tech {
  font-size: 12px;
  color: var(--grey-light);
  line-height: 1.5;
}

.module-card__body {
  background: var(--off-white);
  padding: 14px 20px;
}

.module-card__objectives-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--grey-light);
  margin-bottom: 8px;
}

.module-card__objectives {
  font-size: 12px;
  color: var(--grey-text);
  line-height: 1.8;
  padding-left: 16px;
  list-style: disc;
}

.formation-nav {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.formation-nav__back, .formation-nav__next {
  font-size: 13px;
  color: var(--grey-text);
  transition: color var(--transition);
}
.formation-nav__back:hover, .formation-nav__next:hover { color: var(--black); }
.formation-nav__next { font-weight: 600; }

/* ============================================================
   ARTICLE PAGE (Les Routeurs, Commandes de base Cisco...)
   ============================================================ */
.article-body {
  max-width: 720px;
  padding: 8px 0 24px;
}

.article-body__intro {
  font-size: 15px;
  color: var(--grey-text);
  line-height: 1.8;
  margin-bottom: 8px;
}

.article-section {
  margin-top: 40px;
}

.article-section__title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.article-section__subtitle {
  font-size: 14px;
  font-weight: 700;
  margin: 20px 0 8px;
}

.article-body p {
  font-size: 14px;
  color: var(--grey-text);
  line-height: 1.85;
  margin-bottom: 14px;
}

.article-body ul {
  margin: 0 0 14px;
  padding-left: 0;
}

.article-body ul li {
  position: relative;
  font-size: 14px;
  color: var(--grey-text);
  line-height: 1.7;
  padding-left: 20px;
  margin-bottom: 6px;
}

.article-body ul li::before {
  content: '';
  position: absolute;
  left: 4px; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--grey-light);
}

.article-body strong {
  color: var(--black);
  font-weight: 700;
}

.code-block {
  background: var(--black);
  color: #e5e7eb;
  font-family: 'SF Mono', 'Cascadia Code', Consolas, 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.8;
  padding: 18px 22px;
  border-radius: var(--radius);
  overflow-x: auto;
  white-space: pre;
  margin: 16px 0 20px;
}

.code-block .cmt { color: #9ca3af; }
.code-block .kw { color: #93c5fd; }

.command-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  background: var(--white);
}

.command-card__name {
  display: inline-block;
  font-family: 'SF Mono', 'Cascadia Code', Consolas, 'Courier New', monospace;
  font-size: 13px;
  font-weight: 700;
  background: var(--grey-faint);
  padding: 3px 10px;
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.command-card__desc {
  font-size: 13px;
  color: var(--grey-text);
  line-height: 1.7;
  margin-bottom: 12px;
}

.command-card .code-block { margin: 0; }

.article-figure {
  margin: 28px 0 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--off-white);
}
.article-figure figcaption {
  padding: 12px 18px;
  font-size: 12px;
  color: var(--grey-text);
  line-height: 1.6;
  background: var(--off-white);
  border-top: 1px solid var(--border);
}
.article-figure figcaption strong { color: var(--black); }

.article-figure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0 36px;
}
.article-figure-grid .article-figure { margin: 0; }

.skills-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.article-body .skills-list li {
  position: relative;
  font-size: 13px;
  color: var(--grey-text);
  line-height: 1.6;
  padding-left: 22px;
  margin-bottom: 0;
}
.article-body .skills-list li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0;
  width: auto; height: auto;
  border-radius: 0;
  background: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
}

@media (max-width: 760px) {
  .article-figure-grid { grid-template-columns: 1fr; }
  .skills-list { grid-template-columns: 1fr; }
}

.article-nav {
  padding: 24px 0;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.article-nav__back, .article-nav__next {
  font-size: 13px;
  color: var(--grey-text);
  transition: color var(--transition);
}
.article-nav__back:hover, .article-nav__next:hover { color: var(--black); }
.article-nav__next { font-weight: 600; }

@media (max-width: 640px) {
  .code-block { font-size: 11px; padding: 14px 16px; }
  .article-nav { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ============================================================
   PUBLICATIONS PAGE
   ============================================================ */
.pub-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filter-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--grey-text);
  background: var(--white);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.pub-full-row {
  background: var(--white);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition);
}
.pub-full-row:hover { background: var(--off-white); }
.pub-full-row__title { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.pub-full-row__tag {
  display: inline-block;
  font-size: 10px;
  color: var(--grey-light);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 20px;
}
.pub-full-row__arrow {
  font-size: 18px;
  color: var(--border);
  transition: color var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.pub-full-row:hover .pub-full-row__arrow { color: var(--black); transform: translateX(4px); }

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in.delay-1 { transition-delay: 0.1s; }
.fade-in.delay-2 { transition-delay: 0.2s; }
.fade-in.delay-3 { transition-delay: 0.3s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --section-pad: 56px; }
}

@media (max-width: 640px) {
  :root { --section-pad: 48px; }

  .nav__links { display: none; }
  .nav__hamburger { display: flex; }

  .nav__item { flex-wrap: wrap; width: 100%; }
  .nav__dropdown {
    position: static;
    flex: 1 0 100%;
    width: 100%;
    max-width: none;
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    margin-top: 14px;
    padding: 14px 0 0 4px;
  }

  .hero { padding: 48px 0 40px; }
  .hero__stats { gap: 24px; }

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

  .about__inner { grid-template-columns: 1fr; }
  .about__photo { width: 100px; height: 100px; }

  .footer__inner { flex-direction: column; align-items: flex-start; gap: 20px; }

  .formation-nav { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ============================================================
   FOCUS VISIBILITY (keyboard navigation)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
  border-radius: var(--radius);
}

@media (max-width: 768px) {
  .about__inner { grid-template-columns: 1fr; }
  .about__photo { width: 140px; height: 140px; }
}

/* ============================================================
   REVENTE
   ============================================================ */
.revente-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--grey-text);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.revente-preview {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.revente-preview__icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.revente-preview__icon img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.revente-preview__text {
  font-size: 14px;
  color: var(--grey-text);
  line-height: 1.8;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .revente-preview { flex-direction: column; gap: 16px; padding: 20px; }
}

/* ============================================================
   ABOUT — BADGES & CERTIFICATES
   ============================================================ */
.about__badges {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: fit-content;
}

.about__badge {
  height: 96px;
  width: auto;
  object-fit: contain;
}

.about__certs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
}

.about__cert-link {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.about__cert-link:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.about__cert-link img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: top;
  display: block;
}
.about__cert-caption {
  display: block;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--grey-text);
  background: var(--off-white);
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .about__certs { grid-template-columns: 1fr; }
  .about__badge { height: 56px; }
}

/* Empty state for publications filter */
.pub-empty {
  padding: 24px 20px;
  text-align: center;
}
