/* ===========================================================
   BLACKSHIELD — Design system
   Cybersécurité & sécurité physique · La Réunion
   =========================================================== */

:root {
  /* Palette */
  --bg:            #08090B; /* Noir profond — fond principal */
  --panel:         #14171C; /* Gris graphite — cartes, menus */
  --yellow:        #FFD000; /* Jaune signature */
  --yellow-hover:  #E6BB00; /* Jaune au survol */
  --text:          #F5F5F0; /* Blanc cassé — titres & texte */
  --muted:         #A5ABB5; /* Gris secondaire — descriptions */
  --border:        #2A2F37; /* Gris bordure — séparateurs */

  --panel-2:       #0E1116; /* nuance intermédiaire */
  --yellow-soft:   rgba(255, 208, 0, .12);
  --yellow-glow:   rgba(255, 208, 0, .35);

  /* Typo */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Mesures */
  --maxw: 1240px;
  --radius: 4px;
  --c: 14px;            /* taille des coins chanfreinés */
  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* Chanfreins signature (clip-path) */
  --cut-b:  polygon(0 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)));
  --cut-br: polygon(0 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%);
  --cut-x:  polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--yellow); color: #000; }

/* ---------- Layout utils ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: .78rem; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--yellow);
  margin-bottom: 22px;
}
.eyebrow::after { content: ""; width: 64px; height: 2px; background: linear-gradient(90deg, var(--yellow), transparent); }
.eyebrow--center { justify-content: center; }
.eyebrow--center::before { content: ""; width: 64px; height: 2px; background: linear-gradient(270deg, var(--yellow), transparent); }

h1, h2, h3 { line-height: 1.08; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.h-section { font-size: clamp(1.9rem, 4vw, 3rem); }
.lead { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); max-width: 56ch; }
.text-y { color: var(--yellow); }
.muted { color: var(--muted); }

.section-head { max-width: 62ch; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }

/* ---------- Boutons ---------- */
.btn {
  --c: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  line-height: 1; transition: transform .2s var(--ease), background .2s, color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  background: var(--yellow); color: #0A0A0A; clip-path: var(--cut-br);
  box-shadow: 0 10px 30px -12px var(--yellow-glow);
}
.btn--primary:hover { background: var(--yellow-hover); transform: translateY(-2px); }
.btn--ghost {
  color: var(--text); background: var(--panel); clip-path: var(--cut-br);
  position: relative;
}
.btn--ghost::before { content: ""; position: absolute; inset: 1px; background: var(--panel); clip-path: var(--cut-br); z-index: 0; }
.btn--ghost { border: 0; }
.btn--ghost span, .btn--ghost svg { position: relative; z-index: 1; }
.btn--ghost { background: var(--border); } /* 1px faux-border via inset */
.btn--ghost:hover { color: var(--yellow); transform: translateY(-2px); }
.btn--sm { padding: 11px 20px; font-size: .85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* Lien fléché */
.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--yellow); }
.arrow-link svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.arrow-link:hover svg { transform: translateX(4px); }

/* ---------- Panneau / carte chanfreiné ---------- */
.panel {
  position: relative; background: var(--border);
  clip-path: var(--cut-b);
}
.panel::before { content: ""; position: absolute; inset: 1px; background: var(--panel); clip-path: var(--cut-b); z-index: 0; }
.panel > * { position: relative; z-index: 1; }

/* ===========================================================
   HEADER
   =========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 9, 11, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.site-header.is-scrolled { background: rgba(8, 9, 11, .92); border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }

/* Logo */
.brand { display: flex; align-items: center; gap: 16px; }
.brand__mark { width: 40px; height: 44px; flex: none; }
.brand__divider { width: 1px; height: 38px; background: var(--border); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-weight: 800; letter-spacing: .14em; font-size: 1.18rem; }
.brand__url { font-size: .68rem; letter-spacing: .34em; color: var(--yellow); margin-top: 5px; }

/* Nav */
.nav { display: flex; align-items: center; gap: 36px; }
.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a { font-size: .92rem; font-weight: 600; color: var(--muted); transition: color .2s; position: relative; padding-block: 6px; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--text); }
.nav__links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--yellow);
}
.nav__sep { width: 1px; height: 26px; background: var(--border); }

/* Bouton de langue */
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 40px;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; color: var(--muted);
  background: var(--panel); transition: color .2s, border-color .2s, background .2s;
}
.lang-btn svg { width: 15px; height: 15px; color: var(--yellow); transition: transform .4s var(--ease); }
.lang-btn:hover { color: var(--text); border-color: var(--yellow); background: var(--yellow-soft); }
.lang-btn:hover svg { transform: rotate(40deg); }
.lang-btn--mobile { margin-top: 20px; width: max-content; }

