/* ==========================================================
   Inraci CO — kaba-ibrahima.be
   Feuille de style : blanc, noir et touches de jaune
   ========================================================== */

:root {
  /* Polices : changer ces trois lignes suffit à changer toute la typo du site */
  --font-title: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-text: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Couleurs */
  --bg: #ffffff;
  --bg2: #f7f7f4;
  --card: #ffffff;
  --text: #111111;
  --muted: #5f5f5a;
  --pop: #ffd60a;        /* le jaune */
  --on-pop: #111111;     /* texte posé sur du jaune */
  --accent: #111111;     /* accent utilisable en texte (le jaune ne se lit pas sur du blanc) */
  --tint: rgba(255,214,10,0.22);
  --glow: rgba(255,200,0,0.55);
  --border: rgba(17,17,17,0.1);
  --border-strong: rgba(17,17,17,0.28);
  --warn: #b45309;
  --nav-bg: rgba(255,255,255,0.9);
  --shadow: 0 4px 24px rgba(17,17,17,0.06);
  --shadow-lg: 0 18px 48px rgba(17,17,17,0.12);
  --shadow-pop: 0 24px 40px -18px var(--glow), 0 12px 26px -14px rgba(17,17,17,0.22);
  --radius: 16px;
  --wrap: 1180px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
[data-theme="dark"] {
  --bg: #0c0c0c;
  --bg2: #131313;
  --card: #181818;
  --text: #f5f5f2;
  --muted: #a3a39d;
  --accent: #ffd60a;
  --tint: rgba(255,214,10,0.13);
  --glow: rgba(255,214,10,0.35);
  --border: rgba(255,255,255,0.1);
  --border-strong: rgba(255,255,255,0.3);
  --warn: #ffb04a;
  --nav-bg: rgba(12,12,12,0.88);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 18px 48px rgba(0,0,0,0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
h1, h2, h3, h4, .card-title, .step-title { font-family: var(--font-title); }
body { background: var(--bg); color: var(--text); font-family: var(--font-text); line-height: 1.6; overflow-x: hidden; transition: background 0.25s, color 0.25s; }
img { max-width: 100%; }
a { color: var(--text); }
::selection { background: var(--pop); color: var(--on-pop); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 2rem; }
.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--pop); color: var(--on-pop); padding: 0.7rem 1.2rem; border-radius: 0 0 8px 0; font-weight: 700; font-size: 0.85rem; }
.skip-link:focus { left: 0; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 150; background: var(--pop); transform: scaleX(0); transform-origin: 0 50%; }

/* ---------- Animations ---------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes wordUp { from { transform: translateY(115%) rotate(4deg); } }
@keyframes drawBar { from { transform: scaleX(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(28px); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes bob { 50% { translate: 0 -7px; } }
@keyframes bobSmall { 50% { translate: 0 -3px; } }
@keyframes drift { to { transform: translate(50px, 36px) scale(1.15); } }
@keyframes gridMove { to { background-position: 28px 28px; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 var(--glow); } 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes packet { 0% { top: 2.2rem; opacity: 0; } 8%, 92% { opacity: 1; } 100% { top: calc(100% - 2.6rem); opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes shine { to { transform: translateX(420%) skewX(-20deg); } }

/* ---------- Navigation ---------- */
.site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: var(--nav-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 72px; }
.logo { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.logo-img { height: 42px; width: 42px; object-fit: cover; border-radius: 10px; transition: transform 0.4s var(--ease); }
.logo:hover .logo-img { transform: translateY(-3px) rotate(-6deg) scale(1.08); }
.logo-text { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; color: var(--text); letter-spacing: 2px; }
.logo-text span { background: var(--pop); color: var(--on-pop); padding: 0.05em 0.25em; border-radius: 4px; margin-left: 0.15em; }
.nav-links { display: flex; align-items: center; gap: 0.3rem; list-style: none; }
.nav-links a { display: block; color: var(--muted); text-decoration: none; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 0.5rem 0.95rem; border-radius: 999px; transition: color 0.2s, background 0.25s, transform 0.3s var(--ease); }
.nav-links a:hover { color: var(--text); background: var(--tint); transform: translateY(-2px); }
.nav-links a.active { color: var(--on-pop); background: var(--pop); }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.3s var(--ease); }
.icon-btn:hover { background: var(--pop); border-color: var(--pop); color: var(--on-pop); transform: translateY(-2px) rotate(-8deg); }
.theme-toggle .icon-sun, [data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.menu-toggle { display: none; }
.menu-toggle .icon-close, .menu-open .menu-toggle .icon-menu { display: none; }
.menu-open .menu-toggle .icon-close { display: block; }

/* ---------- Pages ---------- */
.page { display: none; min-height: calc(100vh - 90px); padding-top: 72px; }
.page.active { display: block; animation: fadeIn 0.35s ease; }
.page.active .page-banner .section-tag { animation: rise 0.6s var(--ease) both; }
.page.active .page-banner h2 { animation: rise 0.8s 0.08s var(--ease) both; }
.page.active .page-banner p { animation: rise 0.8s 0.18s var(--ease) both; }

/* Apparition au défilement */
.js .reveal { opacity: 0; transform: translateY(28px) scale(0.97); filter: blur(6px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), filter 0.7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }
.js .layer.reveal { transform: translateX(-48px); }
.js .layer.reveal.in { transform: none; }

/* ---------- Flottement au survol ----------
   L'élément se soulève, puis flotte doucement tant que la souris reste dessus. */
.card, .stat-item, .skill, .flow li, .contact-info-card, .step-body, .layer {
  position: relative;
  transition: transform 0.4s var(--ease), translate 0.5s var(--ease), box-shadow 0.4s var(--ease), border-color 0.25s;
}
/* Zone invisible sous l'élément : la souris reste « dessus » même quand il monte */
.card::after, .stat-item::after, .skill::after, .flow li::after, .contact-info-card::after, .step-body::after, .layer::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 0; }
@media (hover: hover) {
  .card:hover, .stat-item:hover, .skill:hover, .flow li:hover, .contact-info-card:hover, .step-body:hover, .layer:hover {
    transform: translateY(-8px);
    border-color: var(--pop);
    box-shadow: var(--shadow-pop), inset 0 4px 0 var(--pop);
    animation: bob 2.4s ease-in-out 0.4s infinite;
  }
  .layer:hover { box-shadow: var(--shadow-pop); }
  .card:hover::after, .stat-item:hover::after, .skill:hover::after, .flow li:hover::after, .contact-info-card:hover::after, .step-body:hover::after, .layer:hover::after { height: 18px; }
  .btn:hover, .marquee .chips li:hover { animation: bobSmall 1.8s ease-in-out 0.3s infinite; }
}
/* Halo jaune qui suit le curseur */
.card::before, .stat-item::before, .skill::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 65%); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.card:hover::before, .stat-item:hover::before, .skill:hover::before { opacity: 0.35; }
.card > *, .stat-item > *, .skill > * { position: relative; }

