/* ============================================================
   style.css — Général Médical
   Charte graphique pixel-perfect · Mobile-First · Responsive
   ============================================================ */

/* ── Google Fonts ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&family=DM+Serif+Display:ital@0;1&display=swap');

/* ── Variables & Reset ───────────────────────────────────── */
:root {
  --blue:       #0591d0;
  --blue-dark:  #0380ab;
  --blue-deep:  #025a7a;
  --teal:       #0e7c74;
  --bordeaux:   #8b1a2c;
  --green:      #2d7a3a;
  --orange:     #d4621a;
  --navy:       #2c4a7a;
  --text:       #1a2a3a;
  --text-soft:  #4a5568;
  --text-muted: #8896a7;
  --border:     #e0e8f0;
  --bg:         #f4f6f8;
  --bg-soft:    #f0f7fd;
  --white:      #ffffff;
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 32px rgba(5,145,208,0.15);
  --radius:     10px;
  --radius-sm:  6px;
  
  /* Polices de caractères */
  --font:       'Helvetica Neue', Arial, sans-serif;
  
  --transition: .18s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; }
img { max-width: 100%; display: block; }

/* ── Utility ─────────────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
.hidden { display: none !important; }

/* ── HEADER ─────────────────────────────────────────────── */
.hdr {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}

.hdr-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.hdr-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.hdr-logo svg, .hdr-logo img { width: 100%; height: 100%; object-fit: contain; }

.hdr-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.hdr-name span {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hdr-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.hdr-nav a {
  font-size: 14px;
  color: var(--text-soft);
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}

.hdr-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: width var(--transition);
}

.hdr-nav a:hover { color: var(--blue); }
.hdr-nav a:hover::after { width: 100%; }
.hdr-nav a.active { color: var(--blue); }
.hdr-nav a.active::after { width: 100%; }

.hdr-cta {
  background: var(--blue);
  color: var(--white);
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  transition: background var(--transition), transform var(--transition);
}

.hdr-cta:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 60%, var(--blue-deep) 100%);
  padding: 80px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 420px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: 30%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
}

.hero-content { position: relative; z-index: 2; }

.hero-tag {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
}

.hero-txt { color: var(--white); max-width: 540px; }

.hero-txt h1 {
  font-family: var(--font-serif);
  font-size: 46px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero-txt p {
  font-size: 16px;
  opacity: 0.88;
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 440px;
}

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-primary {
  background: var(--white);
  color: var(--blue);
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.55);
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition), border-color var(--transition);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.85);
}