/* Burger */
.burger { display: none; width: 44px; height: 44px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); position: relative; }
.burger span, .burger::before, .burger::after {
  content: ""; position: absolute; left: 11px; width: 22px; height: 2px; background: var(--text);
  transition: transform .25s var(--ease), opacity .2s;
}
.burger span { top: 21px; }
.burger::before { top: 15px; }
.burger::after  { top: 27px; }
body.nav-open .burger span { opacity: 0; }
body.nav-open .burger::before { transform: translateY(6px) rotate(45deg); }
body.nav-open .burger::after  { transform: translateY(-6px) rotate(-45deg); }

/* ===========================================================
   HERO
   =========================================================== */
.hero { position: relative; padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(48px, 6vw, 80px); overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: center;
}
.hero__title { font-size: clamp(2.6rem, 6.4vw, 5.2rem); line-height: .98; margin-bottom: 26px; }
.hero__title .line-2 { color: var(--yellow); display: block; }
.hero__lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); margin-bottom: 38px; max-width: 46ch; }

.hero__media { position: relative; }
.hero__media .frame {
  position: relative; background: var(--border); clip-path: var(--cut-x);
  box-shadow: 0 40px 80px -40px #000;
}
.hero__media .frame::before { content: ""; position: absolute; inset: 1px; clip-path: var(--cut-x); background: var(--panel-2); z-index: 0; }
.hero__media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; clip-path: var(--cut-x); }
.hero__media .frame { --c: 22px; }

/* Étiquette projet sur l'image */
.media-tag {
  position: absolute; z-index: 2; right: 18px; bottom: 18px;
  padding: 12px 18px 12px 20px; background: rgba(8,9,11,.82); backdrop-filter: blur(6px);
  border-left: 3px solid var(--yellow); clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
}
.media-tag b { display: block; letter-spacing: .22em; font-size: .78rem; }
.media-tag small { color: var(--muted); font-size: .8rem; }

/* halo jaune derrière le hero */
.hero::after {
  content: ""; position: absolute; top: -10%; right: -8%; width: 620px; height: 620px;
  background: radial-gradient(circle, var(--yellow-soft), transparent 68%);
  pointer-events: none; z-index: 0;
}
.hero .container { position: relative; z-index: 1; }

/* ===========================================================
   CARTES EXPERTISES / FEATURES
   =========================================================== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 34px 30px 40px; }
.feature__icon {
  width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 22px;
  background: var(--yellow-soft); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--yellow);
}
.feature__icon svg { width: 30px; height: 30px; }
.feature h3 { font-size: 1.35rem; margin-bottom: 10px; }
.feature p { color: var(--muted); font-size: .98rem; }
.feature .arrow-link { margin-top: 20px; font-size: .9rem; }

/* ===========================================================
   PROJETS
   =========================================================== */
.projets-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.project-card { overflow: hidden; display: flex; flex-direction: column; }
.project-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project-card:hover .project-card__media img { transform: scale(1.05); }
.project-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(8,9,11,.85)); }
.badge {
  position: absolute; z-index: 2; top: 16px; left: 16px;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 12px; background: var(--yellow); color: #0A0A0A;
}
.badge--ghost { background: rgba(8,9,11,.75); color: var(--yellow); border: 1px solid var(--yellow); }
.badge--soon { background: rgba(8,9,11,.75); color: var(--muted); border: 1px solid var(--border); }
.project-card__body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project-card__body h3 { font-size: 1.5rem; }
.project-card__body p { color: var(--muted); font-size: .98rem; }
.project-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.tag { font-size: .76rem; color: var(--muted); border: 1px solid var(--border); padding: 4px 10px; border-radius: 40px; }

.project-card--feature { grid-column: 1 / -1; }
.project-card--feature .project-card__media { aspect-ratio: auto; }

/* ===========================================================
   ARTICLES
   =========================================================== */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card { display: flex; flex-direction: column; overflow: hidden; }
.article-card__media { aspect-ratio: 16 / 9; overflow: hidden; position: relative; }
.article-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.article-card:hover .article-card__media img { transform: scale(1.05); }
.article-card__body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.article-card__cat { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.article-card__body h3 { font-size: 1.22rem; line-height: 1.25; }
.article-card__body h3 a:hover { color: var(--yellow); }
.article-card__excerpt { color: var(--muted); font-size: .95rem; }
.article-card__foot { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 12px; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--border); }
.article-card__foot .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