/* ---------- Boutons ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1.7rem; border-radius: 999px; font-family: inherit; font-size: 0.86rem; font-weight: 700; letter-spacing: 0.2px; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: transform 0.3s var(--ease), translate 0.4s var(--ease), box-shadow 0.3s, background 0.2s, color 0.2s, border-color 0.2s; }
.btn .icon { transition: transform 0.3s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn-primary { background: var(--pop); color: var(--on-pop); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -10px var(--glow), 0 6px 14px -8px rgba(17,17,17,0.3); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; box-shadow: none; animation: none; }
.btn-primary::after, .cta-box .btn::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent); transform: skewX(-20deg); }
.btn-primary:hover::after, .cta-box .btn:hover::after { animation: shine 0.8s ease; }
.btn-secondary { background: var(--card); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { transform: translateY(-3px); background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Accueil ---------- */
.hero { position: relative; padding: 5rem 0 4.5rem; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle, var(--border) 1.2px, transparent 1.2px); background-size: 28px 28px; -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent); mask-image: linear-gradient(to bottom, #000 40%, transparent); animation: gridMove 6s linear infinite; }
.hero-blob { position: absolute; border-radius: 50%; background: var(--pop); filter: blur(80px); animation: drift 12s ease-in-out infinite alternate; }
.hero-blob.b1 { width: 340px; height: 340px; top: -150px; right: 6%; opacity: 0.4; }
.hero-blob.b2 { width: 220px; height: 220px; bottom: -150px; left: 34%; opacity: 0.22; animation-duration: 16s; animation-direction: alternate-reverse; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3.5rem; align-items: center; }
.hero-tag { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.9rem; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--card); font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 1.6rem; animation: rise 0.7s var(--ease) both; }
.hero-tag::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--pop); outline: 1.5px solid var(--text); animation: ping 2s ease-out infinite; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 1.4rem; }
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.hero h1 .w > span { display: inline-block; animation: wordUp 0.9s var(--ease) both; animation-delay: calc(0.15s + var(--i) * 0.11s); }
/* Mots surlignés au marqueur jaune */
.highlight { position: relative; isolation: isolate; }
.highlight::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0.06em; height: 0.4em; z-index: -1; background: var(--pop); border-radius: 0.08em; transform-origin: 0 50%; animation: drawBar 0.7s var(--ease) both; animation-delay: calc(0.85s + var(--i, 0) * 0.12s); }
[data-theme="dark"] .highlight { color: var(--pop); }
[data-theme="dark"] .highlight::after { display: none; }
.hero-lead { color: var(--muted); font-size: 1.05rem; line-height: 1.8; margin-bottom: 2rem; max-width: 560px; animation: rise 0.8s 0.6s var(--ease) both; }
.hero-buttons { display: flex; gap: 0.9rem; flex-wrap: wrap; animation: rise 0.8s 0.75s var(--ease) both; }

