/* ===========================================================
  CEPROGEC — feuille de style complète
   =========================================================== */

:root {
  --color-primary: #134cc5e8;
  --color-primary-dark: #3e79e7;
  --color-dark: #14181f;
  --color-dark-2: #1f2530;
  --color-light: #f7f5f2;
  --color-white: #ffffff;
  --color-gray: #6b7280;
  --color-border: #e5e2dd;

  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(20, 24, 31, 0.08);
  --shadow-lg: 0 20px 50px rgba(20, 24, 31, 0.16);

  --container-width: 1200px;
  --header-height: 120px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --color-dark: #f1f4f8;
  --color-dark-2: #dbe3ec;
  --color-light: #202832;
  --color-white: #111820;
  --color-gray: #aeb9c6;
  --color-border: #384451;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] .header,
html[data-theme="dark"] .search-panel { background: rgba(17, 24, 32, 0.94); }
html[data-theme="dark"] .stats,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .gallery-hero { background: #080d13; }
html[data-theme="dark"] .footer-content p,
html[data-theme="dark"] .copyright,
html[data-theme="dark"] .stat-item span { color: rgba(241, 244, 248, 0.68); }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-dark);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-heading); margin: 0 0 0.5em; line-height: 1.2; }
p { margin: 0 0 1em; color: var(--color-gray); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section-label {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.section-label.light { color: #2253bb; }

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.section-heading { max-width: 640px; margin-bottom: 48px; }
.section-heading h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.heading-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--color-primary); color: var(--color-white); }
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: var(--shadow); }
.btn-secondary { background: var(--color-dark); color: var(--color-white); }
.btn-secondary:hover { background: var(--color-dark-2); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--color-white); border-color: rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-light { background: var(--color-white); color: var(--color-dark); }
.btn-light:hover { background: var(--color-light); box-shadow: var(--shadow); }
.full-width { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

/* ---------- Style du Logo (Agrandit et parfaitement lisible) ---------- */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 6px 0;
}
.logo-img {
  height: 100px;
  width: auto;
  object-fit: contain;
}
.footer-logo .logo-img {
  height: 70px;
}

.nav-actions { display: flex; align-items: center; gap: 8px; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-dark);
  position: relative;
  padding: 4px 0;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--color-primary);
  transition: width 0.2s ease;
}
.nav a:hover::after { width: 100%; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--color-dark);
  cursor: pointer;
  line-height: 1;
}

/* ---------- Recherche ---------- */
.search-toggle {
  background: none;
  border: none;
  color: var(--color-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}
.search-toggle:hover { background: var(--color-light); color: var(--color-primary); }

.search-panel {
  border-top: 1px solid var(--color-border);
  background: var(--color-white);
  box-shadow: var(--shadow);
}
.search-panel[hidden] { display: none; }
.search-panel-inner { padding: 16px 24px 20px; }

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.search-input-wrap svg { flex-shrink: 0; color: var(--color-gray); }
.search-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}
.search-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--color-gray);
  padding: 2px 6px;
}
.search-close:hover { color: var(--color-primary); }

.search-results {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  max-height: 360px;
  overflow-y: auto;
}
.search-results:empty { margin: 0; }
.search-result-item { border-bottom: 1px solid var(--color-border); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 12px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.search-result-item button:hover,
.search-result-item button:focus-visible { background: var(--color-light); }
.search-result-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}
.search-result-title { font-weight: 600; font-size: 0.95rem; color: var(--color-dark); }
.search-result-snippet {
  font-size: 0.85rem;
  color: var(--color-gray);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-no-results { padding: 14px 4px; color: var(--color-gray); font-size: 0.9rem; }

.search-highlight {
  animation: search-highlight-flash 1.6s ease;
}
@keyframes search-highlight-flash {
  0%   { box-shadow: 0 0 0 4px rgba(51, 153, 236, 0.5); }
  100% { box-shadow: 0 0 0 4px rgba(232, 99, 31, 0); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: url('imagec/Image12.jpg') center/cover no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,24,31,0.75) 0%, rgba(20,24,31,0.55) 60%, rgba(20,24,31,0.85) 100%);
}
.hero-content { position: relative; z-index: 1; max-width: 720px; color: var(--color-white); }
.hero-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--color-primary);
  color: #2253bb;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--color-white); }
.hero h1 span { color: var(--color-primary); }
.hero p { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 560px; }
.hero-buttons { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

/* ---------- Stats ---------- */
.stats { background: var(--color-dark); padding: 48px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-item { display: flex; flex-direction: column; gap: 6px; }
.stat-item strong { font-family: var(--font-heading); font-size: 2.2rem; color: var(--color-primary); }
.stat-item span { color: rgba(255,255,255,0.75); font-size: 0.9rem; }

/* ---------- Barre de confiance ---------- */
.trust-bar { background: var(--color-light); border-bottom: 1px solid var(--color-border); padding: 28px 0; }
.trust-bar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-dark);
}
.trust-icon { font-size: 1.2rem; }

