*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #0a3d55;
  --navy-light: #1a5c7a;
  --navy-pale:  #e8f2f7;
  --orange:     #0d9488;
  --orange-pale:#f0fdfa;
  /* Turquoise foncé pour les petits textes et les boutons sur fond clair (contraste 5,5:1, norme WCAG AA) */
  --teal-text:  #0f766e;
  --text:       #1a2a35;
  --text-light: #5a7a8a;
  --bg:         #f5f8fa;
  --white:      #ffffff;
  --radius:     14px;
  --shadow:     0 2px 8px rgba(10,61,85,.06), 0 8px 32px rgba(10,61,85,.09);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── NAV ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid #e4edf2;
  box-shadow: 0 2px 12px rgba(10,61,85,.07);
  /* Contenant pour le dropdown absolu */
  isolation: isolate;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand img { height: 42px; width: auto; object-fit: contain; }

.nav-brand-text { line-height: 1.2; }

.nav-brand-name {
  font-size: .9rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0;
}

.nav-brand-alias {
  font-size: .68rem;
  color: var(--teal-text);
  font-weight: 600;
  letter-spacing: .1em;
}

/* Droite de la nav : boutons fixes + burger */
.nav-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

.nav-fixed-link {
  text-decoration: none;
  font-size: .84rem;
  font-weight: 600;
  color: var(--navy);
  padding: .45rem .9rem;
  border-radius: 8px;
  border: 1.5px solid var(--navy-pale);
  transition: background .2s, color .2s;
  white-space: nowrap;
}

.nav-fixed-link:hover,
.nav-fixed-link.active {
  background: var(--navy-pale);
}


/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.6rem;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .2s;
  border: none;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }

.btn-primary { background: var(--teal-text); color: var(--white); }
.btn-primary:hover { background: #115e59; }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-sm { padding: .5rem 1.1rem; font-size: .82rem; }

/* ── SECTION LAYOUT ── */
.section { padding: 5rem 2rem; }
.section-alt { background: var(--white); }

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin-bottom: .6rem;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: .75rem;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto;
}

/* ── CARDS ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.75rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }

/* ── TOP BAR ── */
.topbar {
  height: 5px;
  background: linear-gradient(90deg, var(--navy), var(--navy-light) 50%, var(--orange));
}

/* ── FOOTER ── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,.75);
  padding: 3rem 2rem 1.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand img { height: 48px; width: auto; filter: brightness(0) invert(1); margin-bottom: 1rem; }
.footer-brand p { font-size: .85rem; line-height: 1.7; }

.footer-col h2 {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: .5rem; }

.footer-col ul li a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .85rem;
  transition: color .2s;
}

.footer-col ul li a:hover { color: #5eead4; }

.footer-col address {
  font-style: normal;
  font-size: .85rem;
  line-height: 1.8;
}

.footer-col address a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: color .2s;
}

.footer-col address a:hover { color: #5eead4; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .75rem;
  color: rgba(255,255,255,.65);
}

.footer-bottom a {
  color: rgba(255,255,255,.85);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s;
}

.footer-bottom a:hover { color: #5eead4; }

/* ── RESPONSIVE ── */

/* Tablette */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 3.5rem 1.5rem; }
  .section-header { margin-bottom: 2.5rem; }
}

/* ── SECTIONS DE L'ACCUEIL dans la barre de menu (même style que « Matériel reconditionné ») ── */
.nav-right { gap: .4rem; }
.nav-fixed-link { padding: .45rem .7rem; font-size: .8rem; }

/* Ordinateur : nom sur deux lignes pour laisser la place aux boutons */
@media (min-width: 961px) {
  .nav-brand-name { max-width: 11.5rem; line-height: 1.25; }
}

/* Pas la place pour le nom à côté du logo : logo seul */
@media (max-width: 1150px) {
  .nav-brand-text { display: none; }
}

/* Les ancres ne passent pas sous le menu collant */
section[id] { scroll-margin-top: 80px; }

/* Tablette et mobile : sections dans le menu burger, nom de nouveau affiché */
@media (max-width: 960px) {
  .nav-right .nav-sec { display: none; }
  .nav-brand-text { display: block; }
  .navbar .nav-burger { display: flex; }
  section[id] { scroll-margin-top: 72px; }
}

/* Le menu mobile : grille en permanence, masquée par max-height */
.nav-mobile-menu { display: grid; }

/* Caché sur ordinateur */
@media (min-width: 961px) {
  .nav-mobile-menu { display: none !important; }
}

/* ── BURGER (mobile seulement) ── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: var(--navy-pale);
  border: none;
  padding: .55rem .6rem;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-menu {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid #e4edf2;
  box-shadow: 0 8px 24px rgba(10,61,85,.12);
  z-index: 199;
  padding: 0 1rem;
  grid-template-columns: 1fr 1fr;
  gap: .25rem .5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}

.nav-mobile-menu.open {
  max-height: calc(100vh - 70px);
  overflow-y: auto;
  padding: 1rem;
}

/* Sections de l'accueil sur deux colonnes, liens principaux sur toute la largeur */
.nav-mobile-menu a:not(.mob-section) { grid-column: 1 / -1; }
.nav-mobile-menu .mob-section { font-weight: 500; color: var(--text); padding: .6rem 1rem; }
.nav-mobile-menu .mob-section + a:not(.mob-section) { margin-top: .75rem; }

.nav-mobile-menu a {
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  color: var(--navy);
  padding: .75rem 1rem;
  border-radius: 10px;
  transition: background .2s;
}

.nav-mobile-menu a:hover,
.nav-mobile-menu a.active { background: var(--navy-pale); }

.nav-mobile-menu .mob-cta {
  background: var(--teal-text);
  color: var(--white);
  text-align: center;
  margin-top: .25rem;
}

.nav-mobile-menu .mob-cta:hover { background: #115e59; }
/* Sur la page Contact, le bouton garde sa couleur (sinon le style « page active » le rend illisible) */
.nav-mobile-menu a.mob-cta.active { background: var(--teal-text); color: var(--white); }

/* Mobile large */
@media (max-width: 640px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
  .section { padding: 2.5rem 1.25rem; }
  .section-header { margin-bottom: 2rem; }

  /* Nav : cacher boutons, montrer burger */
  .nav-inner { padding: 0 1rem; height: 60px; }
  .nav-brand img { height: 34px; }
  .nav-brand-name { font-size: .78rem; }
  .nav-right { display: none; }
  .nav-burger { display: flex; }

  /* CTA strip */
  .cta-strip { padding: 3rem 1.25rem; }
  .cta-strip h2 { font-size: 1.3rem; }
}

/* Mobile petit */
@media (max-width: 380px) {
  .nav-brand-name { font-size: .68rem; }
}

/* Écrans tactiles : pas d'effet de survol qui resterait « collé » après un appui */
@media (hover: none) {
  .btn:hover, .product-card:hover, .team-card:hover, .value-card:hover, .client-item:hover,
  .cyber-step:hover, .skill-card:hover, .dist-card:hover, .info-card:hover { transform: none !important; }
}