/* Carte « chaîne réseau » */
.stack { background: var(--card); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; animation: rise 0.9s 0.35s var(--ease) both, float 7s 1.3s ease-in-out infinite; }
.stack-bar { display: flex; align-items: center; gap: 0.45rem; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.stack-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.stack-bar i:first-child { background: var(--pop); }
.stack-bar span { margin-left: 0.5rem; }
.stack-list { position: relative; list-style: none; padding: 1.2rem 1.3rem 1.4rem; }
.stack-list li { position: relative; display: flex; align-items: center; gap: 0.9rem; padding: 0.55rem 0; animation: slideIn 0.6s var(--ease) both; animation-delay: calc(0.7s + var(--i) * 0.14s); }
.stack-list li + li::before { content: ''; position: absolute; left: 19px; top: -0.55rem; height: 1.1rem; border-left: 2px dashed var(--border-strong); }
.stack-list::after { content: ''; position: absolute; left: calc(1.3rem + 14px); width: 12px; height: 12px; border-radius: 50%; background: var(--pop); border: 2px solid var(--text); box-shadow: 0 0 12px 2px var(--glow); animation: packet 3.4s 1.6s linear infinite both; }
.stack-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(var(--tint), var(--tint)), var(--card); color: var(--accent); flex-shrink: 0; position: relative; z-index: 1; }
.stack-name { font-weight: 700; font-size: 0.88rem; line-height: 1.3; }
.stack-role { font-size: 0.75rem; color: var(--muted); }
.stack-ip { margin-left: auto; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; color: var(--text); background: var(--tint); padding: 0.25rem 0.55rem; border-radius: 6px; white-space: nowrap; }
.term { display: flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.3rem; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.74rem; min-height: 2.9rem; }
.term-prompt { font-weight: 700; }
.caret { width: 8px; height: 1.05em; background: var(--pop); outline: 1px solid var(--text); animation: blink 1s steps(1) infinite; }

