* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', sans-serif;
  background: #f0f4f8;
  color: #2d3748;
}
header {
  background: linear-gradient(135deg, #003189, #0051d4);
  color: white;
  padding: 30px 40px;
  display: flex;
  align-items: center;
  gap: 20px;
}
header .logo {
  font-size: 48px;
}
header h1 {
  font-size: 28px;
  font-weight: 700;
}
header p {
  font-size: 14px;
  opacity: 0.85;
  margin-top: 4px;
}
.stats {
  background: white;
  padding: 15px 40px;
  display: flex;
  gap: 30px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  color: #4a5568;
}
.stats span { font-weight: 700; color: #003189; }
.search-bar {
  padding: 20px 40px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}
.search-bar input {
  width: 100%;
  max-width: 500px;
  padding: 10px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.search-bar input:focus { border-color: #003189; }
.container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}
.container.full-width {
  max-width: none;
  margin: 30px 0;
  padding: 0 30px;
}
.category {
  margin-bottom: 40px;
}
.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid;
}
.category-header h2 {
  font-size: 20px;
  font-weight: 700;
}
.category-header .count {
  background: #e2e8f0;
  color: #4a5568;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}
.cat-securite .category-header { border-color: #e53e3e; }
.cat-securite .category-header h2 { color: #e53e3e; }
.cat-reseau .category-header { border-color: #3182ce; }
.cat-reseau .category-header h2 { color: #3182ce; }
.cat-ad .category-header { border-color: #805ad5; }
.cat-ad .category-header h2 { color: #805ad5; }
.cat-infra .category-header { border-color: #d69e2e; }
.cat-infra .category-header h2 { color: #d69e2e; }
.cat-deploy .category-header { border-color: #38a169; }
.cat-deploy .category-header h2 { color: #38a169; }
.cat-sauvegarde .category-header { border-color: #dd6b20; }
.cat-sauvegarde .category-header h2 { color: #dd6b20; }
.cat-logiciels .category-header { border-color: #00b5d8; }
.cat-logiciels .category-header h2 { color: #00b5d8; }
.cat-rgpd .category-header { border-color: #e53e3e; }
.cat-rgpd .category-header h2 { color: #c53030; }
.cat-ministere .category-header { border-color: #003189; }
.cat-ministere .category-header h2 { color: #003189; }
.terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.term {
  background: white;
  border-radius: 10px;
  padding: 16px 18px;
  border-left: 4px solid;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  transition: transform 0.15s, box-shadow 0.15s;
}
.term:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.cat-securite .term { border-color: #e53e3e; }
.cat-reseau .term { border-color: #3182ce; }
.cat-ad .term { border-color: #805ad5; }
.cat-infra .term { border-color: #d69e2e; }
.cat-deploy .term { border-color: #38a169; }
.cat-sauvegarde .term { border-color: #dd6b20; }
.cat-logiciels .term { border-color: #00b5d8; }
.cat-rgpd .term { border-color: #c53030; }
.cat-ministere .term { border-color: #003189; }
.term h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  color: #1a202c;
}
.term p {
  font-size: 13.5px;
  line-height: 1.55;
  color: #4a5568;
}
.term .example {
  margin-top: 8px;
  padding: 7px 10px;
  background: #ebf8ff;
  border-radius: 6px;
  font-size: 12.5px;
  color: #2b6cb0;
  border-left: 3px solid #90cdf4;
}
.term .example::before { content: "💡 Ex : "; font-weight: 700; }
.term .retenir {
  margin-top: 8px;
  padding: 7px 10px;
  background: #fffaf0;
  border-radius: 6px;
  font-size: 12.5px;
  color: #c05621;
  border-left: 3px solid #fbd38d;
}
.term .retenir::before { content: "⚡ Retenir : "; font-weight: 700; }
.hidden { display: none !important; }
footer {
  text-align: center;
  padding: 30px;
  color: #a0aec0;
  font-size: 13px;
}
.emoji { font-size: 22px; }

/* Navigation */
.site-nav {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 40px;
  display: flex;
  gap: 4px;
}
.nav-link {
  display: inline-block;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-link:hover { color: #003189; border-color: #b8c8e8; }
.nav-link.active { color: #003189; border-color: #003189; }

/* Barre de filtres catégories */
.filter-bar {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 40px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid #e2e8f0;
  background: white;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-btn:hover { border-color: #b8c8e8; color: #003189; }
.filter-btn.active { background: #003189; color: white; border-color: #003189; }

/* Couleurs actives par catégorie */
.filter-btn.f-securite.active  { background: #e53e3e; border-color: #e53e3e; }
.filter-btn.f-reseau.active    { background: #3182ce; border-color: #3182ce; }
.filter-btn.f-ad.active        { background: #805ad5; border-color: #805ad5; }
.filter-btn.f-infra.active     { background: #d69e2e; border-color: #d69e2e; }
.filter-btn.f-deploy.active    { background: #38a169; border-color: #38a169; }
.filter-btn.f-sauvegarde.active { background: #dd6b20; border-color: #dd6b20; }
.filter-btn.f-logiciels.active { background: #00b5d8; border-color: #00b5d8; }
.filter-btn.f-rgpd.active      { background: #c53030; border-color: #c53030; }
.filter-btn.f-ministere.active { background: #003189; border-color: #003189; }
.filter-btn.f-organigramme.active { background: #553c9a; border-color: #553c9a; }

/* Hover coloré selon catégorie */
.filter-btn.f-securite:hover   { border-color: #e53e3e; color: #e53e3e; }
.filter-btn.f-reseau:hover     { border-color: #3182ce; color: #3182ce; }
.filter-btn.f-ad:hover         { border-color: #805ad5; color: #805ad5; }
.filter-btn.f-infra:hover      { border-color: #d69e2e; color: #d69e2e; }
.filter-btn.f-deploy:hover     { border-color: #38a169; color: #38a169; }
.filter-btn.f-sauvegarde:hover { border-color: #dd6b20; color: #dd6b20; }
.filter-btn.f-logiciels:hover  { border-color: #00b5d8; color: #00b5d8; }
.filter-btn.f-rgpd:hover       { border-color: #c53030; color: #c53030; }
.filter-btn.f-ministere:hover  { border-color: #003189; color: #003189; }
.filter-btn.f-organigramme:hover { border-color: #553c9a; color: #553c9a; }

/* Cas Pratique */
.cas-section { margin-bottom: 40px; }
.cas-intro {
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 20px;
  line-height: 1.6;
  background: #f7fafc;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 4px solid #003189;
}
.cas-bloc {
  margin-bottom: 40px;
}
.cas-bloc-title {
  font-size: 18px;
  font-weight: 700;
  color: #003189;
  padding-bottom: 10px;
  border-bottom: 3px solid #003189;
  margin-bottom: 20px;
}
/* Steps */
.cas-steps { display: flex; flex-direction: column; gap: 12px; }
.cas-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: white;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}
.step-num {
  background: #003189;
  color: white;
  font-weight: 700;
  font-size: 16px;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-body strong {
  display: block;
  font-size: 15px;
  color: #1a202c;
  margin-bottom: 4px;
}
.step-body p { font-size: 13.5px; color: #4a5568; line-height: 1.55; }
/* Cards grid */
.cas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.cas-card {
  background: white;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  border-left: 4px solid #ccc;
}
.cas-card.tip { border-color: #38a169; }
.cas-card.erreur { border-color: #e53e3e; }
.cas-card.theme { border-color: #805ad5; }
.cas-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.cas-card.tip .cas-card-title { color: #276749; }
.cas-card.erreur .cas-card-title { color: #c53030; }
.cas-card.theme .cas-card-title { color: #553c9a; }
.cas-card p { font-size: 13px; color: #4a5568; line-height: 1.55; }
/* Phrases */
.cas-phrases { display: flex; flex-direction: column; gap: 10px; }
.cas-phrase {
  background: white;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: #2d3748;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border-left: 4px solid #d69e2e;
}
.phrase-label {
  display: inline-block;
  background: #d69e2e;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cas Pratique — composants supplémentaires */
.cas-card.blue { border-color: #3182ce; background: #ebf8ff; }
.cas-card.blue .cas-card-title { color: #2b6cb0; }
.cas-card.orange { border-color: #dd6b20; background: #fffaf0; }
.cas-card.orange .cas-card-title { color: #c05621; }
.cas-card.tip { background: #f0fff4; }
.cas-card.erreur { background: #fff5f5; }
.cas-card.theme { background: #faf5ff; }
.cas-card ul { list-style: none; padding: 0; margin-top: 8px; }
.cas-card ul li {
  font-size: 13px; color: #4a5568; padding: 4px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06); line-height: 1.5;
}
.cas-card ul li:last-child { border-bottom: none; }
.cas-card ul li::before { content: "→ "; font-weight: 700; opacity: 0.5; }

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 20px; position: relative; }
.timeline-item:not(:last-child)::before {
  content: ''; position: absolute;
  left: 27px; top: 60px; bottom: 0; width: 2px;
  background: #e2e8f0;
}
.timeline-dot {
  flex-shrink: 0; width: 56px; height: 56px;
  background: #003189; color: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; margin-top: 4px;
}
.timeline-content { flex: 1; padding-bottom: 24px; }
.timeline-content h3 { font-size: 15px; font-weight: 700; color: #003189; margin-bottom: 4px; }
.time-badge {
  display: inline-block; background: #ebf4ff; color: #2b6cb0;
  font-size: 12px; font-weight: 700; padding: 2px 10px;
  border-radius: 12px; margin-bottom: 10px;
}
.timeline-content p { font-size: 13.5px; color: #4a5568; line-height: 1.6; }

/* Structure intro/dev/ccl */
.structure-block {
  border: 2px solid #e2e8f0; border-radius: 10px;
  overflow: hidden; margin-bottom: 14px;
}
.structure-header {
  padding: 11px 18px; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 10px;
}
.structure-header.intro { background: #ebf4ff; color: #2b6cb0; border-bottom: 2px solid #bee3f8; }
.structure-header.dev   { background: #f0fff4; color: #276749; border-bottom: 2px solid #9ae6b4; }
.structure-header.ccl   { background: #fffaf0; color: #c05621; border-bottom: 2px solid #fbd38d; }
.structure-body { padding: 14px 18px; font-size: 13.5px; color: #4a5568; line-height: 1.7; }
.structure-body code {
  background: #f7fafc; padding: 2px 6px; border-radius: 4px;
  font-family: monospace; font-size: 13px; color: #2d3748;
}

/* Exemple de réponse */
.exemple-reponse {
  background: #f7fafc; border-radius: 10px;
  padding: 20px 24px; font-size: 13.5px; color: #2d3748;
  border: 2px dashed #e2e8f0; line-height: 1.8;
}
.exemple-reponse .tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 2px 8px; border-radius: 4px; margin-bottom: 6px;
}
.tag.intro { background: #bee3f8; color: #2b6cb0; }
.tag.dev   { background: #9ae6b4; color: #276749; }
.tag.ccl   { background: #fbd38d; color: #c05621; }

/* Alertes */
.alert {
  border-radius: 10px; padding: 14px 18px;
  font-size: 13.5px; line-height: 1.6; margin-bottom: 16px;
  display: flex; gap: 14px; align-items: flex-start;
}
.alert .icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.alert.info    { background: #ebf8ff; border-left: 4px solid #3182ce; color: #2a4365; }
.alert.danger  { background: #fff5f5; border-left: 4px solid #e53e3e; color: #742a2a; }
.alert.warning { background: #fffaf0; border-left: 4px solid #dd6b20; color: #7b341e; }
.alert.success { background: #f0fff4; border-left: 4px solid #38a169; color: #22543d; }

/* Pièges */
.piege-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.piege-item { padding: 14px 16px; border-radius: 8px; font-size: 13.5px; line-height: 1.5; }
.piege-item.mauvais { background: #fff5f5; border-left: 3px solid #e53e3e; color: #742a2a; }
.piege-item.bon     { background: #f0fff4; border-left: 3px solid #38a169; color: #22543d; }
.piege-item .verdict {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  margin-bottom: 6px; display: block; letter-spacing: 0.5px;
}

/* Checklist */
.checklist { list-style: none; padding: 0; }
.checklist li {
  padding: 10px 14px; border-radius: 8px; margin-bottom: 8px;
  font-size: 13.5px; display: flex; gap: 12px; align-items: flex-start;
  background: #f7fafc; border: 1px solid #e2e8f0;
}
.checklist li .check { font-size: 18px; flex-shrink: 0; }
.checklist li strong { display: block; color: #1a202c; margin-bottom: 2px; font-size: 14px; }
.checklist li span { color: #718096; font-size: 13px; }

@media (max-width: 640px) {
  .piege-grid { grid-template-columns: 1fr; }
  .cas-grid { grid-template-columns: 1fr; }
}

/* Organigramme */
.org-section { margin-bottom: 40px; }
.org-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding-bottom: 10px; border-bottom: 3px solid #003189; }
.org-header h2 { font-size: 20px; font-weight: 700; color: #003189; }
.org-wrap { overflow-x: auto; padding: 10px 0 30px; }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; }
.org-tree { display: flex; justify-content: center; }
.org-tree ul { display: flex; justify-content: center; padding-top: 20px; position: relative; }
.org-tree ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 2px solid #b8c8e8; height: 20px; }
.org-tree li { display: flex; flex-direction: column; align-items: center; padding: 0 8px; position: relative; }
.org-tree li::before, .org-tree li::after { content: ''; position: absolute; top: 0; border-top: 2px solid #b8c8e8; width: 50%; }
.org-tree li::before { right: 50%; }
.org-tree li::after { left: 50%; }
.org-tree li:only-child::before, .org-tree li:only-child::after { display: none; }
.org-tree li:first-child::before { display: none; }
.org-tree li:last-child::after { display: none; }
.org-node { background: white; border: 2px solid #003189; border-radius: 8px; padding: 8px 14px; text-align: center; min-width: 120px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-top: 20px; position: relative; }
.org-node::before { content: ''; position: absolute; top: -20px; left: 50%; border-left: 2px solid #b8c8e8; height: 20px; }
.org-tree > li > .org-node::before { display: none; }
.org-node .nt { font-weight: 700; font-size: 13px; color: #003189; }
.org-node .nd { font-size: 11px; color: #718096; margin-top: 3px; }
.org-node.root { background: linear-gradient(135deg, #003189, #0051d4); }
.org-node.root .nt { color: white; }
.org-node.it { border-color: #805ad5; }
.org-node.it .nt { color: #805ad5; }
