/* ==================================
RESET & VARIABLES SÉMANTIQUES
================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Couleurs de marque */
  --primary-color: #27ae60;     /* Green */
  --secondary-color: #0f388a;   /* Dark Blue */

  /* Arrière-plans */
  --body-bg: #ffffff;
  --card-bg: #ecf0f1;

  /* Texte */
  --text-primary: #1a1a1a;
  --text-secondary: #4b5563;
  --text-tertiary: #7f8c8d;

  /* Éléments UI */
  --white: #ffffff;
  --light-gray: #f9f9f9;
  --border-color: #ddd;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition: all 0.3s ease;
}

/* Dark mode : variables sémantiques cohérentes */
body.dark-mode {
  --body-bg: #0f172a;       /* slate-900 */
  --card-bg: #1e293b;       /* slate-800 */
  --text-primary: #f1f5f9;  /* slate-100 */
  --text-secondary: #cbd5e1; /* slate-300 */
  --text-tertiary: #94a3b8; /* slate-400 */
  --border-color: #334155;
  --light-gray: #1e293b;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--body-bg);
  overflow-x: hidden;
}

/* ==================================
TYPOGRAPHIE & UTILITAIRES
================================== */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  line-height: 1.2;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

ul {
  list-style: none;
}

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

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.section-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
  color: var(--text-secondary);
}

/* ==================================
BOUTONS & TITRES
================================== */
.btn,
.btn-small {
  display: inline-block;
  text-align: center;
  font-weight: 600;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
}

.btn {
  padding: 12px 30px;
  background-color: var(--secondary-color);
  color: var(--white);
  font-size: 1rem;
}

.btn:hover {
  background-color: #001a4d;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--shadow-light);
  color: var(--white);
}

.btn-small {
  padding: 8px 20px;
  font-size: 0.9rem;
  background-color: var(--card-bg);
  color: var(--text-primary);
}

.btn-small:hover {
  background-color: #d5dbdb;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  color: var(--primary-color);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--secondary-color);
}

/* ==================================
HEADER
================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--body-bg);
  box-shadow: 0 2px 10px var(--shadow-light);
  z-index: 1000;
  transition: var(--transition);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo h1 {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin: 0;
}

.logo-icon {
  font-size: 2rem;
  color: var(--primary-color);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  color: var(--text-primary);
  font-weight: 600;
  position: relative;
  padding: 5px 0;
}

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

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

.nav-link.active {
  color: var(--secondary-color);
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-primary);
  transition: var(--transition);
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  transition: var(--transition);
}

.theme-toggle:hover {
  background-color: var(--card-bg);
}

/* Mobile */
@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .theme-toggle {
    margin-top: 15px;
    order: 4;
  }

  .hamburger {
    display: block;
  }

  .nav-list {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    flex-direction: column;
    background-color: var(--body-bg);
    text-align: center;
    padding: 20px 0;
    box-shadow: 0 10px 20px var(--shadow-medium);
    transition: left 0.3s ease;
    gap: 0;
  }

  .nav-list--open {
    left: 0 !important;
  }

  .nav-list li {
    margin: 15px 0;
  }
}