/* Chiffres clés */
.stats { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 2.5rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.stat-item { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.3rem; border-radius: 14px; background: var(--card); border: 1px solid var(--border); text-decoration: none; color: inherit; }
.stat-icon, .card-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--tint); color: var(--accent); font-size: 1.15rem; flex-shrink: 0; transition: transform 0.4s var(--ease), background 0.3s, color 0.3s; }
.card:hover .card-icon, .stat-item:hover .stat-icon, .contact-info-card:hover .card-icon { transform: scale(1.12) rotate(-8deg); background: var(--pop); color: var(--on-pop); }
.stat-num { display: block; font-family: var(--font-mono); font-size: 1rem; font-weight: 700; }
.stat-label { display: block; font-size: 0.76rem; color: var(--muted); font-weight: 500; line-height: 1.4; }
.stat-item br { display: none; }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section + .section { padding-top: 0.5rem; }
.section-alt { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 4rem 0 !important; margin: 0.5rem 0 4rem; }
.page-banner { padding: 3.2rem 0 2.4rem; background: var(--bg2); border-bottom: 1px solid var(--border); }
.page-banner h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.8px; margin: 0.8rem 0 0.4rem; }
.page-banner h2::after { content: ''; display: block; width: 64px; height: 6px; border-radius: 3px; margin-top: 0.7rem; background: var(--pop); transform-origin: 0 50%; animation: drawBar 0.8s 0.45s var(--ease) both; }
.page-banner p { color: var(--muted); font-size: 0.98rem; }
.section-tag { display: inline-block; background: var(--pop); color: var(--on-pop); padding: 0.25rem 0.6rem; border-radius: 6px; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; }
.section-title { font-size: 1.65rem; font-weight: 800; margin: 0.8rem 0; letter-spacing: -0.5px; line-height: 1.25; }
.section-desc { color: var(--muted); font-size: 0.95rem; line-height: 1.75; margin-bottom: 2rem; max-width: 680px; }
.section-desc strong { color: var(--text); }

/* Cartes */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: flex-start; }
.card-icon { margin-bottom: 1.1rem; }
.card-title { font-weight: 700; font-size: 1rem; margin-bottom: 0.5rem; }
.card-desc { color: var(--muted); font-size: 0.87rem; line-height: 1.65; }
.badge { display: inline-block; font-size: 0.65rem; font-weight: 700; padding: 0.3rem 0.8rem; border-radius: 20px; text-transform: uppercase; letter-spacing: 1px; color: var(--text); }
.card .badge { margin-top: auto; }
.card .card-desc { margin-bottom: 1.1rem; }
.badge-net { background: var(--tint); }
.badge-sys { background: var(--text); color: var(--bg); }
.badge-sec { background: var(--pop); color: var(--on-pop); }
.badge-app { box-shadow: inset 0 0 0 1.5px var(--text); }

/* Bandeau défilant des outils */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; }
.chips li { font-family: var(--font-mono); font-size: 0.85rem; white-space: nowrap; padding: 0.6rem 1.2rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--card); transition: background 0.3s, border-color 0.3s, color 0.3s, translate 0.4s var(--ease); }
.chips li:hover { background: var(--pop); border-color: var(--pop); color: var(--on-pop); }
.marquee { overflow: hidden; padding: 0.6rem 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee.run .chips { flex-wrap: nowrap; width: max-content; padding-right: 0.6rem; animation: marquee 32s linear infinite; }
.marquee.run:hover .chips { animation-play-state: paused; }

/* ---------- Documentation ---------- */
.doc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.objectives-list { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.objectives-list li { display: flex; align-items: flex-start; gap: 0.8rem; color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.objectives-list .icon { background: var(--pop); color: var(--on-pop); border-radius: 50%; padding: 3px; margin-top: 0.15em; stroke-width: 3; }
.doc-image { display: block; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: #0a1120; }
.doc-image img { width: 100%; height: auto; display: block; transition: transform 0.5s var(--ease); }
.doc-image:hover img { transform: scale(1.04); }
.doc-image-hint { position: absolute; right: 0.8rem; bottom: 0.8rem; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; font-weight: 700; color: var(--on-pop); background: var(--pop); padding: 0.4rem 0.7rem; border-radius: 8px; }
figcaption { color: var(--muted); font-size: 0.8rem; margin-top: 0.7rem; text-align: center; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 620px; }
th, td { padding: 0.85rem 1.2rem; text-align: left; border-bottom: 1px solid var(--border); }
thead th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); background: var(--bg2); }
tbody tr { transition: background 0.2s; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--tint); }
td.mono { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
td:last-child { color: var(--muted); }

/* Étapes : la ligne jaune se dessine au défilement */
.steps-list { list-style: none; position: relative; display: flex; flex-direction: column; gap: 1.1rem; }
.steps-list::before { content: ''; position: absolute; left: 27px; top: 1rem; bottom: 1rem; border-left: 2px dashed var(--border-strong); }
.steps-list::after { content: ''; position: absolute; left: 26px; top: 1rem; bottom: 1rem; width: 4px; border-radius: 2px; background: var(--pop); transform: scaleY(var(--p, 0)); transform-origin: 50% 0; }
.step-item { position: relative; display: flex; gap: 1.5rem; align-items: flex-start; }
.step-num { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--card); border: 2px solid var(--border-strong); color: var(--muted); font-family: var(--font-mono); font-size: 1rem; font-weight: 700; flex-shrink: 0; position: relative; z-index: 1; transition: background 0.4s, color 0.4s, border-color 0.4s, transform 0.4s var(--ease); }
.step-item.done .step-num { background: var(--pop); color: var(--on-pop); border-color: var(--text); transform: scale(1.08); }
[data-theme="dark"] .step-item.done .step-num { border-color: var(--pop); }
.step-body { flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem 1.6rem; box-shadow: var(--shadow); }
.step-title { font-weight: 700; font-size: 1rem; margin-bottom: 0.35rem; }
.step-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }
.step-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.step-tags span { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500; padding: 0.2rem 0.6rem; border-radius: 6px; background: var(--tint); }

