/* ============================================================
   HELIANTIX — style.css  (Mobile-First Responsive)
   Couleurs : marine #0A1A2F  |  cyan #1A7FA5  |  bleu #166a89
   Police   : Inter (Google Fonts)
   ============================================================ */

/* ------------------------------------------------------ */
/* RESET & BASE                                           */
/* ------------------------------------------------------ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background: #FFFFFF;
  color: #0A1A2F;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%; /* évite le zoom auto iOS */
}

img {
  max-width: 100%;
  display: block;
}

a { color: inherit; }

/* Conteneur générique */
.container {
  max-width: 1300px;
  margin: auto;
  padding: 0 16px;   /* 16px mobile → 30px desktop */
}

@media (min-width: 768px) {
  .container { padding: 0 30px; }
}

/* ------------------------------------------------------ */
/* HEADER FIXE + HAMBURGER                                */
/* ------------------------------------------------------ */

.header {
  width: 100%;
  height: 64px;          /* compact sur mobile */
  background: #0A1A2F;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  overflow: visible;     /* laisse passer le menu déroulant */
}

@media (min-width: 768px) {
  .header { height: 13.5vh; }
}

.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;    /* ancre le menu déroulant mobile */
}

/* Logo */
.logo {
  background-color: white;
  padding: 5px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: inline-block;
  flex-shrink: 0;
}

.logo img {
  height: 40px;       /* compact mobile */
  display: block;
  transition: 0.3s ease;
}

@media (min-width: 768px) {
  .logo { padding: 8px 14px; border-radius: 10px; }
  .logo img { height: 70px; }
  .logo img:hover { transform: scale(1.05); }
}

/* ── Hamburger (visible uniquement mobile) ──────────────── */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animation croix */
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (min-width: 768px) {
  .hamburger { display: none; }
}

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  /* Mobile : menu déroulant caché */
  display: none;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: #0A1A2F;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 8px 0 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 300;          /* au-dessus du header */
}

.nav.open { display: flex; }

.nav a {
  text-decoration: none;
  color: #D9E2E8;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.2s ease;
}

.nav a:last-child { border-bottom: none; }
.nav a:hover, .nav a.active { color: #1BA8D5; }

/* Desktop : nav horizontale */
@media (min-width: 768px) {
  .nav {
    display: flex !important;
    flex-direction: row;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    gap: 32px;
    align-items: center;
  }

  .nav a {
    font-size: 19px;
    padding: 0 0 4px;
    border: none;
    position: relative;
  }

  .nav a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: #1BA8D5;
    transition: 0.25s ease;
  }

  .nav a:hover::after,
  .nav a.active::after { width: 100%; }
}

.btn-nav {
  background: #1A7FA5 !important;
  color: white !important;
  padding: 10px 18px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: 0.3s ease !important;
  border-bottom: none !important;
}

.btn-nav:hover { background: #166a89 !important; }

/* ------------------------------------------------------ */
/* HERO SCIENTIFIQUE                                      */
/* ------------------------------------------------------ */

.hero {
  min-height: 60vh;       /* mobile : moins haut */
  margin-top: 64px;       /* compense header mobile */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    min-height: 80vh;
    margin-top: 13.5vh;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("images/header-adn.png");
  background-size: cover;
  background-position: center;
  filter: brightness(0.45);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,26,47,0.7), rgba(27,168,213,0.25));
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 700px;
  padding: 0 20px;
}

.hero-content h1 {
  font-size: clamp(26px, 7vw, 48px);  /* fluide mobile→desktop */
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 0 0 12px rgba(27,168,213,0.4);
}