/* Filtres articles */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter {
  padding: 9px 18px; font-size: .86rem; font-weight: 600; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border); border-radius: 40px; transition: .2s;
}
.filter:hover { color: var(--text); border-color: var(--muted); }
.filter.is-active { background: var(--yellow); color: #0A0A0A; border-color: var(--yellow); }

/* ===========================================================
   CTA / CONTACT
   =========================================================== */
.cta { padding: clamp(40px, 6vw, 72px); text-align: center; }
.cta h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); margin-bottom: 16px; }
.cta p { color: var(--muted); max-width: 54ch; margin: 0 auto 30px; }
.cta .btn-row { justify-content: center; }

.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; }
.contact-list li { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .ic { color: var(--yellow); flex: none; width: 24px; height: 24px; margin-top: 2px; }
.contact-list b { display: block; margin-bottom: 2px; }
.contact-list span { color: var(--muted); font-size: .95rem; }

.form { padding: 32px; display: grid; gap: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 7px; color: var(--muted); }
.field input, .field textarea {
  width: 100%; padding: 13px 16px; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font: inherit; border-radius: var(--radius); transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--yellow); }

/* ===========================================================
   ARTICLE (page)
   =========================================================== */
.article { max-width: 760px; margin-inline: auto; }
.article__head { margin-bottom: 36px; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin-bottom: 18px; }
.article__meta .cat { color: var(--yellow); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.article__title { font-size: clamp(2rem, 4.2vw, 3rem); margin-bottom: 18px; }
.article__cover { margin: 0 0 40px; }
.article__cover img { width: 100%; clip-path: var(--cut-x); }
.prose { color: #d8dadf; font-size: 1.06rem; line-height: 1.8; }
.prose > * + * { margin-top: 22px; }
.prose h2 { font-size: 1.7rem; margin-top: 48px; color: var(--text); }
.prose h3 { font-size: 1.3rem; margin-top: 32px; color: var(--text); }
.prose a { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 10px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose blockquote {
  border-left: 3px solid var(--yellow); padding: 6px 0 6px 22px; color: var(--muted); font-style: italic;
}
.prose code {
  background: var(--panel); border: 1px solid var(--border); padding: 2px 7px; border-radius: 4px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .9em; color: var(--yellow);
}
.prose pre {
  background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--yellow);
  padding: 20px 22px; overflow-x: auto; border-radius: var(--radius); font-size: .9rem; line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; color: #d8dadf; }
.callout {
  background: var(--yellow-soft); border: 1px solid var(--border); border-left: 3px solid var(--yellow);
  padding: 18px 22px; border-radius: var(--radius); color: var(--text);
}
.article__back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; margin-bottom: 28px; }
.article__back:hover { color: var(--yellow); }

/* ===========================================================
   FOOTER
   =========================================================== */
.footer-strip {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  padding-block: 30px; color: var(--text); font-weight: 700; letter-spacing: .2em; font-size: .82rem;
}
.footer-strip::before, .footer-strip::after { content: ""; height: 1px; flex: 1; max-width: 240px; }
.footer-strip::before { background: linear-gradient(90deg, transparent, var(--yellow)); }
.footer-strip::after  { background: linear-gradient(270deg, transparent, var(--yellow)); }

.site-footer { border-top: 1px solid var(--border); background: var(--panel-2); }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-block: 56px; }
.footer-col h4 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.footer-col ul { display: grid; gap: 12px; }
.footer-col a { color: var(--muted); font-size: .92rem; transition: color .2s; }
.footer-col a:hover { color: var(--yellow); }
.footer-about p { color: var(--muted); font-size: .92rem; max-width: 40ch; margin-top: 16px; }
.footer-bottom { border-top: 1px solid var(--border); padding-block: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .84rem; }

/* ===========================================================
   REVEAL on scroll
   =========================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; max-width: 560px; }
  .features { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav__links, .nav__sep { display: none; }
  .nav .btn { display: none; }
  .nav > .lang-btn { display: none; }
  .burger { display: block; }

  /* panneau mobile */
  .mobile-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
    background: var(--panel); border-bottom: 1px solid var(--border);
    transform: translateY(-120%); transition: transform .35s var(--ease);
    padding: 20px 24px 28px;
  }
  body.nav-open .mobile-nav { transform: translateY(0); }
  .mobile-nav a { display: block; padding: 14px 0; font-weight: 600; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
  .mobile-nav a:last-of-type { border-bottom: 0; }
  .mobile-nav .btn { margin-top: 18px; width: 100%; }
}
@media (min-width: 821px) { .mobile-nav { display: none; } }

@media (max-width: 620px) {
  .container { padding-inline: 18px; }
  .projets-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
  .footer-strip { gap: 14px; letter-spacing: .12em; font-size: .72rem; }
  .btn { width: 100%; }
  .btn-row .btn { flex: 1 1 auto; }
}
