/* =========================================
   VARIABLES & RESET
========================================= */
:root {
  --primary-color: #0071bc; /* Bleu foncé */
  --secondary-color: #5cbeff; /* Bleu clair */
  --text-main: #2d2d2d;
  --text-muted: #6b6b6b;
  --bg-main: #ffffff;
  --bg-alt: #f8f9fa;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

/* =========================================
   CLASSES UTILITAIRES
========================================= */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-color);
}

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

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
  color: var(--primary-color);
}
p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

/* =========================================
   COMPOSANTS & BOUTONS
========================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: #005a96;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.section-padding {
  padding: 80px 0;
}

.bg-alt {
  background-color: var(--bg-alt);
}

hr.divider {
  border: 0;
  border-top: 1px solid #e5e5e5;
  margin: 30px 0;
}

/* =========================================
   HEADER & NAVIGATION (FLOTTANTE & CENTRÉE)
========================================= */
header {
  position: sticky;
  top: 15px;
  z-index: 1000;
  padding: 0 20px;
  width: 100%;
}

.nav-container {
  max-width: 1050px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 113, 188, 0.15);
  border-radius: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.06),
    0 2px 8px rgba(0, 113, 188, 0.05);
  transition: var(--transition);
}

.nav-container:hover {
  box-shadow:
    0 14px 35px rgba(0, 113, 188, 0.12),
    0 2px 10px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 113, 188, 0.3);
}

/* LOGO & ANIMATION */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-icon {
  height: 48px;
  width: auto;
  vertical-align: middle;
  flex-shrink: 0;
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 0.35s ease;
}

.logo:hover .logo-icon {
  transform: scale(1.1) rotate(-2deg);
  filter: drop-shadow(0 6px 12px rgba(0, 113, 188, 0.3));
}

/* LIENS DE NAVIGATION */
.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  align-items: center;
}

.nav-links li a:not(.btn) {
  position: relative;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 18px;
  border-radius: 30px;
  transition: var(--transition);
}

.nav-links li a:not(.btn):hover {
  color: var(--primary-color);
  background-color: rgba(0, 113, 188, 0.08);
  transform: translateY(-1px);
}

.nav-links li a.active:not(.btn) {
  color: var(--primary-color);
  background-color: rgba(0, 113, 188, 0.12);
}

.nav-links .btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #005a96);
  box-shadow: 0 4px 14px rgba(0, 113, 188, 0.28);
  padding: 9px 22px;
  border-radius: 30px;
  margin-left: 8px;
}

.nav-links .btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 113, 188, 0.42);
  background: linear-gradient(135deg, #005a96, var(--primary-color));
}

/* Menu Mobile Bouton Burger */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 20px;
  transition: var(--transition);
}

.menu-toggle:hover {
  background-color: rgba(0, 113, 188, 0.08);
  color: var(--primary-color);
}

/* =========================================
   HERO SECTION
========================================= */
.hero-title-img {
  display: block;
  width: 60%;
  height: auto;
  margin: 0 auto 20px auto;
  filter: none !important;
}

.hero {
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 80vh;
}

.hero-image {
  flex: 1;
  animation: fadeUp 0.8s ease-out;
}

.hero-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.hero-content {
  flex: 1;
  animation: fadeUp 0.8s ease-out 0.2s backwards;
}

.hero-content h1 {
  color: var(--primary-color);
}

.hero-benefits {
  list-style: none;
  margin: 20px 0 30px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-benefits li {
  background: rgba(0, 113, 188, 0.05);
  padding: 10px 15px;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary-color);
  font-size: 1.05rem;
  color: var(--text-main);
}

.hero-benefits li strong {
  color: var(--primary-color);
}

.store-badge {
  height: 50px;
  margin-top: 20px;
  transition: var(--transition);
}
.store-badge:hover {
  transform: translateY(-2px);
}

/* =========================================
   FONCTIONNALITÉS & AVANTAGES
========================================= */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card {
  background: var(--bg-main);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
  border-top: 4px solid var(--secondary-color);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

/* =========================================
   SECTION HISTOIRE
========================================= */
.story-container {
  max-width: 800px;
}

.story-content {
  background: var(--bg-main);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--primary-color);
  font-size: 1.1rem;
}