/* Bloc de téléchargement du rapport */
.cta-box { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: 2.2rem; background: #111111; border-radius: 20px; color: #ffffff; box-shadow: var(--shadow-lg); }
[data-theme="dark"] .cta-box { background: #1c1c1c; border: 1px solid var(--pop); }
.cta-box::before { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: var(--pop); opacity: 0.3; filter: blur(50px); right: -60px; top: -170px; animation: drift 9s ease-in-out infinite alternate; }
.cta-box > * { position: relative; }
.cta-box h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.3rem; }
.cta-box p { font-size: 0.88rem; opacity: 0.8; }
.cta-box .btn { background: var(--pop); color: var(--on-pop); }
.cta-box .btn:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -10px var(--glow); }

/* ---------- Application ---------- */
.flow { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: flow; }
.flow li { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; counter-increment: flow; }
.flow li::before { content: counter(flow, decimal-leading-zero); display: inline-block; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; background: var(--pop); color: var(--on-pop); padding: 0.1rem 0.45rem; border-radius: 5px; }
.flow h4 { font-size: 0.95rem; margin: 0.6rem 0 0.4rem; }
.flow p { font-size: 0.84rem; color: var(--muted); line-height: 1.6; }
.status { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; margin-top: 0.8rem; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-open { color: var(--warn); }
.status-open::before { animation: ping 1.6s ease-out infinite; }
.status-closed { color: var(--text); }

/* ---------- Sécurité ---------- */
.layers { display: flex; flex-direction: column; gap: 0.7rem; max-width: 820px; }
.layer { display: grid; grid-template-columns: 170px 1fr; gap: 1.2rem; align-items: center; padding: 1.1rem 1.4rem; border: 1px solid var(--border); border-left: 5px solid var(--pop); border-radius: 12px; background: var(--card); }
.layer:hover { border-left-color: var(--pop); }
.layer:nth-child(2) { margin-left: 1.5rem; }
.layer:nth-child(3) { margin-left: 3rem; }
.layer:nth-child(4) { margin-left: 4.5rem; }
.layer-name { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.layer p { font-size: 0.86rem; color: var(--muted); }
.layer strong { color: var(--text); }

/* ---------- À propos ---------- */
.about-layout { display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: start; }
.about-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 2rem; text-align: center; box-shadow: var(--shadow); position: sticky; top: 96px; }
.about-avatar { width: 110px; height: 110px; margin: 0 auto 1.2rem; border-radius: 50%; background: var(--pop); display: grid; place-items: center; font-size: 1.9rem; font-weight: 700; color: var(--on-pop); font-family: var(--font-mono); animation: float 6s ease-in-out infinite; }
.about-card h3 { font-size: 1.15rem; }
.about-card p { color: var(--muted); font-size: 0.84rem; margin: 0.3rem 0 1.4rem; }
.about-facts { list-style: none; text-align: left; border-top: 1px solid var(--border); padding-top: 1.2rem; margin-bottom: 1.4rem; display: flex; flex-direction: column; gap: 0.8rem; }
.about-facts li { display: flex; align-items: center; gap: 0.7rem; font-size: 0.83rem; color: var(--muted); }
.about-facts .icon { color: var(--accent); }
.about-card .btn { width: 100%; justify-content: center; }
.about-text h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; }
.about-text p { color: var(--muted); font-size: 0.95rem; line-height: 1.8; margin-bottom: 1rem; }
.about-text h3:not(:first-child) { margin-top: 2.2rem; }
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.skill { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.2rem; }
.skill h4 { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; margin-bottom: 0.3rem; }
.skill h4 .icon { color: var(--accent); }
.skill p { font-size: 0.82rem; margin: 0; line-height: 1.6; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2.5rem; align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 2rem; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input, .form-group textarea, .form-group select { background: var(--bg2); border: 1.5px solid var(--border); border-radius: 10px; padding: 0.8rem 1rem; font-family: inherit; font-size: 0.9rem; color: var(--text); transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; resize: vertical; width: 100%; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; background: var(--card); border-color: var(--text); box-shadow: 0 0 0 4px var(--pop); }
.contact-form .btn { align-self: flex-start; }
.form-success, .form-error { padding: 0.9rem 1rem; border-radius: 10px; font-size: 0.86rem; font-weight: 600; display: none; }
.form-success { background: var(--tint); color: var(--text); }
.form-error { background: rgba(220,38,38,0.12); color: #d43c3c; }
.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-info-card { display: flex; gap: 1rem; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1.3rem; }
.contact-info-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.3rem; }
.contact-info-card p { color: var(--muted); font-size: 0.83rem; line-height: 1.6; }

/* ---------- Pied de page ---------- */
footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 2rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; list-style: none; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.8rem; font-weight: 500; background: linear-gradient(var(--pop), var(--pop)) 0 100% / 0 3px no-repeat; padding-bottom: 4px; transition: background-size 0.35s var(--ease), color 0.2s; }
.footer-links a:hover { color: var(--text); background-size: 100% 3px; }
footer p { color: var(--muted); font-size: 0.8rem; }