/* ==================================
HERO
================================== */
.hero {
  padding: 150px 0 100px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

.hero-content h2 {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-image img {
  border-radius: 10px;
  box-shadow: 0 20px 40px var(--shadow-medium);
  width: 100%;
  max-width: 500px;
}

/* Dark mode hero */
body.dark-mode .hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* ==================================
SERVICES
================================== */
.services {
  padding: 100px 0;
  background-color: var(--body-bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.service-card {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 5px 15px var(--shadow-light);
  color: var(--text-primary);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px var(--shadow-medium);
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.service-card p {
  color: var(--text-secondary);
}

/* Icônes SVG — garder la couleur de marque */
.service-card svg {
  color: var(--secondary-color);
  margin-bottom: 20px;
}

/* ==================================
ABOUT
================================== */
.about {
  padding: 100px 0;
  background-color: var(--light-gray);
}

.about .container {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-content p,
.about-content .stats {
  color: var(--text-secondary);
}

.stats {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.stat-item {
  text-align: center;
  flex: 1;
  min-width: 120px;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.stat-label {
  font-size: 1rem;
  color: var(--text-tertiary);
}

/* ==================================
FORUM (NOUVELLE SECTION)
================================== */
.forum {
  padding: 100px 0;
  background-color: var(--body-bg);
}

.forum-topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.topic-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px var(--shadow-light);
  color: var(--text-primary);
}

.topic-card h3 {
  color: var(--primary-color);
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.topic-card p {
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.forum-cta {
  text-align: center;
  padding: 30px;
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 5px 15px var(--shadow-light);
}

.forum-cta p {
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==================================
PRODUCTS (NOUVELLE SECTION)
================================== */
.products {
  padding: 100px 0;
  background-color: var(--light-gray);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
}

.product-card {
  background: var(--body-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 20px var(--shadow-medium);
  position: relative;
  color: var(--text-primary);
}

.product-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--secondary-color);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.product-card h3 {
  color: var(--primary-color);
  margin: 20px 0 15px;
}

.product-features {
  margin: 15px 0;
  padding-left: 20px;
}

.product-features li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.products-note {
  text-align: center;
  margin-top: 40px;
  font-style: italic;
  color: var(--text-tertiary);
}

/* ==================================
PROJECTS
================================== */
.projects {
  padding: 100px 0;
  background-color: var(--body-bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.project-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px var(--shadow-light);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px var(--shadow-medium);
}

.project-card img {
  width: 100%;
  height: 200px !important;
  object-fit: scale-down;
}

.project-info {
  padding: 20px;
  background-color: var(--body-bg);
  color: var(--text-primary);
}

.project-info h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.project-info p {
  color: var(--text-secondary);
  margin-bottom: 15px;
}

/* ==================================
CONTACT
================================== */
.contact {
  padding: 100px 0;
  background-color: var(--light-gray);
}

.contact-container {
  display: flex;
  gap: 50px;
  margin-top: 50px;
}

.contact-info {
  flex: 1;
  padding: 30px;
  background-color: var(--body-bg);
  border-radius: 10px;
  box-shadow: 0 5px 15px var(--shadow-light);
}

.contact-info h3 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.contact-method {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.contact-method svg {
  color: var(--secondary-color);
  margin-right: 15px;
  min-width: 24px;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--card-bg);
  border-radius: 50%;
  color: var(--secondary-color);
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

.contact-email-cta {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 30px;
  background-color: var(--body-bg);
  border-radius: 10px;
  box-shadow: 0 5px 15px var(--shadow-light);
}

.contact-email-cta p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

/* Mobile contact */
@media (max-width: 992px) {
  .contact-container {
    flex-direction: column;
  }
}

/* ==================================
FOOTER
================================== */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 70px 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.footer-section h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  color: var(--white);
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--secondary-color);
}

.footer-section p,
.footer-section ul li a {
  color: #bdc3c7;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a:hover {
  color: var(--white);
  padding-left: 5px;
}

.subscribe-form {
  display: flex;
  margin-top: 20px;
}

.subscribe-form input {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 5px 0 0 5px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.subscribe-form button {
  padding: 0 15px;
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #bdc3c7;
  font-size: 0.9rem;
}

/* ==================================
RESPONSIVE
================================== */
@media (max-width: 992px) {
  .hero .container,
  .about .container {
    flex-direction: column;
  }

  .hero-content,
  .about-content {
    width: 100%;
    margin-bottom: 50px;
    text-align: center;
  }

  .about-image {
    order: -1;
    margin-bottom: 50px;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 120px 0 80px;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .logo h1 {
    font-size: 1.5rem;
  }
}