.story-content p {
  color: var(--text-main);
  margin-bottom: 20px;
}

.story-content p:last-child {
  margin-bottom: 0;
}

.story-content strong {
  color: var(--primary-color);
}

/* =========================================
   VIDÉO RESPONSIVE
========================================= */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-top: 40px;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* =========================================
   CTA SECTION
========================================= */
.cta-section {
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
}

.cta-section h2,
.cta-section p {
  color: white;
}

.cta-section .btn {
  background: white;
  color: var(--primary-color);
  margin-top: 20px;
}

.cta-section .btn:hover {
  background: #f0f0f0;
}

/* =========================================
   PAGE FORMULES, TABLEAUX & ENCADRÉS
========================================= */
.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.content-section {
  background: var(--bg-main);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.content-section h2 {
  margin-top: 35px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(0, 113, 188, 0.1);
}

.content-section h3 {
  margin-top: 25px;
  color: var(--text-main);
  font-size: 1.2rem;
}

/* TABLEAUX RESPONSIVES */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0 30px 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid #e5e5e5;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-main);
  text-align: left;
  font-size: 0.95rem;
}

th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid #e5e5e5;
  vertical-align: middle;
}

th {
  background-color: rgba(0, 113, 188, 0.08);
  color: var(--primary-color);
  font-weight: 600;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background-color: rgba(0, 113, 188, 0.02);
}

/* COMPOSANTS DE FORMULES */
.symbol-badge {
  display: inline-block;
  background: rgba(0, 113, 188, 0.1);
  color: var(--primary-color);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.95rem;
}

.formula-box {
  background: rgba(0, 113, 188, 0.05);
  border-left: 4px solid var(--primary-color);
  padding: 16px 20px;
  margin: 18px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: Consolas, Monaco, "Andale Mono", monospace;
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.6;
}

.info-callout {
  background: #fff8e6;
  border-left: 4px solid #ffb800;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: #5c4500;
  font-size: 0.95rem;
}

.anchor-box {
  background: var(--bg-alt);
  border: 1px solid rgba(0, 113, 188, 0.2);
  padding: 25px;
  border-radius: var(--radius);
  margin: 30px 0;
}

.anchor-box h3 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 12px;
}

.anchor-box ul {
  padding-left: 20px;
  color: var(--text-muted);
}

.anchor-box li {
  margin-bottom: 8px;
}

code {
  background-color: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: Consolas, Monaco, monospace;
  color: var(--primary-color);
  font-size: 0.9em;
}

/* =========================================
   FOOTER
========================================= */
footer {
  background-color: var(--text-main);
  color: white;
  padding: 40px 0 20px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

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

.footer-store-img {
  height: 40px;
  filter: grayscale(100%);
  opacity: 0.8;
}

/* =========================================
   ANIMATIONS
========================================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes menuSlide {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================================
   RESPONSIVE DESIGN (SMARTPHONES & TABLETTES)
========================================= */
@media (max-width: 768px) {
  header {
    top: 10px;
    padding: 0 12px;
  }

  .nav-container {
    height: 60px;
    padding: 0 16px;
    border-radius: 30px;
    position: relative;
  }

  .logo-icon {
    height: 38px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 113, 188, 0.15);
    gap: 10px;
  }

  .nav-links.active {
    display: flex;
    animation: menuSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links li a:not(.btn) {
    display: block;
    padding: 12px;
    width: 100%;
  }

  .nav-links .btn-primary {
    display: block;
    width: 100%;
    margin-left: 0;
    text-align: center;
  }

  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: 30px;
  }

  .hero-title-img {
    width: 80%;
  }

  h1 {
    font-size: 1.8rem;
  }

  .story-content {
    padding: 25px;
    font-size: 1rem;
  }

  .content-section {
    padding: 20px 15px;
  }

  th,
  td {
    padding: 10px 12px;
    font-size: 0.88rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}
