/* ============================================
   lab.unmondededifferences.fr — components.css
   Nav, cards, timeline, formulaire, footer
   ============================================ */

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8,12,16,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: border-bottom-color 0.3s;
}
nav.scrolled { border-bottom-color: rgba(0,255,136,0.15); }

.nav-logo {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--green);
  text-decoration: none;
  letter-spacing: 0.05em;
}
.nav-logo span { color: var(--muted); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: var(--green); }

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 1px;
  background: var(--green);
}

.nav-cta {
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 14px;
  border: 1px solid var(--green);
  color: var(--green) !important;
  text-decoration: none;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: rgba(0,255,136,0.1) !important; }

/* HERO CARD */
.hero-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 2rem;
  position: relative;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}
.hero-photo {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--bg4);
  border: 2px solid var(--border);
  margin-bottom: 1.2rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 22px;
  color: var(--green);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-card h3 {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.hero-card .role {
  font-size: 12px;
  color: var(--green);
  font-family: var(--mono);
  margin-bottom: 1.2rem;
}
.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}
.stat {
  background: var(--bg3);
  padding: 0.75rem;
  border: 1px solid var(--border);
}
.stat .val {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}
.stat .lbl {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0.04em;
}
.certif-list { display: flex; flex-direction: column; gap: 0.5rem; }
.certif {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.certif::before { content: '▸'; color: var(--blue); flex-shrink: 0; }

/* TIMELINE */
.timeline { display: flex; flex-direction: column; position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 11px; top: 12px; bottom: 12px;
  width: 1px;
  background: var(--border);
}
.tl-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
  position: relative;
}
.tl-dot {
  width: 24px; height: 24px;
  background: var(--bg2);
  border: 2px solid var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  z-index: 1;
}
.tl-dot.blue  { border-color: var(--blue); }
.tl-dot.amber { border-color: var(--amber); }
.tl-dot-inner {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
}
.tl-dot.blue  .tl-dot-inner { background: var(--blue); }
.tl-dot.amber .tl-dot-inner { background: var(--amber); }
.tl-content {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}
.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.tl-org { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--green); }
.tl-org.blue  { color: var(--blue); }
.tl-org.amber { color: var(--amber); }
.tl-org.white { color: var(--text); }
.tl-period { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
.tl-role { font-size: 15px; font-weight: 500; margin-bottom: 0.6rem; }
.tl-desc { font-size: 13.5px; color: var(--muted); line-height: 1.65; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }

/* MODULE CARDS */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.module-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.module-card:hover { border-color: var(--green); transform: translateY(-2px); }
.module-icon {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.module-icon::before { content: ''; width: 16px; height: 1px; background: var(--green); }
.module-card h3 { font-size: 15px; font-weight: 500; margin-bottom: 0.6rem; line-height: 1.3; }
.module-card p { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 1rem; }
.module-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.module-meta span { color: var(--blue); }

/* LAB CARDS */
.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.lab-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}
.lab-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.lab-card:hover { border-color: rgba(0,255,136,0.3); }
.lab-card:hover::after { transform: scaleX(1); }
.lab-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 8px;
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-n8n    { background: rgba(255,100,0,0.15); color: #ff6400; border: 1px solid rgba(255,100,0,0.3); }
.badge-ai     { background: rgba(59,158,255,0.15); color: var(--blue); border: 1px solid rgba(59,158,255,0.3); }
.badge-code   { background: rgba(0,255,136,0.15); color: var(--green); border: 1px solid rgba(0,255,136,0.3); }
.badge-notion { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid var(--border); }
.lab-card h3 { font-size: 15px; font-weight: 500; margin-bottom: 0.5rem; }
.lab-card p  { font-size: 13px; color: var(--muted); line-height: 1.6; }
.lab-stack   { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 1rem; }

/* BLOG CARDS */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.blog-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.2s, transform 0.2s;
}
.blog-card:hover { border-color: var(--blue); transform: translateY(-2px); color: inherit; }
.blog-date { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 0.75rem; }
.blog-card h3 { font-size: 15px; font-weight: 500; line-height: 1.35; margin-bottom: 0.5rem; }
.blog-card p  { font-size: 13px; color: var(--muted); line-height: 1.6; }
.blog-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 8px;
  margin-top: 0.75rem;
  background: rgba(59,158,255,0.1);
  color: var(--blue);
  border: 1px solid rgba(59,158,255,0.25);
}

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.contact-links { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  padding: 0.75rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}
.contact-link:hover { border-color: var(--green); color: var(--green); }
.contact-link .cl-icon { color: var(--green); font-size: 16px; width: 20px; flex-shrink: 0; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1rem;
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--green); }
.form-group select option { background: var(--bg2); }

