/* ==========================================================
   SMARTNEL — FEUILLE DE STYLE COMMUNE (v2)
   À lier dans TOUTES les pages : ../CSS/index.css
   Sections :
   1. Variables (charte graphique)
   2. Base
   3. Composants réutilisables (boutons, titres, cartes, formulaires)
   4. En-tête / navigation
   5. Page d'accueil (hero, services, pourquoi, stats, CTA)
   6. Pages secondaires (page-hero, contenu, grilles)
   7. Pied de page, WhatsApp
   8. Animations & responsive
   ========================================================== */

/* ---------- 1. CHARTE GRAPHIQUE ---------- */
:root {
  --bg: #020B2D;
  --bg-soft: #061442;
  --bg-footer: #01081E;
  --bg-card: rgba(10, 26, 76, .55);

  --primary: #00AEEF;
  --secondary: #29D8FF;
  --on-primary: #02123A;          /* texte sur fond cyan : meilleur contraste */

  --white: #FFFFFF;
  --text: #C9DBF5;
  --muted: #8FA6CC;

  --border: rgba(0, 174, 239, .18);
  --border-strong: rgba(0, 174, 239, .45);

  --gradient: linear-gradient(135deg, #00AEEF, #29D8FF);
  --gradient-soft: linear-gradient(135deg, rgba(0,174,239,.18), rgba(41,216,255,.05));

  --radius: 20px;
  --radius-lg: 28px;

  --shadow: 0 20px 50px rgba(0, 0, 0, .35);
  --glow: 0 8px 30px rgba(0, 174, 239, .35);

  --header-h: 84px;
  --container: 1200px;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 10px); }

body {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--white);
  background:
    radial-gradient(circle at 90% 0%, rgba(0,174,239,.16), transparent 32%),
    radial-gradient(circle at 0% 100%, rgba(41,216,255,.10), transparent 32%),
    var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--secondary); outline-offset: 3px; border-radius: 6px; }

::selection { background: var(--primary); color: var(--on-primary); }

/* Fond en points discrets */
.particles {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: .07;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

/* ---------- 3. COMPOSANTS RÉUTILISABLES ---------- */
.container { width: min(92%, var(--container)); margin-inline: auto; }
.section { padding: 100px 0; }

/* Boutons */
.btn-primary, .btn-secondary, .btn-nav {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; font-weight: 600; border-radius: 50px;
  transition: transform .3s, box-shadow .3s, background .3s, border-color .3s;
  cursor: pointer; border: 0;
}
.btn-primary {
  background: var(--gradient); color: var(--on-primary);
  padding: 15px 34px; box-shadow: var(--glow);
}
.btn-primary:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(0,174,239,.5); }

.btn-secondary {
  padding: 13px 32px; color: var(--white);
  border: 2px solid var(--border-strong); background: rgba(255,255,255,.02);
}
.btn-secondary:hover { border-color: var(--secondary); background: rgba(0,174,239,.12); transform: translateY(-4px); }

.btn-nav {
  background: var(--gradient); color: var(--on-primary);
  padding: 11px 24px; font-size: .95rem; box-shadow: var(--glow);
}
.btn-nav:hover { transform: translateY(-2px); }

/* Titres de section */
.section-title { text-align: center; max-width: 720px; margin: 0 auto 60px; }
.section-title span {
  display: inline-block; color: var(--primary); font-weight: 600;
  letter-spacing: .15em; font-size: .85rem; margin-bottom: 12px;
}
.section-title h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.2; }
.section-title p { color: var(--text); margin-top: 14px; }

/* Carte générique (réutilisable partout) */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform .4s, border-color .4s, box-shadow .4s;
}
.card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: 0 0 30px rgba(0,174,239,.22); }

/* Pastille d'icône */
.icon-box {
  width: 64px; height: 64px; border-radius: 18px;
  display: grid; place-items: center; margin-bottom: 22px;
  background: var(--gradient-soft); border: 1px solid var(--border);
  color: var(--primary); font-size: 1.7rem;
  transition: background .4s, color .4s, transform .4s;
}
.card:hover .icon-box { background: var(--gradient); color: var(--on-primary); transform: rotate(-6deg) scale(1.05); }

/* Formulaires (page Contact) */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text); font-size: .95rem; }
.form-control {
  width: 100%; padding: 14px 18px; border-radius: 14px;
  background: rgba(2, 11, 45, .6); border: 1px solid var(--border); color: var(--white);
  transition: border-color .3s, box-shadow .3s;
}
.form-control::placeholder { color: var(--muted); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,174,239,.18); }
textarea.form-control { min-height: 150px; resize: vertical; }