.hero-content p {
  font-size: clamp(15px, 4vw, 20px);
  opacity: 0.9;
  text-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.btn-hero {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 26px;
  background: #1BA8D5;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: 0.25s ease;
}

.btn-hero:hover { background: #1588AD; }

/* ------------------------------------------------------ */
/* SECTIONS GÉNÉRIQUES                                    */
/* ------------------------------------------------------ */

.section {
  padding: 60px 0;
}

@media (min-width: 768px) {
  .section { padding: 90px 0; }
}

.section-alt { background: #F2F5F7; }

.section h2 {
  font-size: clamp(24px, 5vw, 32px);
  margin-bottom: 20px;
}

.subtitle { color: #8A97A1; margin-bottom: 30px; }

/* ------------------------------------------------------ */
/* DÉCOUVREZ-NOUS                                         */
/* ------------------------------------------------------ */

.decouvrez-grid {
  display: grid;
  grid-template-columns: 1fr;   /* 1 colonne mobile */
  gap: 32px;
  align-items: center;
}

@media (min-width: 768px) {
  .decouvrez-grid { grid-template-columns: 1fr 1fr; gap: 60px; }
}

.titre-centre { text-align: center; margin-bottom: 24px; }

.decouvrez-text p {
  text-align: justify;
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 1.7;
  color: #0A1A2F;
}

.decouvrez-image img {
  width: 100%;
  max-width: 450px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  margin: auto;
}

/* ------------------------------------------------------ */
/* NOS ANALYSES                                           */
/* ------------------------------------------------------ */

#analyses h2 {
  text-align: center;
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 700;
  color: #0A1A2F;
  margin-bottom: 8px;
}

#analyses .subtitle {
  text-align: center;
  font-size: 17px;
  color: black;
  font-weight: 500;
  margin-bottom: 28px;
}

.analyses-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}

.analyse-card {
  flex: 1 1 280px;
  max-width: 320px;
  background: white;
  padding: 22px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: 0.3s ease;
}

.analyse-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}

.analyse-img {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.analyse-img img { width: 100%; height: 100%; object-fit: cover; }

.analyse-card h3 { margin-bottom: 10px; font-size: 18px; }

.analyse-card p {
  font-size: 14px;
  color: #4A5A6A;
  margin-bottom: 16px;
  flex-grow: 1;
}

.btn-link {
  display: inline-block;
  padding: 8px 16px;
  border: 2px solid #1BA8D5;
  color: #1BA8D5 !important;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s ease;
  margin-top: auto;
}

.btn-link:hover { background: #1BA8D5; color: white !important; }

/* Carte mise en avant — Espace vétérinaires (accès formulaire/tarifs/commande) */
.analyse-card-cta {
  background: linear-gradient(160deg, #0F4C6E 0%, #166A89 100%);
  color: #fff;
  border: none;
}

.analyse-card-cta h3 { color: #fff; }

.analyse-card-cta p { color: rgba(255,255,255,0.82); }

.analyse-cta-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.btn-link-cta {
  border-color: #ffffff;
  color: #ffffff !important;
}

.btn-link-cta:hover {
  background: #ffffff;
  color: #166A89 !important;
}

/* ------------------------------------------------------ */
/* ANIMATIONS SCROLL                                      */
/* ------------------------------------------------------ */

@keyframes premiumFadeIn {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.decouvrez-text, .decouvrez-image, .analyse-card,
.choisir-card, .lab-header, .lab-carousel,
.equipe-card, .contact-info, .contact-form {
  animation: premiumFadeIn linear both;
  animation-timeline: view();
  animation-range: entry 5% cover 30%;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(-8px); }
}

.input-error {
  animation: shake 0.4s ease-in-out;
  border-color: #e74c3c !important;
  box-shadow: 0 0 10px rgba(231,76,60,0.2);
}

.input-success {
  border-color: #27ae60 !important;
  box-shadow: 0 0 10px rgba(39,174,96,0.2);
  background-color: #f0fff4;
}

#code-input { transition: all 0.3s ease; }

/* ------------------------------------------------------ */
/* POURQUOI NOUS CHOISIR                                  */
/* ------------------------------------------------------ */

.choisir-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}

@media (min-width: 600px) {
  .choisir-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .choisir-grid { grid-template-columns: repeat(3, 1fr); gap: 35px; }
}

.choisir-card {
  background: rgba(255,255,255,0.85);
  padding: 28px 24px;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  text-align: center;
  transition: 0.3s ease;
  backdrop-filter: blur(6px);
}

.choisir-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.10);
}

.choisir-card h3 { font-size: 18px; margin-bottom: 10px; }

.choisir-card p { font-size: 14px; color: #4A5A6A; line-height: 1.6; }

.choisir-icon { margin-bottom: 16px; }

.choisir-icon svg { width: 48px; height: 48px; stroke: #1A7FA5; }

.choisir-intro {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 36px auto;
}

/* ------------------------------------------------------ */
/* LABORATOIRE (carrousel)                                */
/* ------------------------------------------------------ */

#laboratoire { background: #F5F7FA; padding: 60px 0; }

.lab-header { text-align: center; margin-bottom: 32px; }

.lab-header h2 {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 700;
  color: #0F1C2E;
}

.lab-header p {
  font-size: 15px;
  color: #4A5A6A;
  max-width: 700px;
  margin: 10px auto 0;
}

.lab-carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lab-slides {
  position: relative;
  width: 100%;
  height: 240px;         /* plus compact mobile */
}

@media (min-width: 768px) {
  .lab-slides { height: 300px; }
}

.lab-slide {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(320px, 85vw);
  text-align: center;
  transform: translateX(-50%) scale(0.7);
  opacity: 0;
  transition: 0.45s ease;
  pointer-events: none;
}

.lab-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.10);
}

@media (min-width: 768px) {
  .lab-slide { width: 380px; }
  .lab-slide img { width: 380px; height: 240px; }
}

.lab-slide.active {
  opacity: 1;
  transform: translateX(-50%) scale(1.1);
  z-index: 3;
  pointer-events: auto;
}

.lab-slide.left {
  opacity: 0.3;
  transform: translateX(calc(-50% - 260px)) scale(0.82);
  z-index: 2;
}

.lab-slide.right {
  opacity: 0.3;
  transform: translateX(calc(-50% + 260px)) scale(0.82);
  z-index: 2;
}

@media (min-width: 768px) {
  .lab-slide.left  { transform: translateX(calc(-50% - 320px)) scale(0.85); opacity: 0.4; }
  .lab-slide.right { transform: translateX(calc(-50% + 320px)) scale(0.85); opacity: 0.4; }
}

.lab-caption {
  margin-top: 12px;
  font-size: 14px;
  color: #0F1C2E;
  font-weight: 500;
}

.lab-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #1A7FA5;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  color: #1A7FA5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.25s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  z-index: 10;
}

