:root{
  --primary:#177bce;
  --accent:#5887ad;
  --tirfiary:#000000;
  --dark:#0f172a;
  --gray:#64748b;
  --light:#f8fafc;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:Inter,sans-serif;background:var(--light);color:var(--dark);line-height:1.6}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}

.container{max-width:1200px;margin:auto;padding:0 20px}

/* ================= HEADER ================= */

header{
  position:relative;
  background:#0f172a;
  color:#fff;
  padding:60px 0 60px;
  overflow:hidden;
}

header > .container,
nav,
.hero{
  position:relative;
  z-index:2;
}

#Matrix {
  background: rgb(0, 0, 0);
}

.matrix-canvas{
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
}

/* ================= NAV ================= */

nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:50px;
}

nav img{width:200px}

nav a{
  position:relative;
  margin-left:25px;
  font-weight:500;
  opacity:.9;
  color:#fff;
  padding:5px 0;
}

nav a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-6px;
  width:100%;
  height:2px;
  background:linear-gradient(90deg,var(--accent),var(--primary));
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .35s ease;
}

nav a:hover::after{
  transform:scaleX(1);
}

/* ================= HERO ================= */

.hero{
  max-width:760px;
}

.hero h1{
  font-size:2.8rem;
  font-weight:800;
  margin-bottom:20px;
}

.hero p{
  font-size:1.15rem;
  opacity:.9;
}

.btn{
  display:inline-block;
  margin-top:25px;
  padding:15px 30px;
  background:var(--primary);
  color:#fff;
  border-radius:10px;
  font-weight:600;
}

/* ================= SECTIONS ================= */

section{padding:80px 0}

h2{
  font-size:2.2rem;
  font-weight:800;
  text-align:center;
  margin-bottom:20px;
}

.section-intro{
  max-width:760px;
  margin:0 auto 40px;
  text-align:center;
  color:var(--gray);
}

/* ================= GRID / CARDS ================= */

.grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:30px;
}

.card{
  background:#fff;
  border-radius:16px;
  padding:25px;
  box-shadow:0 10px 30px rgba(0,0,0,.05);
  transition:transform .3s ease, box-shadow .3s ease;
}

.card:hover{
  transform:translateY(-8px);
  box-shadow:0 20px 45px rgba(0,0,0,.12);
}

.card img{
  width:48px;
  margin:0 auto 15px;
  transition:transform .6s ease;
}

.card:hover img{
  transform:rotate(360deg);
}

.card h3{
  margin-bottom:10px;
  text-align:center;
}

/* ================= APPROCHE ================= */

#approche{
  background:linear-gradient(135deg,var(--primary),var(--accent));
  color:#fff;
}

#approche .section-intro{
  color:#e5e7eb;
}

#approche .card{
  background:rgba(255,255,255,.95);
  color:var(--dark);
}

/* ================= ABOUT ================= */

.about{
  display:grid;
  gap:30px;
}

.about-text p{
  color:var(--gray);
  line-height:1.7;
  margin-bottom:15px;
  text-align:center;
}

.about-name p{
  color:#0f172a;
  font-weight:900;
  text-align:center;
  margin-bottom:15px;
}

.about-img{
  display:flex;
  justify-content:center;
  align-items:center;
}

.about-img img{
  border-radius:20px;
  max-width:200px;
  box-shadow:0 15px 30px rgba(0,0,0,.1);
}

/* ================= CTA ================= */

.cta{
  background:linear-gradient(180deg,var(--primary),var(--tirfiary));
  color:#fff;
  text-align:center;
  padding:80px 20px;
}

/* ================= FOOTER ================= */

#MatrixFooter {
  background: rgb(0, 0, 0);
}

footer{
  position: relative;
  overflow: hidden;
  background:#000000fb;
  color:#fff;
  text-align:center;
  padding:30px 20px;
  font-size:.85rem;
}

#MatrixFooter {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

footer p {
  position: relative;
  z-index: 1;
}

/* ================= BACK TO TOP ================= */

#backToTop{
  position:fixed;
  bottom:30px;
  right:30px;
  width:50px;
  height:50px;
  border:none;
  border-radius:14px;
  background:var(--primary);
  color:#fff;
  font-size:22px;
  font-weight:700;
  cursor:pointer;
  opacity:0;
  pointer-events:none;
  transform:translateY(10px);
  transition:opacity .3s ease, transform .3s ease;
  box-shadow:0 10px 25px rgba(0,0,0,.25);
  z-index:1000;
}

#backToTop.show{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}

#backToTop:hover{
  transform:translateY(-3px);
  box-shadow:0 15px 35px rgba(0,0,0,.35);
}

/* ================= RESPONSIVE ================= */

@media(max-width:900px){
  .hero h1{font-size:2rem}
  .about{grid-template-columns:1fr;text-align:center}
  .about img{margin:auto}
  .grid{grid-template-columns:1fr}
}

@media(max-width:600px){
  #backToTop{
    width:44px;
    height:44px;
    bottom:20px;
    right:20px;
  }
}

/* Logo */
nav img.logo {
  width: 200px; /* garde la taille fixe du logo */
}

/* Menu classique */
.nav-links a {
  margin-left: 25px;
  font-weight: 500;
  color: #fff;
  padding: 5px 0;
  position: relative;
}

/* Ligne animée sous les liens */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transform: scaleX(0); 
  transform-origin: left; 
  transition: transform 0.35s ease; 
}

.nav-links a:hover::after {
  transform: scaleX(1); /* animation de la ligne au survol */
}

/* Responsive : cacher le menu sur smartphone */
@media (max-width: 700px) {
  .nav-links {
    display: none;  /* cacher les liens de navigation */
  }

  .hero h1 {
    font-size: 2rem; /* ajuste le titre */
  }
}