/* ---------- Explorer : catalogue filtrable + fenêtre de détail ----------
   Même principe que le catalogue de « Ma boutique » : filtres en pilules,
   grille auto-fill, cartes avec un bloc de couleur, détail dans un <dialog>. */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.explorer-count { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.6rem; }
.pill { display: inline-flex; align-items: center; gap: 0.4rem; font-family: inherit; font-size: 0.82rem; font-weight: 700; padding: 0.55rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--border-strong); background: var(--card); color: var(--text); cursor: pointer; transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.3s var(--ease); }
.pill:hover { border-color: var(--text); transform: translateY(-2px); }
.pill[aria-pressed="true"] { background: var(--pop); border-color: var(--pop); color: var(--on-pop); }
.pill-sm { font-size: 0.76rem; padding: 0.4rem 0.9rem; }
.pill .icon { transition: transform 0.3s var(--ease); }

.explorer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.piece { padding: 0; align-items: stretch; cursor: pointer; }
.piece.enter { animation: rise 0.5s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
.piece-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex: 1; padding: 16px; }
.piece .badge, .piece .card-title, .piece .card-desc { margin: 0; }
.piece-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.piece:hover .pill { background: var(--pop); border-color: var(--pop); color: var(--on-pop); }
.piece:hover .pill .icon { transform: translateX(4px); }
/* Bloc de couleur avec un sigle, à la place d'une image */
.swatch { display: grid; place-items: center; height: 120px; border-radius: 15px 15px 0 0; font-family: var(--font-title); font-size: 2.1rem; font-weight: 800; letter-spacing: -1px; }
.swatch span { transition: transform 0.45s var(--ease); }
.piece:hover .swatch span { transform: scale(1.18) rotate(-4deg); }
.swatch[data-cat="reseau"] { background: var(--tint); color: var(--text); }
.swatch[data-cat="systeme"] { background: #111111; color: var(--pop); }
.swatch[data-cat="securite"] { background: var(--pop); color: var(--on-pop); }
.swatch[data-cat="application"] { background: var(--bg2); color: var(--text); box-shadow: inset 0 -1px 0 var(--border); }
[data-theme="dark"] .swatch[data-cat="systeme"] { background: #000000; }

@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(0.96); } }
@keyframes backdropIn { from { opacity: 0; } }
.modal { margin: auto; padding: 0; border: none; border-radius: 20px; width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; background: var(--card); color: var(--text); box-shadow: var(--shadow-lg); }
.modal[open] { animation: pop 0.4s var(--ease); }
.modal::backdrop { background: rgba(17,17,17,0.5); backdrop-filter: blur(4px); }
.modal[open]::backdrop { animation: backdropIn 0.3s ease; }
.detail { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px; }
.detail .swatch { width: 100%; height: 130px; border-radius: 12px; font-size: 2.6rem; }
.detail h3 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }
.detail p { color: var(--muted); font-size: 0.92rem; line-height: 1.7; }
.facts { width: 100%; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 1rem; font-size: 0.84rem; }
.facts div + div { border-top: 1px solid var(--border); }
.facts dt { color: var(--muted); }
.facts dd { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; text-align: right; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; width: 100%; margin-top: 8px; }