.lab-arrow:hover { background: #1A7FA5; color: white; border-color: #1A7FA5; }

.lab-arrow-left  { left: 4px; }
.lab-arrow-right { right: 4px; }

@media (min-width: 768px) {
  .lab-arrow { width: 48px; height: 48px; }
  .lab-arrow-left  { left: 0; }
  .lab-arrow-right { right: 0; }
}

/* ------------------------------------------------------ */
/* ÉQUIPE                                                 */
/* ------------------------------------------------------ */

.equipe-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}

@media (min-width: 600px) {
  .equipe-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .equipe-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}

.equipe-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.85);
  padding: 28px 24px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  backdrop-filter: blur(6px);
  transition: 0.3s ease;
}

.equipe-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.10);
}

.equipe-photo {
  display: block;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px auto;
}

.equipe-photo-placeholder {
  background: #eef2f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.equipe-photo-placeholder svg {
  width: 70%;
  height: 70%;
}

.equipe-card h3 { font-size: 20px; margin-bottom: 6px; }

.equipe-role { font-weight: 600; color: #1A7FA5; margin-bottom: 6px; }

.equipe-desc { color: #4A5A6A; font-size: 14px; margin-bottom: 18px; }

.btn-linkedin {
  display: inline-block;
  padding: 10px 18px;
  background: #1A7FA5;
  color: white !important;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s ease;
}

.btn-linkedin:hover { background: #166a89; }

/* ------------------------------------------------------ */
/* CONTACT                                                */
/* ------------------------------------------------------ */

.contact-section { padding: 60px 0; }

.contact-wrapper { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

@media (min-width: 768px) {
  .contact-wrapper { padding: 0 20px; }
}

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

.section-title {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 700;
  margin-bottom: 10px;
  color: #0F1C2E;
}

.section-subtitle { font-size: 15px; color: #4A5A6A; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

.card {
  background: rgba(255,255,255,0.95);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .card { padding: 30px; }
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #1A7FA5;
  margin-bottom: 18px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 18px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #0F1C2E;
}

.info-value {
  font-weight: 500;
  color: #0F1C2E;
  text-decoration: none;
  transition: 0.2s ease;
  word-break: break-all;
}

.info-value:hover { color: #1A7FA5; text-decoration: underline; }

.info-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #E6F4FA;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-icon svg { width: 20px; height: 20px; }

.map-wrapper {
  width: 100%;
  height: 220px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #DCE3EA;
  margin-top: auto;
}

@media (min-width: 768px) {
  .map-wrapper { height: 260px; }
}

.map-wrapper iframe { width: 100%; height: 100%; border: 0; }

/* Formulaire de contact (section contact) */
.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

/* .form-group défini aussi dans la zone "formulaire bon de commande" ci-dessous */
.contact-form .form-group { display: flex; flex-direction: column; gap: 6px; }

.contact-form .form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #1A7FA5;
}

.contact-form .form-group input,
.contact-form .form-group textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #D0D7DF;
  font-size: 15px;
  background: #FFFFFF;
  transition: 0.2s ease;
}

.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus {
  border-color: #1A7FA5;
  box-shadow: 0 0 0 2px rgba(26,127,165,0.15);
  outline: none;
}

.contact-form .form-group textarea { height: 130px; resize: none; }

.btn-contact {
  padding: 14px;
  width: 100%;
  background: #1A7FA5;
  color: white;
  font-weight: 600;
  font-size: 15px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: 0.3s ease;
  margin-top: auto;
}

.btn-contact:hover { background: #166A89; }

/* ------------------------------------------------------ */
/* FOOTER                                                 */
/* ------------------------------------------------------ */

.footer {
  background: #0F1C2E;
  color: #D9E2EC;
  padding: 40px 0 20px;
  margin-top: 40px;
  font-size: 14px;
}

@media (min-width: 768px) {
  .footer { padding: 50px 0 25px; margin-top: 60px; }
}

.footer-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr;      /* mobile : 1 colonne */
  gap: 32px;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-wrapper {
    padding: 0 20px;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 40px;
    text-align: left;
  }
}

.footer-brand { max-width: 300px; text-align: center; margin: 0 auto; }

.footer-logo-text {
  font-size: 26px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 10px;
  white-space: nowrap;
}

.footer-text {
  font-size: 14px;
  color: #A8B5C3;
  line-height: 1.5;
  max-width: 260px;
  margin: 0 auto;
}

.footer-title { font-size: 15px; font-weight: 600; color: #FFFFFF; margin-bottom: 12px; }

.footer-links { list-style: none; padding: 0; margin: 0; }

.footer-links li { margin-bottom: 8px; }

.footer-links a { color: #D9E2EC; text-decoration: none; transition: 0.2s ease; }

.footer-links a:hover { color: #1A7FA5; }

.footer-bottom {
  margin-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
}

.footer-bottom-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom-inner {
    padding: 0 20px;
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-bottom-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

@media (min-width: 768px) {
  .footer-bottom-right { flex-direction: row; gap: 12px; }
}

.footer-madeby-logo {
  width: 85px;
  height: auto;
  object-fit: contain;
}

.footer-madeby-text { font-size: 12px; color: #A8B5C3; line-height: 1.3; }

.footer-madeby-text span { font-size: 11px; opacity: 0.6; }

.footer-logo-wrapper {
  background: rgb(9,10,27);
  padding: 10px 14px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ------------------------------------------------------ */
/* POPUP GLOBAL                                           */
/* ------------------------------------------------------ */

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 16px;   /* évite que le popup colle aux bords */
}

.popup-content {
  background: #fff;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  position: relative;
  animation: popupFade 0.25s ease;
}

@media (min-width: 768px) {
  .popup-content { padding: 40px; }
}

@keyframes popupFade {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* Header popup : image + titre */
.popup-header {
  display: grid;
  grid-template-columns: 1fr;   /* mobile : image au-dessus */
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

@media (min-width: 600px) {
  .popup-header { grid-template-columns: 200px 1fr; gap: 20px; margin-bottom: 30px; }
}

@media (min-width: 768px) {
  .popup-header { grid-template-columns: 250px 1fr; }
}

.popup-header-img img { width: 100%; border-radius: 10px; }

.popup-header-title h2 {
  text-align: center;
  font-size: clamp(20px, 5vw, 32px);
  color: #1A7FA5;
  margin: 0;
}

.popup-content h2 { font-size: clamp(20px, 5vw, 28px); margin-bottom: 18px; color: #1A7FA5; }

.popup-content h3 { margin-top: 22px; margin-bottom: 10px; font-size: 17px; color: #0F1C2E; }

.popup-content p,
.popup-content ul li { font-size: 14px; line-height: 1.6; color: #3A4A5A; }

.popup-content ul { margin-left: 20px; margin-bottom: 18px; }

.popup-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
  color: #333;
  line-height: 1;
}

.popup-contact-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 20px;
  background: #1A7FA5;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

#popup-success .popup-content {
  max-width: 450px;
  text-align: center;
  padding: 40px 24px;
}

#popup-success .popup-content h2 { margin-bottom: 14px; }

/* ------------------------------------------------------ */
/* POPUP DOCUMENTS                                        */
/* ------------------------------------------------------ */

.popup-documents-content {
  max-width: 520px;
  padding: 32px 24px 28px;
  text-align: center;
}

@media (min-width: 600px) {
  .popup-documents-content { padding: 44px 40px 36px; }
}

.popup-doc-header { margin-bottom: 24px; }

.popup-doc-icon {
  width: 64px;
  height: 64px;
  background: #E6F4FA;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

.popup-doc-header h2 { font-size: clamp(20px, 5vw, 26px); font-weight: 700; color: #0A1A2F; margin-bottom: 10px; }

.popup-doc-subtitle { font-size: 13px; color: #4A5A6A; line-height: 1.6; margin: 0; }

.popup-doc-block { background: #F2F5F7; border-radius: 12px; padding: 18px; margin-bottom: 0; }

.popup-doc-block-alt { background: #F2F5F7; }

.popup-doc-block-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #8A97A1;
  margin-bottom: 10px;
}

.popup-doc-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #D0D7DF;
  border-radius: 10px;
  font-size: 15px;
  background: #FFFFFF;
  color: #0A1A2F;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 12px;
}

.popup-doc-input:focus {
  border-color: #1A7FA5;
  box-shadow: 0 0 0 3px rgba(26,127,165,0.12);
  outline: none;
}

.popup-doc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 13px 20px;
  background: #1A7FA5;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 14px rgba(26,127,165,0.20);
}

.popup-doc-btn:hover {
  background: #166A89;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(26,127,165,0.28);
}

.popup-doc-btn-outline {
  background: transparent;
  color: #1A7FA5;
  border: 2px solid #1A7FA5;
  box-shadow: none;
}

.popup-doc-btn-outline:hover { background: #1A7FA5; color: #ffffff; }

.popup-doc-error { color: #e74c3c; font-size: 13px; margin-top: 10px; display: none; }

.popup-doc-separator { display: flex; align-items: center; gap: 14px; margin: 18px 0; }

.popup-doc-sep-line { flex: 1; height: 1px; background: #D0D7DF; }

.popup-doc-sep-text {
  font-size: 12px;
  font-weight: 700;
  color: #8A97A1;
  letter-spacing: 1.5px;
  background: #fff;
  padding: 0 4px;
}

.popup-doc-btn-disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(30%);
  pointer-events: none;
}

/* ------------------------------------------------------ */
/* FORMULAIRE BON DE COMMANDE (form-page)                 */
/* ------------------------------------------------------ */

.form-page-body {
  background-color: #f4f6f8;
  padding: 12px 0 20px;
}

.form-container {
  max-width: 1000px;
  margin: 0 auto 40px auto;
  padding: 20px 16px;     /* compact mobile */
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(10,26,47,0.06);
  color: #0A1A2F;
  /* le margin-top est géré inline avec calc(13.5vh + 24px) sur desktop,
     mais on le corrige en mobile via media query */
}

@media (max-width: 767px) {
  /* Écrase le margin-top inline pour mobile */
  .form-container { margin-top: calc(64px + 16px) !important; padding: 16px 12px; }
}

@media (min-width: 768px) {
  .form-container { padding: 40px; }
}

/* Bandeau hero formulaire */
.form-hero-banner {
  background: linear-gradient(135deg, #0A1A2F 0%, #166a89 100%);
  border-radius: 8px 8px 0 0;
  margin: -16px -12px 24px -12px;   /* mobile */
  padding: 20px 16px 0;
  color: #ffffff;
}

@media (min-width: 768px) {
  .form-hero-banner {
    margin: -40px -40px 32px -40px;
    padding: 30px 40px 0;
    border-radius: 8px 8px 0 0;
  }
}

.form-hero-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 18px;
}

@media (max-width: 600px) {
  .form-hero-inner { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 768px) {
  .form-hero-inner { gap: 24px; padding-bottom: 22px; }
}

.form-hero-logo {
  background: #ffffff;
  border-radius: 10px;
  padding: 6px 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.form-hero-logo img { height: 44px; display: block; }

@media (min-width: 768px) {
  .form-hero-logo { padding: 8px 14px; }
  .form-hero-logo img { height: 56px; }
}

.form-hero-text { flex: 1; min-width: 0; }

.form-hero-title {
  font-size: clamp(16px, 4vw, 22px);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.form-hero-sub { font-size: 12px; color: #bae6fd; margin-bottom: 4px; }

.form-hero-tags { font-size: 11px; color: rgba(255,255,255,0.65); font-style: italic; }

.form-hero-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border-radius: 99px;
  white-space: nowrap;
  align-self: flex-start;
}

.form-hero-infos {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 10px 0;
  display: flex;
  flex-direction: column;   /* mobile : empilé */
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

@media (min-width: 600px) {
  .form-hero-infos { flex-direction: row; flex-wrap: wrap; gap: 20px; font-size: 12.5px; }
}

/* Grille 2 colonnes → 1 sur mobile */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 0;
}

@media (min-width: 680px) {
  .form-grid { grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
}

@media (min-width: 768px) {
  .form-grid { gap: 30px; margin-bottom: 25px; }
}

/* Sections */
.form-section {
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 18px 14px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .form-section { padding: 25px; margin-bottom: 25px; }
}

.mb-none { margin-bottom: 0; }

.form-section h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: #0A1A2F;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 6px;
  letter-spacing: 0.5px;
}

/* Groupes de champs (bon de commande — override contact form) */
.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #2D3748;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 5px;
  background: #ffffff;
  font-size: 14px;
  color: #0A1A2F;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;   /* iOS */
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #166a89;
  outline: none;
  box-shadow: 0 0 0 3px rgba(22,106,137,0.1);
}

/* Inline (radios) */
.form-group-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 10px;
  color: #2D3748;
  flex-wrap: wrap;
}

.form-group-inline label { margin-bottom: 0; font-weight: 600; cursor: pointer; }

/* Sélecteur espèce */
.species-selector {
  flex-wrap: wrap;
  gap: 10px;
  row-gap: 8px;
}

/* Checkbox group */
.checkbox-group { margin-top: 12px; }

.dynamic-field {
  display: none;
  background: #edf2f7;
  padding: 10px;
  border-radius: 4px;
  margin-top: -4px;
  margin-bottom: 12px;
  border-left: 3px solid #166a89;
}

.dynamic-field.visible { display: block; }

.material-notice {
  font-size: 12px;
  background: #ebf8ff;
  border: 1px solid #bee3f8;
  color: #2b6cb0;
  padding: 10px 12px;
  border-radius: 5px;
  margin-top: 12px;
  line-height: 1.4;
}

.material-notice a { color: #2b6cb0; font-weight: 700; text-decoration: underline; }

.sub-section-title { font-size: 13px; font-weight: 700; margin-top: 20px; margin-bottom: 10px; color: #0A1A2F; }

.transport-box { background: #fffaf0; border: 1px solid #feebc8; padding: 12px; border-radius: 5px; }

.premium-option label { display: flex; justify-content: space-between; width: 100%; }

.premium-option label span { font-weight: 700; color: #dd6b20; }

/* Arbre des analyses */
.analysis-category { margin-bottom: 22px; }

.analysis-category h4 {
  background: #0A1A2F;
  color: #ffffff;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  margin-bottom: 10px;
}

.cat-details { font-weight: 400; font-size: 11px; color: #cbd5e0; margin-left: 5px; }

.species-group-title {
  font-size: 13px;
  color: #166a89;
  margin: 16px 0 4px 6px;
  font-weight: 700;
  text-decoration: underline;
}

.group-subtitle { font-size: 11px; font-style: italic; color: #718096; margin: 0 0 8px 6px; }

.analysis-row {
  display: flex;
  align-items: flex-start;
  padding: 9px 10px;
  border-bottom: 1px solid #edf2f7;
  background: #ffffff;
  gap: 8px;
}

.analysis-row:hover { background: #f7fafc; }

.analysis-row input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: #166a89;
}

.analysis-row label {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 12px;
  color: #2d3748;
  cursor: pointer;
  line-height: 1.4;
  gap: 8px;
}

.analysis-row .price {
  font-weight: 700;
  color: #1A7FA5;
  margin-left: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.sub-level { padding-left: 28px; background: #fafbfc; border-left: 2px dashed #cbd5e0; }

/* Compteur quantité marqueurs */
.quantity-wrapper { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #4A5568; flex-wrap: wrap; }

.quantity-wrapper input[type="number"] {
  width: 48px;
  padding: 3px 5px;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  font-weight: bold;
  text-align: center;
  color: #0A1A2F;
  font-size: 12px;
}

.quantity-wrapper input[disabled] { background: #edf2f7; color: #a0aec0; cursor: not-allowed; }

.label-text-flex { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

/* Total live */
.total-price-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0A1A2F;
  color: #ffffff;
  padding: 16px 20px;
  border-radius: 6px;
  margin-top: 24px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(10,26,47,0.15);
  flex-wrap: wrap;
  gap: 8px;
}

#live-total-display {
  font-size: 20px;
  color: #1A7FA5;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Bouton soumettre */
.submit-form-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: #166a89;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  box-shadow: 0 2px 8px rgba(22,106,137,0.2);
  margin-top: 24px;
}

.submit-form-btn:hover { background: #1A7FA5; }

/* ------------------------------------------------------ */
/* VALIDATION TOAST (erreurs formulaire)                  */
/* ------------------------------------------------------ */

#validation-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  left: 16px;        /* plein largeur sur mobile */
  z-index: 9999;
  background: #fff;
  border-left: 4px solid #ef4444;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(10,26,47,0.15);
  padding: 14px 16px;
  max-width: 100%;
  animation: slideIn 0.3s ease;
}

@media (min-width: 480px) {
  #validation-toast { left: auto; max-width: 340px; }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.field-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15) !important;
}

.error-label { color: #ef4444; font-size: 11px; margin-top: 4px; display: block; font-weight: 500; }

.radio-error-block {
  border: 1px solid #ef4444 !important;
  background: #fff1f2 !important;
  border-radius: 8px;
  padding: 5px;
}

/* ------------------------------------------------------ */
/* BANDEAU RGPD                                           */
/* ------------------------------------------------------ */

#rgpd-banner {
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

#rgpd-banner > div {
  background: #0A1A2F;
  border-top: 3px solid #1A7FA5;
  padding: 20px 16px;
  box-shadow: 0 -8px 40px rgba(10,26,47,0.4);
}

@media (min-width: 768px) {
  #rgpd-banner > div { padding: 24px 32px; }
}

/* Boutons RGPD */
#rgpd-banner button { touch-action: manipulation; }

/* Toggle switch RGPD */
.rgpd-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.rgpd-toggle input { opacity: 0; width: 0; height: 0; }

.rgpd-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #475569;
  border-radius: 26px;
  transition: 0.3s;
}

.rgpd-slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.rgpd-toggle input:checked + .rgpd-slider { background-color: #1A7FA5; }

.rgpd-toggle input:checked + .rgpd-slider::before { transform: translateX(20px); }

/* ------------------------------------------------------ */
/* PAGE CONFIRMATION                                      */
/* ------------------------------------------------------ */

.confirmation-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #e9edf2 100%);
  padding: 20px;
}

.btn-primary, .btn-secondary { transition: all 0.3s ease; }