/* ---------- À propos ---------- */
.about-image { position: relative; }
.about-image img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.experience-badge {
  position: absolute;
  bottom: -24px;
  right: -24px;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 20px 24px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.experience-badge strong { display: block; font-size: 1.6rem; font-family: var(--font-heading); }
.experience-badge span { color: rgba(255,255,255,0.9); font-size: 0.8rem; }

.about-content h2 { font-size: clamp(1.8rem, 3vw, 2.2rem); }
.check-list { margin: 24px 0; display: flex; flex-direction: column; gap: 12px; }
.check-list li {
  position: relative;
  padding-left: 32px;
  color: var(--color-dark);
  font-weight: 600;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0;
  width: 22px; height: 22px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Services ---------- */
.services-section { background: var(--color-light); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-icon { font-size: 2rem; margin-bottom: 16px; }
.service-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.service-card p { font-size: 0.92rem; margin-bottom: 16px; }
.service-card a { color: var(--color-primary); font-weight: 700; font-size: 0.9rem; }

/* ---------- Réalisations ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}
.project-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-card:hover img { transform: scale(1.08); }
.project-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px 20px;
  background: linear-gradient(0deg, rgba(20,24,31,0.9) 0%, rgba(20,24,31,0) 100%);
  color: var(--color-white);
}
.project-info span { font-size: 0.8rem; color: #2253bb; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.project-info h3 { font-size: 1.1rem; margin: 6px 0 0; color: var(--color-white); }

/* ---------- Filtres de réalisations ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.filter-btn {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  color: var(--color-dark);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.filter-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.filter-btn.is-active { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-white); }
.filter-empty { text-align: center; color: var(--color-gray); padding: 24px 0; }
.project-card.is-hidden { display: none; }

.gallery-cta { text-align: center; margin-top: 40px; }
.btn-outline-dark { background: transparent; color: var(--color-dark); border-color: var(--color-dark); }
.btn-outline-dark:hover { background: var(--color-dark); color: var(--color-white); }

/* ---------- Avis clients ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--color-light);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.testimonial-stars { color: var(--color-primary); letter-spacing: 2px; margin-bottom: 12px; }
.testimonial-card p { color: var(--color-dark); font-style: italic; margin-bottom: 20px; }
.testimonial-author strong { display: block; font-family: var(--font-heading); font-size: 0.95rem; }
.testimonial-author span { font-size: 0.82rem; color: var(--color-gray); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.faq-item {
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 28px 16px 0;
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 14px;
  font-size: 1.3rem;
  color: var(--color-primary);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding-bottom: 18px; margin: 0; }

/* ---------- Carte Google Maps ---------- */
.map-embed {
  margin-top: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* ---------- CTA ---------- */
.cta { background: var(--color-dark); padding: 72px 0; }
.cta-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-content h2 { color: var(--color-white); font-size: clamp(1.6rem, 3vw, 2.1rem); }
.cta-content p { color: rgba(255,255,255,0.75); margin: 0; }

/* ---------- Contact ---------- */
.contact-details { display: flex; flex-direction: column; gap: 20px; margin-top: 32px; }
.contact-details > div { display: flex; flex-direction: column; gap: 4px; }
.contact-details strong { font-family: var(--font-heading); font-size: 0.95rem; }
.contact-details span, .contact-details a { color: var(--color-gray); }
.contact-details a:hover { color: var(--color-primary); }

.contact-form {
  background: var(--color-light);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.form-group input, .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--color-white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(232, 99, 31, 0.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-message {
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.2em;
}
.form-message.success { color: #1a8f4c; }
.form-message.error { color: #c0392b; }

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */
.footer { background: var(--color-dark); padding: 56px 0 0; color: rgba(255,255,255,0.75); }
.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-logo { font-size: 1.2rem; margin-bottom: 12px; display: inline-block; }
.footer-content p { color: rgba(255,255,255,0.6); max-width: 280px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a:hover { color: var(--color-primary); }
.socials { display: flex; flex-direction: column; gap: 10px; }
.socials a:hover { color: var(--color-primary); }
.copyright {
  text-align: center;
  padding: 20px 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ---------- Bouton flottant WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  background: #25d366;
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: whatsapp-pulse 2.4s ease-out infinite;
}
.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}
.whatsapp-float svg { flex-shrink: 0; }

/* ---------- Bande flottante du thème ---------- */
.theme-float {
  position: fixed;
  left: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-dark);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}
.theme-float:hover,
.theme-float:focus-visible { transform: translateY(-2px); }
.theme-float-icon { font-size: 1rem; line-height: 1; }

@keyframes whatsapp-pulse {
  0%   { box-shadow: 0 8px 24px rgba(0,0,0,0.25), 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70%  { box-shadow: 0 8px 24px rgba(0,0,0,0.25), 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 8px 24px rgba(0,0,0,0.25), 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-float { animation: none; }
}

@media (max-width: 480px) {
  .whatsapp-float { right: 16px; bottom: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 52px; height: 52px; }
  .theme-float { left: 16px; bottom: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); min-height: 42px; padding: 0 12px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .two-columns { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .about-image { margin-bottom: 40px; }
}

@media (max-width: 768px) {
  :root {
    --header-height: 95px;
  }
  .section { padding: 64px 0; }
  .menu-toggle { display: block; }

  .logo-img {
    height: 70px;
  }

  .nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }
  .nav a { width: 100%; padding: 10px 0; }
  .nav.is-open { max-height: 400px; padding: 16px 24px 24px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .heading-flex { align-items: flex-start; }
  .cta-content { flex-direction: column; align-items: flex-start; }
  .experience-badge { right: 12px; bottom: -20px; padding: 14px 18px; }
  .contact-form { padding: 28px; }

  .search-toggle { order: 3; }
  .btn { max-width: 100%; white-space: normal; text-align: center; }
  .search-panel-inner { padding: 10px 16px 14px; }
  .search-input-wrap { gap: 8px; padding: 9px 10px; }
  .search-input-wrap input {
    min-width: 0;
    font-size: 0.85rem;
    text-overflow: ellipsis;
  }
  .search-input-wrap input::placeholder { text-overflow: ellipsis; }
  .search-close { flex: 0 0 auto; }
  .trust-bar-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .filter-bar { gap: 8px; }
  .filter-btn { font-size: 0.8rem; padding: 8px 14px; }
}