/* Version de base de l'Explorer (sans JavaScript) */
.explorer-fallback { grid-column: 1 / -1; list-style: none; display: grid; gap: 0.6rem; color: var(--muted); font-size: 0.92rem; }
.explorer-fallback strong { color: var(--text); }
html:not(.js) .filters { display: none; }

/* Encadré d'explication */
.note { max-width: 680px; margin: -0.6rem 0 1.8rem; padding: 1rem 1.2rem; border: 1px solid var(--border); border-left: 5px solid var(--pop); border-radius: 12px; background: var(--card); color: var(--muted); font-size: 0.9rem; line-height: 1.7; }
.note strong { color: var(--text); }

/* ---------- Tablette et téléphone ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
@keyframes sheetUp { from { transform: translateY(100%); } }
@media (max-width: 1000px) {
  .hero-inner, .doc-layout, .contact-layout, .about-layout { grid-template-columns: 1fr; }
  .about-card { position: static; max-width: 420px; margin: 0 auto; width: 100%; }
  .stats-grid, .flow { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .menu-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0.2rem; padding: 0.8rem 1.2rem 1.2rem; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
  .menu-open .nav-links { display: flex; }
  .nav-links a { padding: 0.9rem 1rem; font-size: 0.86rem; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 1.2rem; }
  .hero { padding: 3rem 0; }
  .hero-blob { opacity: 0.25 !important; }
  .section, .section-alt { padding: 2.8rem 0 !important; }
  .section-alt { margin-bottom: 2.8rem; }
  .stats-grid, .grid-3, .flow, .skills, .form-row { grid-template-columns: 1fr; }
  .layer { grid-template-columns: 1fr; gap: 0.3rem; margin-left: 0 !important; }
  .steps-list::before { left: 21px; }
  .steps-list::after { left: 20px; }
  .step-item { gap: 0.9rem; }
  .step-num { width: 44px; height: 44px; font-size: 0.85rem; }
  .contact-form { padding: 1.4rem; }
  .stack-ip { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }

  /* Confort tactile */
  .icon-btn { width: 44px; height: 44px; }
  .form-group input, .form-group textarea, .form-group select { font-size: 16px; } /* en dessous de 16px, iPhone zoome sur le champ */
  .js .reveal { filter: none; }
  .card:not(.piece) { padding: 1.4rem; }
  .page-banner { padding: 2.2rem 0 1.8rem; }
  .hero h1 { letter-spacing: -1px; }
  .hero-lead { font-size: 1rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { justify-content: center; }
  .contact-form .btn { align-self: stretch; justify-content: center; }
  .cta-box .btn { width: 100%; justify-content: center; }

  /* Chiffres clés : 2 × 2 au lieu de 4 lignes */
  .stats { padding: 1.6rem 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-item { flex-direction: column; align-items: flex-start; gap: 0.7rem; padding: 1rem; }

  /* Explorer : filtres sur une ligne qui défile, cartes en lignes compactes */
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -1.2rem 1.2rem; padding: 4px 1.2rem; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .pill { flex-shrink: 0; white-space: nowrap; }
  .explorer-grid { grid-template-columns: 1fr; gap: 10px; }
  .piece { flex-direction: row; }
  .piece .swatch { width: 72px; height: auto; flex-shrink: 0; border-radius: 15px 0 0 15px; font-size: 1.15rem; letter-spacing: -0.5px; }
  .piece-body { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; padding: 12px 6px 12px 14px; }
  .piece .badge { display: none; }
  .piece .card-title { grid-column: 1; font-size: 0.95rem; }
  .piece .card-desc { grid-column: 1; font-size: 0.8rem; line-height: 1.45; }
  .piece-actions { grid-column: 2; grid-row: 1 / span 2; margin: 0; padding: 0; }
  .piece .pill { border: none; background: none; padding: 10px; font-size: 0; gap: 0; color: var(--muted); }
  .piece .pill .icon { width: 20px; height: 20px; }

  /* Fenêtre de détail : panneau qui monte du bas de l'écran */
  .modal { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 88vh; }
  .modal[open] { animation: sheetUp 0.4s var(--ease); }
  .detail { padding: 14px 20px calc(20px + env(safe-area-inset-bottom)); }
  .detail::before { content: ''; align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); }
  .detail .swatch { height: 96px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { justify-content: center; }

  /* Tableaux : plus de défilement horizontal */
  table { min-width: 0; }
  .table-ip thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-ip tbody tr { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 12px; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); }
  .table-ip tbody tr:last-child { border-bottom: none; }
  .table-ip td { padding: 0; border: none; }
  .table-ip td:nth-child(1) { font-weight: 700; }
  .table-ip td:nth-child(2) { justify-self: end; font-family: var(--font-mono); font-size: 0.7rem; background: var(--tint); padding: 0.1rem 0.5rem; border-radius: 6px; }
  .table-ip td:nth-child(3) { white-space: normal; }
  .table-ip td:nth-child(4) { justify-self: end; text-align: right; font-size: 0.78rem; }
  .table-roles th, .table-roles td { padding: 0.75rem 0.7rem; font-size: 0.82rem; }
  .table-roles th:not(:first-child), .table-roles td:not(:first-child) { text-align: center; }
}