.hero-deco {
  width: 200px;
  height: 195px;
  opacity: 0.13;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.hero-deco svg { width: 100%; height: 100%; }

/* ── STATS BAR ───────────────────────────────────────────── */
.stats-bar {
  background: var(--white);
  padding: 36px 60px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  text-align: center;
  gap: 20px;
}

.stat-item .num {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: bold;
  color: var(--blue);
  line-height: 1;
}

.stat-item .lbl {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* ── SECTION BASE ────────────────────────────────────────── */
.section { padding: 60px; }

.section-header { margin-bottom: 36px; }

.section-title {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--text);
  margin-bottom: 6px;
}

.section-sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── CATEGORIES GRID ─────────────────────────────────────── */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.cat-card {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
  background: var(--white);
  text-decoration: none;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.cat-top {
  padding: 24px 20px 20px;
  color: var(--white);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
}

.cat-top .cat-icon { font-size: 28px; }
.cat-top .cat-icon img { max-width: 50px; max-height: 50px; object-fit: contain; }

.cat-top h3 { font-size: 15px; font-weight: 700; line-height: 1.3; }

.cat-bot {
  padding: 14px 20px;
  background: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cat-bot .cat-desc { font-size: 12px; color: var(--text-muted); }
.cat-bot .arr { color: var(--blue); font-size: 18px; font-weight: 700; transition: transform var(--transition); }
.cat-card:hover .arr { transform: translateX(4px); }

/* ── ABOUT ───────────────────────────────────────────────── */
.about {
  background: var(--bg-soft);
  padding: 60px;
}

.about-inner {
  display: flex;
  gap: 60px;
  align-items: center;
}

.about-txt { flex: 1; }

.about-txt h2 {
  font-family: var(--font-serif);
  font-size: 30px;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.2;
}

.about-txt p {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.75;
  margin-bottom: 12px;
}

.about-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  margin-top: 8px;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex-shrink: 0;
  min-width: 280px;
}

.astat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.astat .n {
  font-family: var(--font-serif);
  font-size: 34px;
  color: var(--blue);
  line-height: 1;
}

.astat .l {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

/* ── CTA BAND ────────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-deep) 100%);
  padding: 52px 60px;
  text-align: center;
  color: var(--white);
}

.cta-band h2 {
  font-family: var(--font-serif);
  font-size: 30px;
  margin-bottom: 10px;
}

.cta-band p {
  font-size: 15px;
  opacity: 0.85;
  margin-bottom: 28px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.btn-dl {
  background: var(--white);
  color: var(--blue-dark);
  padding: 12px 32px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

/* ── BRANDS ──────────────────────────────────────────────── */
.brands-section {
  padding: 52px 60px;
  background: var(--white);
}

.brands-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
  text-align: center;
}

.brands-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.brand-pill {
  background: #f0f5fa;
  border: 1px solid #d8e6f0;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-dark);
  transition: background var(--transition), border-color var(--transition);
}

.brand-pill:hover { background: #e0ecf8; border-color: var(--blue); }

/* ── FOOTER ──────────────────────────────────────────────── */
.ftr {
  background: var(--blue-dark);
  padding: 48px 60px 28px;
  color: var(--white);
}

.ftr-top {
  display: flex;
  gap: 48px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.ftr-brand {
  flex: 1;
  min-width: 200px;
}

.ftr-logo {
  width: 60px;
  height: 58px;
  margin-bottom: 12px;
}

.ftr-logo svg, .ftr-logo img { width: 100%; height: 100%; object-fit: contain; }

.ftr-brand p {
  font-size: 13px;
  opacity: 0.7;
  line-height: 1.65;
  max-width: 240px;
  margin-top: 8px;
}

.ftr-col h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.55;
  margin-bottom: 14px;
}

.ftr-col a {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  margin-bottom: 8px;
  transition: opacity var(--transition);
}

.ftr-col a:hover { opacity: 1; }

.ftr-bot {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.55;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Tablet (Sub-1024px) ─────────────────────────────────── */
@media (max-width: 1024px) {
  .container, .hdr, .hero, .section, .about, .cta-band, .brands-section, .ftr { padding-left: 24px; padding-right: 24px; }
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { padding: 28px 24px; flex-wrap: wrap; }
  .about-inner { flex-direction: column; gap: 32px; }
}

/* ── Mobile (Sub-768px) ──────────────────────────────────── */
@media (max-width: 768px) {
  /* Suppression définitive de l'affichage du slider sur mobile */
  .hero-slider {
    display: none !important;
  }

  /* En-tête mobile à hauteur fixe de 60px */
  .hdr {
    padding: 0 16px;
    height: 60px;
    position: relative; 
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  /* Cacher le bouton CTA principal du header sur mobile pour laisser la place au burger */
  .hdr-cta {
    display: none !important;
  }

  /* Menu de navigation mobile de base */
  .hdr-nav {
    display: none; 
  }

  /* Déploiement structuré avec forçage de l'affichage au clic (.active) */
  .hdr-nav.active {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    top: 60px !important; 
    left: 0 !important;
    right: 0 !important;
    background: var(--white) !important;
    border-bottom: 3px solid var(--blue) !important;
    padding: 8px 16px !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08) !important;
    z-index: 999 !important;
    gap: 0 !important;
  }

  /* Liens du menu mobile */
  .hdr-nav.active a {
    padding: 14px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--text-soft) !important;
    border-bottom: 1px solid var(--border) !important;
    width: 100% !important;
    display: block !important;
  }

  .hdr-nav.active a:last-child {
    border-bottom: none !important;
  }

  .hdr-nav.active a:hover,
  .hdr-nav.active a.active {
    background: var(--bg-soft) !important;
    color: var(--blue) !important;
  }

  /* Affichage du bouton burger */
  .nav-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    z-index: 1000;
  }

  .nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  /* Transformation du bouton burger en (X) à l'état actif */
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .hero { padding: 48px 16px; flex-direction: column; min-height: auto; gap: 24px; }
  .hero-deco { width: 120px; height: 120px; align-self: flex-end; opacity: 0.1; }
  .hero-txt h1 { font-size: 30px; }
  .hero-btns { flex-direction: column; width: 100%; }
  .hero-btns button { width: 100%; }

  .stats-bar { padding: 24px 16px; gap: 24px; }

  .section { padding: 40px 16px; }
  .cats-grid { grid-template-columns: 1fr; }
  .about { padding: 40px 16px; }
  .about-stats { min-width: auto; }
  .cta-band { padding: 40px 16px; }
  .brands-section { padding: 36px 16px; }
  .ftr { padding: 36px 16px 20px; }
  .ftr-top { gap: 28px; }
}

@media (max-width: 480px) {
  .hero-txt h1 { font-size: 26px; }
  .section-title { font-size: 22px; }
  .about-txt h2 { font-size: 24px; }
  .cta-band h2 { font-size: 22px; }
}

/* ── AJOUTS SLIDER HERO (Uniquement actif sur Desktop) ────── */
.hero-slider {
  position: absolute;
  top: 0;
  right: 0;
  width: 45%; 
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero-slider::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(5,145,208,1) 0%, rgba(5,145,208,0.2) 100%);
  pointer-events: none;
}

.hero-slider .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slider .slide.active {
  opacity: 1;
}