/* Étiquettes */
.tag {
  display: inline-block; padding: 6px 14px; border-radius: 30px; font-size: .82rem; font-weight: 500;
  background: rgba(0,174,239,.14); color: var(--secondary); border: 1px solid var(--border);
}

/* ---------- 4. EN-TÊTE ---------- */
header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 999;
  background: rgba(2, 11, 45, .6);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
header.scrolled {
  background: rgba(2, 11, 45, .92);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
}

.navbar {
  width: min(92%, var(--container)); margin: auto; min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo img { height: 56px; width: auto; }

.nav-menu { display: flex; gap: 6px; list-style: none; }
.nav-menu a {
  position: relative; display: block; padding: 8px 14px;
  color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem;
  transition: color .3s;
}
.nav-menu a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--gradient); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--white); }
.nav-menu a:hover::after, .nav-menu a.active::after { transform: scaleX(1); }
.nav-cta-mobile { display: none; }

.hamburger {
  display: none; background: none; border: 0; cursor: pointer;
  color: var(--white); font-size: 1.7rem; width: 46px; height: 46px; border-radius: 12px;
}
.hamburger:hover { background: rgba(0,174,239,.12); }

/* ---------- 5. ACCUEIL ---------- */
.hero {
  min-height: 100vh;
  width: min(92%, var(--container)); margin: auto;
  padding: calc(var(--header-h) + 50px) 0 70px;
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 50px;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; margin-bottom: 26px; border-radius: 30px;
  background: rgba(0,174,239,.12); border: 1px solid var(--border);
  color: var(--secondary); font-size: .9rem; font-weight: 500;
}
.hero-badge::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--secondary); box-shadow: 0 0 12px var(--secondary);
}

.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); line-height: 1.1; font-weight: 700; margin-bottom: 24px; letter-spacing: -.02em; }
.hero h1 span {
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-content > p { font-size: 1.1rem; color: var(--text); max-width: 560px; margin-bottom: 34px; }

.hero-buttons { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 44px; }

.hero-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
}
.feature i { color: var(--primary); font-size: 1.5rem; }
.feature h4 { font-size: .95rem; line-height: 1.2; }
.feature p { font-size: .8rem; color: var(--muted); line-height: 1.3; }

.hero-image { position: relative; display: grid; place-items: center; }
.hero-image::before {
  content: ""; position: absolute; width: 85%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,174,239,.35), transparent 68%);
  filter: blur(30px);
}
.hero-image::after {
  content: ""; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  border: 1px dashed var(--border-strong);
  animation: spin 40s linear infinite;
}
.hero-image img { position: relative; z-index: 1; width: 78%; animation: floating 6s ease-in-out infinite; filter: drop-shadow(0 20px 40px rgba(0,174,239,.35)); }

/* Services */
.services { padding: 100px 0; width: min(92%, var(--container)); margin: auto; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.service-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.service-card p { color: var(--text); font-size: .95rem; }

/* Pourquoi SMARTNEL */
.why-smartnel {
  width: min(92%, var(--container)); margin: auto; padding: 80px 0;
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 60px;
}
.why-left h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.2; margin-bottom: 30px; }
.why-left ul { list-style: none; display: grid; gap: 14px; }
.why-left li {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  transition: transform .3s, border-color .3s;
}
.why-left li:hover { transform: translateX(8px); border-color: var(--primary); }
.why-left li i {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gradient); color: var(--on-primary); font-size: .85rem;
}
.why-right {
  position: relative; display: grid; place-items: center; padding: 50px;
  border-radius: var(--radius-lg); background: var(--gradient-soft); border: 1px solid var(--border);
  overflow: hidden;
}
.why-right::before {
  content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,174,239,.35), transparent 70%); filter: blur(24px);
}
.why-right img { position: relative; width: 70%; }

/* Statistiques */
.stats {
  width: min(92%, var(--container)); margin: auto; padding: 80px 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px;
}
.stat-card {
  text-align: center; padding: 38px 20px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: transform .3s, border-color .3s;
}
.stat-card:hover { transform: translateY(-6px); border-color: var(--primary); }
.stat-card h3 {
  font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1.1; font-weight: 700;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat-card p { color: var(--text); margin-top: 6px; }

/* Appel à l'action */
.cta {
  width: min(92%, var(--container)); margin: 40px auto 100px;
  padding: 60px 50px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  background:
    radial-gradient(circle at 100% 0%, rgba(41,216,255,.25), transparent 50%),
    linear-gradient(135deg, rgba(0,174,239,.22), rgba(6,20,66,.8));
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}
.cta h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.2; margin-bottom: 12px; }
.cta p { color: var(--text); max-width: 520px; }