/* Écrans tactiles : pas de survol qui reste « collé » après un appui,
   et un petit retour visuel quand on appuie à la place du flottement */
@media (hover: none) {
  .icon-btn:hover { background: var(--card); border-color: var(--border); color: var(--text); transform: none; }
  .btn-primary:hover, .cta-box .btn:hover { transform: none; box-shadow: none; }
  .btn-secondary:hover { transform: none; background: var(--card); color: var(--text); border-color: var(--border-strong); }
  .btn:hover .icon, .piece:hover .pill .icon, .piece:hover .swatch span, .logo:hover .logo-img, .doc-image:hover img { transform: none; }
  .nav-links a:hover:not(.active) { background: none; color: var(--muted); transform: none; }
  .pill:hover { transform: none; border-color: var(--border-strong); }
  .pill[aria-pressed="true"]:hover { border-color: var(--pop); }
  .piece:hover .pill { background: var(--card); border-color: var(--border-strong); color: var(--text); }
  .card:hover .card-icon, .stat-item:hover .stat-icon, .contact-info-card:hover .card-icon { transform: none; background: var(--tint); color: var(--accent); }
  .card:hover::before, .stat-item:hover::before, .skill:hover::before { opacity: 0; }
  .chips li:hover { background: var(--card); border-color: var(--border-strong); color: var(--text); }
  tbody tr:hover { background: none; }
  .footer-links a:hover { color: var(--muted); background-size: 0 3px; }

  .card:active, .stat-item:active, .skill:active, .flow li:active, .contact-info-card:active, .step-body:active, .layer:active { transform: scale(0.98); border-color: var(--pop); }
  .btn:active, .pill:active, .icon-btn:active { transform: scale(0.95); }
}

/* Visiteurs qui ont désactivé les animations sur leur appareil */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
}

@media print {
  .site-nav, footer, .progress, .hero-buttons, .cta-box, .contact-form { display: none; }
  .page { display: block; padding-top: 0; min-height: 0; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
}
