/* =============================================
   BPL Pesage — Feuille de styles principale
   ============================================= */

/* === VARIABLES === */
:root {
  --yellow:      #F5C200;
  --yellow-dark: #D4A800;
  --gray:        #C0C0C0;
  --dark:        #1C1C1C;
  --white:       #FFFFFF;
  --light-bg:    #F7F7F7;
  --footer-bg:   #1A1A1A;
  --border:      #E5E5E5;
  --muted:       #666666;
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.07);
  --shadow-md:   0 4px 24px rgba(0,0,0,0.12);
  --font:        'Barlow', Arial, sans-serif;
  --radius:      4px;
  --ease:        0.25s ease;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
address { font-style: normal; }

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
section { padding: 5rem 0; }
.bg-light { background: var(--light-bg); }

/* === TYPOGRAPHIE === */
.section-tag {
  display: inline-block;
  color: var(--yellow);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--dark);
}
.section-title span { color: var(--yellow); }
.section-title.center { text-align: center; }
.section-intro {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin-bottom: 3rem;
  line-height: 1.7;
}
.section-intro.center { text-align: center; margin-left: auto; margin-right: auto; }

/* === BOUTONS === */
.btn-primary {
  display: inline-block;
  background: var(--yellow);
  color: var(--dark);
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: background var(--ease);
}
.btn-primary:hover { background: var(--yellow-dark); }

.btn-secondary {
  display: inline-block;
  border: 2px solid rgba(255,255,255,0.7);
  color: var(--white);
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  transition: background var(--ease), border-color var(--ease);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}

/* === HEADER === */
#header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease);
}
#header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo svg { height: 58px; width: auto; }

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--dark);
  position: relative;
  padding-bottom: 3px;
  transition: color var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--yellow);
  transition: width var(--ease);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links .btn-nav {
  background: var(--yellow);
  color: var(--dark);
  padding: 0.55rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
}
.nav-links .btn-nav::after { display: none; }
.nav-links .btn-nav:hover { background: var(--yellow-dark); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 10;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === HERO === */
#hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: var(--dark);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/Indicateur-plateforme.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.22;
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
#hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.5rem;
  max-width: 720px;
}
#hero h1 span { color: var(--yellow); }
#hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* === À PROPOS === */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-text p {
  color: var(--muted);
  margin-bottom: 1.1rem;
  font-size: 1.05rem;
}
.about-text p strong { color: var(--dark); }
.about-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  height: 420px;
  object-fit: cover;
}
.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2rem;
}
.badge {
  background: var(--light-bg);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
}
.badge-yellow {
  background: var(--yellow);
  border-color: var(--yellow);
}

/* === VALEURS === */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 3rem;
}
.value-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--yellow);
}
.value-icon {
  width: 56px;
  height: 56px;
  background: var(--yellow);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.value-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--dark);
  flex-shrink: 0;
}
.value-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.value-card p { color: var(--muted); font-size: 0.95rem; }

/* === SERVICES === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-top: 2.5rem;
}
.service-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.service-item:hover {
  border-color: var(--yellow);
  box-shadow: var(--shadow-sm);
}
.service-bullet {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--yellow);
  flex-shrink: 0;
}
.service-item span { font-weight: 500; font-size: 0.95rem; }

/* === SECTEURS === */
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.sector-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease);
}
.sector-card:hover { box-shadow: var(--shadow-md); }
.sector-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--yellow);
}
.sector-card li {
  font-size: 0.875rem;
  color: var(--muted);
  padding: 0.25rem 0 0.25rem 1rem;
  position: relative;
}
.sector-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--yellow);
  font-weight: 700;
}

/* === SOLUTIONS === */
.solutions-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 3rem;
}
.tab-btn {
  padding: 1rem 2rem;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  transition: color var(--ease);
}
.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--yellow);
  transition: width var(--ease);
}
.tab-btn.active { color: var(--dark); }
.tab-btn.active::after { width: 100%; }
.tab-btn:hover { color: var(--dark); }

.tab-panel { display: none; }
.tab-panel.active { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }

.solution-list { display: flex; flex-direction: column; gap: 1.75rem; }
.solution-item-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--yellow);
  color: var(--dark);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-right: 0.75rem;
}
.solution-item-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}
.solution-item h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
}
.solution-item h4 .tag-legal {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 0.5rem;
  font-style: italic;
}
.solution-item ul { padding-left: 0.5rem; }
.solution-item li {
  font-size: 0.875rem;
  color: var(--muted);
  padding: 0.2rem 0 0.2rem 1.1rem;
  position: relative;
}
.solution-item li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--gray);
}
.solution-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.solution-photos img {
  border-radius: var(--radius);
  object-fit: cover;
  width: 100%;
  height: 170px;
}
.solution-photos img.span-full {
  grid-column: 1 / -1;
  height: 230px;
}

