/* ============================================================
   CEExpert — Site Vitrine
   Styles principaux — Mobile-first, responsive
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

@media (min-width: 768px) {
  html { font-size: 15px; }
}

@media (min-width: 1024px) {
  html { font-size: 16px; }
}

body {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #111827;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: #00b4d5;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #003D7A;
}

ul {
  list-style: none;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.5;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.25s ease;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #00b4d5 0%, #0096a8 100%);
  color: #ffffff;
  border: none;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 180, 213, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0096a8 0%, #007a8a 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 180, 213, 0.35);
}

.btn-outline {
  background: transparent;
  color: #00b4d5;
  border-color: #00b4d5;
}

.btn-outline:hover {
  background: #ffffff;
  color: #00b4d5;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 180, 213, 0.35);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.navbar-menu a.btn-nav {
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
}

.navbar-menu a.btn-nav.btn-primary,
.navbar-menu a.btn-nav.btn-primary:hover {
  color: #ffffff;
}

.navbar-menu a.btn-icon-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #00b4d5;
  font-size: 1.8rem;
  line-height: 1;
  padding: 0.2rem 0;
  transition: color 0.25s ease;
}

.navbar-menu a.btn-icon-nav:hover {
  color: #0096a8;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #e5e7eb;
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}

.navbar-brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: #111827;
}

.navbar-brand:hover {
  color: #111827;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, #00b4d5 0%, #0096a8 100%);
  color: #ffffff;
  border-radius: 6px;
  font-size: 0.875rem;
}

.brand-text {
  letter-spacing: -0.02em;
}

.brand-ce {
  color: #7ac043;
}

.brand-expert {
  color: #00b4d5;
}

.brand-tagline {
  font-size: 0.875rem;
  color: #6b7280;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid #9ca3af;
  font-weight: 600;
  position: relative;
  top: -1px;
}

/* Hamburger */
.navbar-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.navbar-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #111827;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Menu mobile */
.navbar-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.navbar-menu.open {
  display: block;
}

.navbar-menu li {
  margin-bottom: 0.5rem;
}

.navbar-menu li:nth-last-child(-n+2) {
  margin-bottom: 0;
  margin-top: 0.75rem;
}

.navbar-menu a {
  display: block;
  padding: 0.5rem 0;
  color: #111827;
  font-weight: 500;
  font-size: 0.9375rem;
}

.navbar-menu a:hover {
  color: #00b4d5;
}

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

  .navbar-menu {
    display: flex;
    position: static;
    align-items: center;
    gap: 1.75rem;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  .navbar-menu li {
    margin: 0;
  }

  .navbar-menu li:nth-last-child(-n+2) {
    margin-top: 0;
    margin-left: 0.5rem;
  }

  .navbar-menu a {
    display: inline-flex;
    padding: 0;
    font-size: 0.875rem;
  }
}

/* --- Sections --- */
.section {
  padding: 4rem 0;
}

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

@media (min-width: 1024px) {
  .section { padding: 6rem 0; }
}

.section-alt {
  background: #f9fafb;
}

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

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .section-title { font-size: 2rem; }
}

@media (min-width: 1024px) {
  .section-title { font-size: 2.25rem; }
}

.section-subtitle {
  font-size: 1.0625rem;
  color: #6b7280;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Hero --- */
.hero {
  padding: 7rem 0 4rem;
  background: linear-gradient(180deg, #f0fbfd 0%, #ffffff 100%);
}

@media (min-width: 768px) {
  .hero { padding: 8rem 0 5rem; }
}

@media (min-width: 1024px) {
  .hero {
    padding: 9rem 0 5rem;
  }

  .hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: end;
  }
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .hero-title { font-size: 2.5rem; }
}

@media (min-width: 1024px) {
  .hero-title { font-size: 2.75rem; }
}

.hero-subtitle {
  font-size: 1.0625rem;
  color: #6b7280;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  display: none;
}

@media (min-width: 1024px) {
  .hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

.hero-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 180, 213, 0.2);
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-4 {
  grid-template-columns: 1fr;
}

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

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid { gap: 2rem; }
}

/* --- Cards --- */
.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.75rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: #f0fbfd;
  color: #00b4d5;
  border-radius: 8px;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.625rem;
}

.card-text {
  font-size: 0.9375rem;
  color: #6b7280;
  line-height: 1.6;
}

/* Card cible variant */
.card-cible {
  text-align: center;
}