/* FOOTER */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 2rem;
  position: relative;
  z-index: 1;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-left { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.footer-left span { color: var(--green); }
.footer-nav { display: flex; gap: 1.5rem; list-style: none; flex-wrap: wrap; }
.footer-nav a { font-family: var(--mono); font-size: 11px; color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--green); }
.footer-right { font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* ARTICLE BLOG */
.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem;
}
.article-body { font-size: 15px; line-height: 1.8; color: var(--text); }
.article-body h2 {
  font-size: 1.4rem;
  margin: 2.5rem 0 1rem;
  color: var(--green);
}
.article-body h3 { font-size: 1.1rem; margin: 2rem 0 0.75rem; }
.article-body p { margin-bottom: 1.25rem; color: var(--muted); }
.article-body p strong { color: var(--text); }
.article-body ul, .article-body ol {
  margin: 0 0 1.25rem 1.5rem;
  color: var(--muted);
}
.article-body li { margin-bottom: 0.4rem; }
.article-body code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg3);
  padding: 2px 6px;
  border: 1px solid var(--border);
  color: var(--green);
}
.article-body pre {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.article-body pre code { background: none; border: none; padding: 0; }
.article-body blockquote {
  border-left: 3px solid var(--green);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--bg2);
  color: var(--muted);
  font-style: italic;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-card { display: none; }
  .modules-grid { grid-template-columns: 1fr; }
  .lab-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
}

/* ============================================
   LIGHT MODE — overrides composants
   ============================================ */