/* ---------- 6. PAGES SECONDAIRES ---------- */
/* Bandeau de titre en haut de chaque page (About, Services, Blog…) */
.page-hero {
  padding: calc(var(--header-h) + 70px) 0 60px; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,174,239,.2), transparent 60%);
}
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.15; margin-bottom: 14px; }
.page-hero p { color: var(--text); max-width: 640px; margin: 0 auto; }
.breadcrumb { display: inline-flex; gap: 10px; margin-bottom: 18px; font-size: .9rem; color: var(--muted); }
.breadcrumb a { color: var(--secondary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }

/* Texte long (articles de blog, à propos) */
.prose { max-width: 780px; margin: auto; color: var(--text); }
.prose h2, .prose h3 { color: var(--white); margin: 36px 0 14px; line-height: 1.25; }
.prose p { margin-bottom: 18px; }
.prose a { color: var(--secondary); }
.prose ul { margin: 0 0 18px 22px; }

/* ---------- 7. PIED DE PAGE & WHATSAPP ---------- */
footer { background: var(--bg-footer); border-top: 1px solid var(--border); padding: 80px 0 30px; }
.footer-grid {
  width: min(92%, var(--container)); margin: auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px;
}
.footer-grid h3 { margin-bottom: 20px; color: var(--primary); font-size: 1.05rem; }
.footer-grid p, .footer-grid li { color: var(--text); font-size: .95rem; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { text-decoration: none; transition: color .3s, padding .3s; }
.footer-grid ul a:hover { color: var(--secondary); padding-left: 6px; }
.footer-contact p { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.footer-contact i { color: var(--primary); margin-top: 6px; width: 16px; text-align: center; }
.footer-bottom {
  width: min(92%, var(--container)); margin: 50px auto 0; padding-top: 24px;
  text-align: center; color: var(--muted); font-size: .9rem;
  border-top: 1px solid rgba(255,255,255,.08);
}

.whatsapp {
  position: fixed; right: 22px; bottom: 22px; z-index: 999;
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25D366; color: var(--white); font-size: 1.9rem; text-decoration: none;
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
  animation: pulse 2s infinite; transition: transform .3s;
}
.whatsapp:hover { transform: scale(1.1); }

/* ---------- 8. ANIMATIONS ---------- */
@keyframes floating { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,.6), 0 10px 25px rgba(0,0,0,.35); }
  70%  { box-shadow: 0 0 0 20px rgba(37,211,102,0), 0 10px 25px rgba(0,0,0,.35); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0), 0 10px 25px rgba(0,0,0,.35); }
}

/* Apparition au défilement (activée seulement si JavaScript est actif) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .08s; }
.js .reveal[data-delay="2"] { transition-delay: .16s; }
.js .reveal[data-delay="3"] { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
  .hero { grid-template-columns: 1fr; text-align: center; min-height: auto; gap: 30px; }
  .hero-content > p { margin-inline: auto; }
  .hero-buttons { justify-content: center; }
  .hero-image { order: -1; }
  .hero-image img { width: 52%; }
  .hero-image::after { width: 56%; }
  .hero-image::before { width: 60%; }

  .why-smartnel { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }

  .btn-nav { display: none; }
  .hamburger { display: grid; place-items: center; }

  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 12px 4%;
    background: rgba(2, 11, 45, .97);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0,0,0,.4);
    max-height: 0; overflow: hidden; opacity: 0; visibility: hidden;
    transition: max-height .4s ease, opacity .3s, visibility .3s;
  }
  .nav-menu.open { max-height: 480px; opacity: 1; visibility: visible; padding: 16px 4% 24px; }
  .nav-menu a { padding: 14px 6px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 1rem; }
  .nav-menu a::after { display: none; }
  .nav-menu a.active { color: var(--primary); }
  .nav-cta-mobile { display: block; margin-top: 16px; }
  .nav-menu .nav-cta-mobile a { display: flex; border: 0; text-align: center; color: var(--on-primary); }

  .cta { padding: 44px 28px; text-align: center; justify-content: center; }
}

@media (max-width: 576px) {
  .section, .services { padding: 70px 0; }
  .hero-features { grid-template-columns: 1fr; }
  .hero-buttons .btn-primary, .hero-buttons .btn-secondary { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .logo img { height: 48px; }
  .whatsapp { width: 56px; height: 56px; right: 16px; bottom: 16px; }
}