/* === QUALITÉ & CERTIFICATIONS === */
.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin: 2rem 0 3.5rem;
}
.metro-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  min-width: 680px;
}
.metro-table thead th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.9rem;
}
.metro-table thead th:first-child {
  background: var(--dark);
  color: var(--white);
  width: 160px;
}
.metro-table thead th:not(:first-child) {
  background: var(--yellow);
  color: var(--dark);
}
.metro-table tbody tr:nth-child(even) { background: var(--light-bg); }
.metro-table tbody td {
  padding: 0.85rem 1.25rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
}
.metro-table tbody td:first-child { font-weight: 700; font-size: 0.85rem; }

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin: 2rem 0 3.5rem;
}
.cert-item {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  border-left: 4px solid var(--yellow);
  box-shadow: var(--shadow-sm);
}
.cert-item strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.cert-item span { font-size: 0.85rem; color: var(--muted); }

/* Process */
.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 2rem 0 3.5rem;
}
.step {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--dark);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.85rem;
}
.step h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.5rem; }
.step p { font-size: 0.78rem; color: var(--muted); line-height: 1.5; }

/* Mention légale obligatoire */
.legal-notice {
  background: #FFFBE6;
  border: 1px solid #F5C200;
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  margin-top: 1rem;
}
.legal-notice h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #8a6800;
  margin-bottom: 1rem;
}
.legal-notice p {
  font-size: 0.875rem;
  color: #444;
  line-height: 1.8;
  margin-bottom: 0.85rem;
}
.legal-notice p:last-child { margin-bottom: 0; }
.legal-notice a { color: #8a6800; text-decoration: underline; }

/* === PAGE CONTACT === */
.contact-hero {
  background: var(--dark);
  padding: 3.5rem 0;
  color: var(--white);
}
.contact-hero h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.contact-hero h1 span { color: var(--yellow); }
.contact-hero p { color: rgba(255,255,255,0.7); font-size: 1.05rem; }

.contact-section { padding: 5rem 0; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 4rem;
  align-items: start;
}
.contact-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
}
.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.contact-icon {
  width: 42px;
  height: 42px;
  background: var(--yellow);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.contact-detail-text strong {
  display: block;
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.contact-detail-text p,
.contact-detail-text a {
  font-size: 1rem;
  color: var(--dark);
  line-height: 1.6;
}
.phone-placeholder { color: var(--muted); font-size: 0.85rem; }

.map-wrapper {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.map-wrapper iframe {
  width: 100%;
  height: 300px;
  border: 0;
  display: block;
}

/* Formulaire */
.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}
.contact-form h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--dark);
}
.form-group .req { color: #c0392b; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--dark);
  background: var(--white);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245,194,0,0.18);
}
.form-group textarea {
  resize: vertical;
  min-height: 140px;
}
.hp-field { display: none !important; }
.form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}
.btn-submit {
  background: var(--yellow);
  color: var(--dark);
  padding: 0.9rem 2.5rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--ease);
}
.btn-submit:hover { background: var(--yellow-dark); }

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}
.alert-success {
  background: #e8f5e9;
  border: 1px solid #81c784;
  color: #2e7d32;
}
.alert-error {
  background: #ffebee;
  border: 1px solid #e57373;
  color: #c62828;
}

/* === FOOTER === */
footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,0.8);
  padding: 4.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}
.footer-logo { height: 52px; width: auto; margin-bottom: 1.1rem; }
.footer-brand p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  max-width: 220px;
  line-height: 1.65;
}
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 1.25rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--ease);
}
.footer-col a:hover { color: var(--yellow); }
.footer-col address { line-height: 1.8; font-size: 0.875rem; color: rgba(255,255,255,0.55); }
.footer-phone {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
}
.footer-phone a {
  color: rgba(255,255,255,0.55);
  transition: color var(--ease);
}
.footer-phone a:hover { color: var(--yellow); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-bottom p { font-size: 0.78rem; color: rgba(255,255,255,0.35); }
.footer-bottom a {
  color: rgba(255,255,255,0.35);
  font-size: 0.78rem;
  transition: color var(--ease);
}
.footer-bottom a:hover { color: var(--yellow); }
.footer-bottom nav { display: flex; gap: 1.5rem; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-image img { height: 320px; }
  .tab-panel.active { grid-template-columns: 1fr; }
  .solution-photos { grid-template-columns: repeat(3, 1fr); }
  .solution-photos img { height: 140px; }
  .solution-photos img.span-full { grid-column: auto; height: 140px; }
  .process-steps { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  section { padding: 3.5rem 0; }

  /* Nav mobile */
  .nav-toggle { display: flex; }
  #header nav { position: relative; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1.5rem;
    gap: 1.25rem;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links .btn-nav { width: 100%; text-align: center; }

  #hero { min-height: 70vh; }
  .values-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .sectors-grid { grid-template-columns: 1fr 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .solutions-tabs { flex-direction: column; border-bottom: none; gap: 0.5rem; }
  .tab-btn { border: 1px solid var(--border); border-radius: var(--radius); text-align: left; }
  .tab-btn.active { background: var(--yellow); color: var(--dark); }
  .tab-btn::after { display: none; }
}

@media (max-width: 480px) {
  .sectors-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .solution-photos { grid-template-columns: 1fr 1fr; }
  .hero-cta { flex-direction: column; }
  .contact-form { padding: 1.75rem 1.25rem; }
}