[data-theme="light"] nav {
  background: rgba(248,250,252,0.92);
  border-bottom-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .nav-logo { color: var(--green); }
[data-theme="light"] .nav-logo span { color: var(--muted); }
[data-theme="light"] .nav-links a { color: var(--muted); }
[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active { color: var(--green); }
[data-theme="light"] .nav-cta { border-color: var(--green); color: var(--green) !important; }
[data-theme="light"] .nav-cta:hover { background: rgba(15,76,129,0.08) !important; }

[data-theme="light"] .hero-card { background: #ffffff; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .hero-card::before { background: linear-gradient(90deg, #0f4c81, #1d7bc4); }
[data-theme="light"] .hero-photo { background: #e0f0ff; border-color: #bfdbfe; color: #0f4c81; }
[data-theme="light"] .stat { background: #f1f5f9; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .stat .val { color: var(--green); }
[data-theme="light"] .stat .lbl { color: var(--muted); }
[data-theme="light"] .certif { color: var(--muted); }
[data-theme="light"] .certif::before { color: var(--blue); }

[data-theme="light"] .tl-content { background: #ffffff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .tl-dot { background: #ffffff; }
[data-theme="light"] .timeline::before { background: rgba(0,0,0,0.1); }

[data-theme="light"] .module-card { background: #ffffff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .module-card:hover { border-color: var(--green); }
[data-theme="light"] .module-card p { color: var(--muted); }

[data-theme="light"] .lab-card { background: #ffffff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .lab-card p { color: var(--muted); }

[data-theme="light"] .blog-card { background: #ffffff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .blog-card:hover { border-color: var(--blue); }
[data-theme="light"] .blog-card p { color: var(--muted); }

[data-theme="light"] .contact-link { background: #ffffff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .contact-link:hover { border-color: var(--green); color: var(--green); }

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea {
  background: #ffffff;
  border-color: rgba(0,0,0,0.15);
  color: var(--text);
}
[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group select:focus,
[data-theme="light"] .form-group textarea:focus { border-color: var(--green); }

[data-theme="light"] footer { background: #f1f5f9; border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .footer-left { color: var(--muted); }
[data-theme="light"] .footer-left span { color: var(--green); }
[data-theme="light"] .footer-nav a { color: var(--muted); }
[data-theme="light"] .footer-right { color: var(--muted); }

/* ============================================
   TAILLES TEXTE AUGMENTÉES (+15%)
   ============================================ */

.tl-desc { font-size: 14px; }
.tl-role { font-size: 15px; }
.module-card p { font-size: 14px; }
.module-meta { font-size: 12px; }
.lab-card p { font-size: 14px; }
.blog-card p { font-size: 14px; }
.blog-card h3 { font-size: 16px; }
.module-card h3 { font-size: 16px; }
.lab-card h3 { font-size: 16px; }
.contact-link { font-size: 14px; }
.certif { font-size: 12px; }
.stat .lbl { font-size: 11px; }

[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(15,76,129,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,76,129,0.04) 1px, transparent 1px);
}

/* ============================================
   MENU HAMBURGER MOBILE
   ============================================ */

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: 1px solid var(--border);
  padding: 8px 10px;
  transition: border-color 0.2s;
}
.nav-hamburger:hover { border-color: var(--green); }
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0;
    z-index: 99;
  }

  .nav-links.open { display: flex; }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 13px;
    color: var(--muted);
  }

  .nav-links a:hover,
  .nav-links a.active { color: var(--green); background: var(--bg3); }

  .nav-links .nav-cta {
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--green) !important;
  }

  .nav-links li:last-child {
    padding: 0.75rem 1.5rem;
    border-bottom: none;
  }

  /* Hero card cachée sur mobile */
  .hero-card { display: none; }

  /* Contact grid en colonne */
  .contact-grid { grid-template-columns: 1fr; }

  /* Modules et lab grids en colonne */
  .modules-grid,
  .lab-grid,
  .blog-grid { grid-template-columns: 1fr; }
}

/* ============================================
   BLOC PONT — CARROUSEL MOBILE
   ============================================ */

.pont-carousel {
  display: none;
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 0.35s ease;
}

.carousel-slide {
  flex-shrink: 0;
  width: 100%;
}

.pont-dot { 
  width: 8px; 
  height: 8px; 
  border-radius: 50%; 
  background: var(--border); 
  border: none; 
  cursor: pointer; 
  padding: 0;
  transition: background 0.2s;
}
.pont-dot.active { background: var(--green); }

.carousel-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 16px;
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.carousel-btn:hover { border-color: var(--green); color: var(--green); }

@media (max-width: 768px) {
  .pont-grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  .pont-cards-desktop { display: none !important; }
  .pont-carousel { display: block !important; }
}

/* NAV-RIGHT — switch + hamburger côte à côte sur mobile */
.nav-right {
  display: none;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .nav-right { display: flex; }

  /* Sur mobile le switch dans nav-right est visible,
     on retire le switch de la liste de liens */
  .nav-links .theme-switch { display: none; }
}

/* ============================================
   ARTICLES BLOG
   ============================================ */

/* Hero article */
.article-hero {
  padding: 8rem 2rem 4rem;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.article-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* Labels de partie (I / II) */
.partie-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.partie-label::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--muted);
}

/* Encadrés "à retenir" */
.retenir {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.retenir-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--amber);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.retenir p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}
.retenir p + p { margin-top: 0.5rem; }

/* Séparateur terminal récit / décryptage */
.terminal-separator {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  padding: 1.5rem 2rem;
  margin: 3.5rem 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.terminal-separator-icon {
  font-family: var(--mono);
  font-size: 1.5rem;
  color: var(--green);
  flex-shrink: 0;
  line-height: 1;
}
.terminal-separator-text { flex: 1; }
.terminal-separator-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.terminal-separator-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}
.terminal-separator-blink {
  font-family: var(--mono);
  font-size: 1.2rem;
  color: var(--green);
  flex-shrink: 0;
  animation: blink-cursor 1.2s step-end infinite;
}
@keyframes blink-cursor { 50% { opacity: 0; } }

/* Navigation bas d'article */
.article-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.article-nav a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.article-nav a:hover { color: var(--green); }

/* Responsive articles */
@media (max-width: 768px) {
  .article-hero { padding: 7rem 1.25rem 3rem; }
  .article-wrap { padding: 0 1.25rem 4rem; }
  .terminal-separator { flex-wrap: wrap; gap: 1rem; }
  .terminal-separator-blink { display: none; }
}