.card-cible .card-icon {
  margin: 0 auto 1rem;
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.375rem;
}

/* Card value variant */
.card-value {
  text-align: center;
}

.card-value .card-icon {
  margin: 0 auto 1rem;
}

/* --- Carousel --- */
.carousel {
  position: relative;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: 8px;
}

.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  width: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  box-sizing: border-box;
}

/* Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.carousel-arrow:hover {
  background: #00b4d5;
  color: #ffffff;
  border-color: #00b4d5;
}

.carousel-arrow:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.carousel-prev {
  left: -0.75rem;
}

.carousel-next {
  right: -0.75rem;
}

@media (min-width: 768px) {
  .carousel-prev { left: -1.25rem; }
  .carousel-next { right: -1.25rem; }
}

@media (min-width: 1024px) {
  .carousel-prev { left: -1.75rem; }
  .carousel-next { right: -1.75rem; }
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 1.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s ease;
}

.carousel-dot:hover {
  border-color: #00b4d5;
}

.carousel-dot.active {
  background: #00b4d5;
  border-color: #00b4d5;
  transform: scale(1.2);
}

/* --- Module Cards (vertical product cards) --- */
.module-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: #d1d5db;
}

.module-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: center;
  padding: 0.3rem 0.875rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: none;
  background: rgba(0, 180, 213, 0.1);
  color: #00b4d5;
  margin-bottom: 1.25rem;
}

.module-badge i {
  font-size: 0.8125rem;
}

.module-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.875rem;
  line-height: 1.3;
}

.module-desc {
  font-size: 0.9375rem;
  color: #6b7280;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.module-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
  margin-top: auto;
}

.module-features li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #111827;
  line-height: 1.5;
}

.module-features li i {
  color: #7ac043;
  font-size: 0.6875rem;
  flex-shrink: 0;
}

/* --- Screenshots / Illustrations --- */
.screenshot-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.screenshot-frame {
  background: #1e293b;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.screenshot-topbar {
  display: flex;
  gap: 6px;
  padding: 0.625rem 0.875rem;
  background: #334155;
}

.screenshot-topbar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4b5563;
}

.screenshot-topbar .dot:first-child { background: #ef4444; }
.screenshot-topbar .dot:nth-child(2) { background: #f59e0b; }
.screenshot-topbar .dot:nth-child(3) { background: #22c55e; }

.screenshot-body {
  aspect-ratio: 1024 / 554;
  background: #e5e7eb;
  position: relative;
  overflow: hidden;
}

.screenshot-body img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Placeholder when image not loaded */
.screenshot-body img[src=""],
.screenshot-body img:not([src]) {
  display: none;
}

.screenshot-body img.error {
  display: none;
}

/* Placeholder text when image fails to load */
.screenshot-body[data-placeholder]::after {
  content: attr(data-placeholder);
  position: absolute;
  font-size: 0.875rem;
  color: #9ca3af;
  font-style: italic;
}

.screenshot-caption {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
  font-style: italic;
}

/* --- Contact Form --- */
.contact-wrapper {
  max-width: 640px;
  margin: 0 auto;
}

.contact-form {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 2rem;
}

@media (min-width: 768px) {
  .contact-form { padding: 2.5rem; }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.375rem;
}

.form-group .required {
  color: #dc2626;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.625rem 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #111827;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #00b4d5;
  box-shadow: 0 0 0 3px rgba(0, 180, 213, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9ca3af;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

@media (min-width: 768px) {
  .btn-submit { width: auto; }
}

/* Form success/error states */
.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
}

.form-success.visible {
  display: block;
}

/* --- Footer --- */
.footer {
  background: #111827;
  color: #d1d5db;
  padding: 3rem 0 1.5rem;
}

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

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.footer-logo .brand-text {
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 700;
}

.footer-tagline {
  font-size: 0.875rem;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.footer-editor {
  font-size: 0.875rem;
  color: #9ca3af;
}

.footer-editor strong {
  color: #d1d5db;
}

.footer-links h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #9ca3af;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #00b4d5;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: #6b7280;
}

/* --- Scroll reveal animation --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger for grid children */
.grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.grid .reveal:nth-child(4) { transition-delay: 0.3s; }

/* --- Utilities --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Print --- */
@media print {
  .navbar, .hero-cta, .btn-nav, .contact-form { display: none; }
  .hero { padding-top: 2rem; }
  .section { padding: 2rem 0; }
  .reveal { opacity: 1; transform: none; }
}