/* Canvas effet fluide réaliste (colorant dans l'eau) */
#canvas-fluid {
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0; /* always behind content */
  display: block;
}
main, header, footer {
  position: relative;
  z-index: 1;
}
.container, .wrap, .article-box, .article-grid {
  z-index: auto;
}
/* Encadré pour le contenu des articles */
.article-box {
  background: rgba(255,255,255,0.13);
  border: 2.5px solid var(--accent);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  padding: 44px 40px;
  max-width: 900px;
  margin: 48px auto 36px auto;
  transition: box-shadow .3s, border-color .3s;
  width: 100%;
}
.article-box:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,.28);
  border-color: var(--accent-dark);
}
@media (max-width: 700px) {
  .article-box {
    padding: 24px 8px;
    max-width: 98vw;
  }
}
/* CC Informatique - Styles principaux externalisés */
:root{
  --bg1:#0b1025;
  --bg2:#2a0d44;
  --panel:rgba(255,255,255,.04);
  --panel-strong:rgba(255,255,255,.08);
  --text:#f3f5f8;
  --muted:#cdd3dd;
  --accent:#ffd400;
  --accent-dark:#c9a800;
  --success:#2bd673;
  --danger:#ff5577;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --radius:16px;
  --maxw:1120px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  line-height:1.6; color:var(--text);
  background: radial-gradient(1200px 800px at 5% 10%, #13204a 0%, transparent 50%),
              radial-gradient(1000px 700px at 95% 0%, #3b145f 0%, transparent 55%),
              linear-gradient(135deg,var(--bg1),var(--bg2));
  overflow-x:hidden;
}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

.container{max-width:var(--maxw);margin:0 auto;padding:0 24px}
header{
  position:sticky;
  top:0;
  z-index:50;
  background: linear-gradient(90deg, #181e36 60%, #2a0d44 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 2px 16px rgba(0,0,0,.10);
}
.nav{display:flex;align-items:center;justify-content:space-between;padding:14px 0}
.brand{display:flex;gap:12px;align-items:center}
.brand img{width:44px;height:44px;border-radius:8px;box-shadow:var(--shadow)}
.brand .title{font-weight:700;letter-spacing:.2px}
.menu{display:flex;gap:22px;align-items:center}
.menu a{color:var(--muted)}
.cta{background:var(--accent);color:#111;padding:10px 16px;border-radius:10px;font-weight:700;box-shadow:0 6px 18px rgba(255,212,0,.25);border:1px solid rgba(0,0,0,.1)}
.cta:hover{transform:translateY(-1px);filter:brightness(1.07)}

.hero{padding:72px 0 40px;text-align:center}
.kicker{display:inline-block; padding:6px 12px;border:1px solid rgba(255,255,255,.15);border-radius:999px;background:rgba(255,255,255,.05);font-size:14px;color:var(--muted)}
h1{font-size: clamp(32px, 4vw, 52px); line-height:1.15;margin:14px 0}
.h1-accent{color:var(--accent);text-shadow:0 6px 24px rgba(255,212,0,.15)}
.sub{max-width:760px;margin:12px auto 22px;color:var(--muted)}
.hero-cta{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;margin-top:16px}
.btn{display:inline-flex;align-items:center;gap:10px;border-radius:12px;padding:12px 18px;border:1px solid rgba(255,255,255,.12);background:var(--panel-strong);color:var(--text);font-weight:600}
.btn.primary{background:var(--accent);color:#111;border-color:rgba(0,0,0,.08)}
.btn.primary:hover{filter:brightness(1.05)}
.btn.outline:hover{background:var(--panel)}

.trust{margin:30px auto 10px;display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.trust li{list-style:none;background:var(--panel);padding:14px;border-radius:12px;border:1px solid rgba(255,255,255,.06)}

section{padding:60px 0;}
section h2{font-size: clamp(26px,3vw,38px);margin:0 0 18px;color:var(--accent)}
.lead{color:var(--muted);max-width:760px}

.cards{margin-top:20px;display:grid;gap:18px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}
.card,
.step,
.review,
.trust li {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
  cursor: pointer;
}
.card:hover,
.step:hover,
.review:hover,
.trust li:hover {
  transform: translateY(-6px) scale(1.03);
  background: var(--panel-strong);
  box-shadow: 0 14px 36px rgba(0,0,0,.45);
}
.card h3{margin:6px 0 10px}
.badge{display:inline-block;background:rgba(255,212,0,.12);color:var(--accent);border:1px solid rgba(255,212,0,.35);font-size:12px;padding:4px 8px;border-radius:999px}

/* === Section "Pourquoi choisir CC Informatique" === */
.benefits {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 20px;
  align-items: stretch;
}
.benefit {
  display: flex;
  gap: 12px;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.08);
  padding: 16px;
  border-radius: 14px;
  align-items: center;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
  cursor: pointer;
}
.benefit:hover {
  transform: translateY(-6px) scale(1.03);
  background: var(--panel-strong);
  box-shadow: 0 14px 36px rgba(0,0,0,.45);
}
.benefit .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.steps{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));margin-top:18px}
.step .n{font-weight:800;color:#111;background:var(--accent);display:inline-grid;place-items:center;width:28px;height:28px;border-radius:999px;margin-bottom:8px}

.reviews{display:grid;gap:18px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));margin-top:20px}
.stars{color:var(--accent)}

.faq{max-width:900px}
details{background:var(--panel);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:14px;margin:10px 0}
summary{cursor:pointer;font-weight:600}

form{display:grid;gap:12px;max-width:680px}
input, textarea{width:100%;padding:12px 14px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);border-radius:12px;color:var(--text)}
textarea{min-height:120px}
.grid-2{display:grid;gap:12px;grid-template-columns:1fr 1fr}
@media (max-width:640px){
  .grid-2{grid-template-columns:1fr}
  .nav { flex-wrap: wrap; row-gap: 8px; }
  .menu { flex-wrap: wrap; gap: 12px; width: 100%; justify-content: flex-end; }
  .menu .cta {
    width: 100%;
    text-align: center;
    margin-top: 8px;
    font-size: 1.08em;
    padding: 13px 0;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(255,212,0,.18);
  }
  .brand {
    width: 100%;
    justify-content: center;
    margin-bottom: 6px;
  }
  main > .hero {
    margin-top: 18px;
  }
}

footer{border-top:1px solid rgba(255,255,255,.08);background:rgba(6,8,20,.6)}
.footer-grid{display:grid;gap:16px;grid-template-columns:1.2fr .8fr .8fr}
@media (max-width:820px){.footer-grid{grid-template-columns:1fr}}
.social a{margin-right:10px}

.float{position:fixed;right:18px;bottom:18px;z-index:60}
.float a{display:inline-flex;align-items:center;gap:8px;background:var(--accent);color:#111;border-radius:999px;padding:12px 16px;font-weight:800;box-shadow:0 10px 24px rgba(255,212,0,.28)}

.reveal{opacity:0;transform:translateY(16px);transition:opacity .6s ease, transform .6s ease}
.reveal.visible{opacity:1;transform:translateY(0)}

.notice{margin-top:10px;color:var(--success);display:none}
.notice.error{color:var(--danger)}

/* === Mobile overflow + WhatsApp visibility fixes === */
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav { flex-wrap: wrap; row-gap: 8px; }
  .menu { flex-wrap: wrap; gap: 12px; }
  .menu .cta { width: 100%; text-align: center; }
}
.float {
  right: clamp(12px, env(safe-area-inset-right) + 12px, 24px);
  bottom: clamp(12px, env(safe-area-inset-bottom) + 12px, 24px);
}
.float a { white-space: nowrap; }
img, video, svg { max-width: 100%; height: auto; }
/* Avoid hiding overflowing nav/menu which can clip items on small screens.
  Limit overflow handling to the header container only when strictly needed. */
header .container { overflow: hidden; }

/* === Social icons in header === */
.icon-btn { 
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  margin-left: 8px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text); box-shadow: 0 6px 18px rgba(0,0,0,.18);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
}
.icon-btn:hover { 
  transform: translateY(-2px);
  background: rgba(255,255,255,.12);
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
}
.icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.icon-btn svg { width: 20px; height: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width:640px){
  .menu .icon-btn { display: none; }
}

