:root {
  --primary: #124e96;
  --primary-light: #e6f0ff;
  --dark: #16213e;
  --text: #333333;
  --bg: #f5f7fb;
  --border: #d0d7e2;
  --radius: 8px;
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

a:hover {
  text-decoration: underline;
}

.header {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ✅ FIX: brand-logo was a 32x32 blue square. Now supports <a><img></a> for the horizontal logo. */
.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0; /* avoids baseline gap under the image */
}

/* ✅ Consolidated / hardened logo styling for responsive */
.brand-logo-img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 220px;
  margin-right: 10px;
  border-radius: 8px; /* optionnel si tu veux adoucir les angles */
}

.brand-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark);
}

.brand-tagline {
  font-size: 0.8rem;
  color: #6b7280;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  color: #4b5563;
}

.nav-links a.active {
  color: var(--primary);
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  border-radius: 6px;      /* Coins légèrement arrondis */
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  
  /* Dégradé Bleu */
  background: linear-gradient(180deg, var(--primary) 0%, #0d3a6b 100%);
  
  /* FORCE LE TEXTE EN BLANC */
  color: #ffffff !important; 
  
  /* Ombre portée */
  box-shadow: 0 4px 6px rgba(18, 78, 150, 0.2), 0 1px 3px rgba(18, 78, 150, 0.1);
  
  transition: all 0.2s ease-in-out;
  text-decoration: none !important;
}

.btn:hover {
  background: linear-gradient(180deg, #155cb0 0%, var(--primary) 100%);
  color: #ffffff !important; /* Reste blanc au survol */
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(18, 78, 150, 0.25);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(18, 78, 150, 0.2);
}

/* Bouton Secondaire (Fond blanc, texte bleu) */
.btn-outline {
  background: white;
  border: 1px solid #d0d7e2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  
  /* FORCE LE TEXTE EN BLEU (var(--primary)) */
  color: var(--primary) !important; 
}

.btn-outline:hover {
  background: #f8fbff;
  border-color: var(--primary);
  color: var(--primary) !important;
  box-shadow: 0 4px 8px rgba(18, 78, 150, 0.1);
  transform: translateY(-1px);
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem 0 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(1.9rem, 3vw, 2.3rem);
  color: var(--dark);
  margin: 0 0 0.75rem;
}

.hero-subtitle {
  font-size: 1rem;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 1.3rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.hero-meta {
  font-size: 0.85rem;
  color: #6b7280;
}

.hero-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.hero-card-title {
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--dark);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.metric {
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  background: var(--bg);
  font-size: 0.8rem;
}

.metric-label {
  color: #6b7280;
  margin-bottom: 0.15rem;
}

.metric-value {
  font-weight: 600;
  color: var(--dark);
}

/* Sections */

.section {
  margin-top: 2.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.2rem;
  color: var(--dark);
  margin: 0;
}

.section-subtitle {
  font-size: 0.95rem;
  color: #6b7280;
  max-width: 520px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 1.2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  font-size: 0.9rem;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: var(--dark);
}

.card p {
  margin: 0 0 0.6rem;
  color: #4b5563;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
}

/* Layout spécifiques */

.columns {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 2rem;
}

/* Vidéos */

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  background: #000;
}

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

/* Listes */

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.feature-list li {
  padding-left: 1.1rem;
  position: relative;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.feature-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* Footer */

.footer-minimal {
  background: white;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 2rem 0;
  font-size: 0.9rem;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* Pour le mobile */
  gap: 1.5rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
}

/* ✅ Added to support footer brand link with mark + name */
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.footer-brand-name {
  font-weight: 700;
  color: var(--dark);
  font-size: 1rem;
}

.footer-copyright {
  color: #9ca3af;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  color: #4b5563;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--primary);
  text-decoration: none;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  height: 32px; /* Ajustez selon la hauteur réelle de votre logo */
  width: auto;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-product-logo {
  height: 26px; /* Un peu plus petit pour différencier le produit de l'entreprise */
  width: auto;
  margin-right: 1.5rem; /* Espace entre le logo RPGTools et les icônes */
  opacity: 0.9;
  transition: opacity 0.2s;
}

.footer-product-logo:hover {
  opacity: 1;
}

/* Ajustement pour mobile */
@media (max-width: 768px) {
  .footer-logo, .footer-product-logo {
    margin: 0 auto 0.5rem auto; /* Centre les logos sur mobile */
  }
  
  .footer-product-logo {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}

.social-icon {
  color: #6b7280;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}

.social-icon:hover {
  color: #0077b5; /* Bleu LinkedIn */
  transform: translateY(-2px);
}

.contact-link {
  color: #6b7280;
  font-size: 0.85rem;
}

.contact-link:hover {
  color: var(--primary);
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .footer-nav {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* ✅ Ensure the nav logo scales down on mobile */
  .brand-logo-img {
    height: 34px;
    max-width: 180px;
  }
}

/* Formulaire */

.form-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

label {
  font-size: 0.85rem;
  color: #4b5563;
  display: block;
  margin-bottom: 0.2rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-family: inherit;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

/* Responsive */

@media (max-width: 800px) {
  .hero,
  .columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  main {
    padding: 1rem;
  }
}

/* Extra small screens: scale brand logo further down */
@media (max-width: 420px) {
  .brand-logo-img {
    height: 30px;
    max-width: 150px;
  }
}

.lang-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
  margin-left: 10px;
}

.lang-link:hover {
  opacity: 1;
  transform: scale(1.1);
}

.flag-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: block;
}

.product-highlight {
  margin-top: 60px;
  padding: 40px 0;
}

.product-box {
  display: flex;
  gap: 30px;
  align-items: center;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  margin-top: 20px;
}

.product-logo {
  width: 140px;
  height: auto;
  border-radius: 20px;
}

/* =========================
   Contact form – messages
   ========================= */

.success-message {
  background: #e6f4ea;
  color: #1a7f37;
  border: 1px solid #b7e4c7;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.error-message {
  background: #fdecea;
  color: #b42318;
  border: 1px solid #f5c2c7;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* =========================
   Contact form – layout
   ========================= */

.form-group {
  margin-bottom: 0.9rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

/* =========================
   Contact form – focus UX
   ========================= */

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(18, 78, 150, 0.15);
}

.construction-banner {
  background-color: #f8d7da;
  color: #721c24;
  padding: 10px 15px;
  text-align: center;
  font-size: 0.9em;
  border-bottom: 1px solid #f5c6cb;
}


/* =========================
   Video Section - RPGTools Demos
   ========================= */

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

.video-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.video-wrapper {
  position: relative;
  background: #1a1a2e;
}

.video-wrapper video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}

.video-info {
  padding: 1rem 1.25rem;
}

.video-info h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--dark);
}

.video-info p {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.5;
}

.video-duration {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--bg);
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 500px) {
  .videos-grid {
    grid-template-columns: 1fr;
  }
  
  .video-info {
    padding: 0.9rem 1rem;
  }
}

/* Video loading state */
.video-wrapper video:not([poster]) {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
}

/* =========================
   Product Hero - Logo + Title side by side
   ========================= */

.product-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.product-hero-logo {
  flex-shrink: 0;
  width: 140px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-hero-text {
  flex: 1;
}

.product-hero-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--dark);
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.product-hero-subtitle {
  font-size: 1.05rem;
  color: #4b5563;
  line-height: 1.6;
  margin: 0;
}

/* Responsive: stack vertically on mobile */
@media (max-width: 600px) {
  .product-hero {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }

  .product-hero-logo {
    width: 100px;
  }

  .product-hero-title {
    font-size: 1.5rem;
  }

  .product-hero-subtitle {
    font-size: 0.95rem;
  }
}