/* === Publicités (AdSense) — cachées par défaut, visibles seulement si remplies === */
.ad-slot{ display:none; margin: 28px 0; }
.ad-slot.is-filled{ display:block; }
.ad-slot ins.adsbygoogle{ display:block; width:100%; min-height:280px; }

/* === Styles partagés pour pages légales / contenu centré === */
.wrap { max-width: 900px; margin: 0 auto; padding: 32px 20px; }
.wrap h1, .wrap h2 { color: var(--accent); margin: 0 0 10px; }
.wrap h1 { font-size: 30px; margin-top: 10px; }
.wrap h2 { font-size: 22px; margin-top: 28px; }
.wrap a { color: var(--accent); }
.wrap .panel { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); padding: 16px; border-radius: 12px; }
.wrap small{ opacity: .85; }
.wrap .muted { color: var(--muted); }

/* Grid and visual styles for article listing */
.article-grid{
  display: grid;
  /* Force 3 cards per row on desktop, full-width of the container */
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 20px;
  margin-top: 20px;
  width: 100%;
  box-sizing: border-box;
}
.article-card{
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
  cursor: pointer;
}
.article-card:hover{
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(0,0,0,.45);
  background: rgba(255,255,255,0.06);
}
.article-card h2{ margin: 8px 0 10px; font-size: 18px; }
.article-card p{ color: var(--muted); margin: 0; }
.article-card .badge{ margin-bottom: 10px; display:inline-block; }

/* === Animation de fumée au clic === */
/* Old SVG 'smoke-pop' removed — using subtle canvas fluid effect instead */

@media (max-width: 980px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .article-grid { grid-template-columns: 1fr; }
}

/* === Overlay de transition page === */
#page-fade {
  position: fixed;
  z-index: 99999;
  left: 0; top: 0; width: 100vw; height: 100vh;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 60%, rgba(30,30,40,0.18) 0%, rgba(30,30,40,0.45) 100%);
  opacity: 0;
  transition: opacity .5s cubic-bezier(.4,0,.2,1);
}
#page-fade.active {
  opacity: 1;
  pointer-events: all;
}

/* Barre de recherche intelligente */
.search-bar {
  margin: 2rem auto 1.5rem auto;
  max-width: 500px;
  text-align: center;
}
#searchInput {
  width: 100%;
  padding: 0.7em 1em;
  border-radius: 2em;
  border: 1px solid #ccc;
  font-size: 1.1em;
  box-shadow: 0 2px 8px #0001;
  outline: none;
  transition: border-color 0.2s;
}
#searchInput:focus {
  border-color: var(--accent, #ffd400);
}

/* Filtres de catégorie pour articles */
.category-filter {
  margin: 0 0 1.5rem 0;
  text-align: center;
}
.cat-btn {
  display: inline-block;
  margin: 0 0.3em 0.5em 0.3em;
  padding: 0.5em 1.2em;
  border-radius: 2em;
  border: 1px solid var(--accent, #ffd400);
  background: rgba(255,255,255,0.07);
  color: var(--accent, #ffd400);
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cat-btn.active, .cat-btn:hover {
  background: var(--accent, #ffd400);
  color: #222;
  border-color: var(--accent-dark, #c9a800);
}
