/* ============================================
   AskMAIA - Custom Styles
   Palette de couleurs :
   - Primary (vert turquoise) : #7dcdbc
   - Accent (doré) : #de9f34
   - Dark (bleu nuit) : #1d243a
   - Light (bleu clair) : #c9d6ec
   ============================================ */

:root {
  /* Couleurs principales */
  --primary-color: #7dcdbc;   /* Vert turquoise */
  --accent-color: #de9f34;    /* Doré */
  --dark-color: #1d243a;     /* Bleu nuit */
  --light-color: #c9d6ec;    /* Bleu clair (renforcé) */
  --white-color: #ffffff;
  --text-color: #1d243a;     /* Texte principal */
  --text-light: #5a6a7a;     /* Texte secondaire */
  --text-white: #f8f9fa;     /* Blanc légèrement teinté pour meilleur contraste */
  --border-radius: 0.375rem;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --transition: all 0.25s ease;
}

/* ===== Global Styles ===== */
body {
  font-family: 'Lato', sans-serif;
  color: var(--text-color);
  line-height: 1.5;
  background-color: var(--white-color);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-color);
}

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

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

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

/* ===== Logo ===== */
.logo-img {
  max-height: 45px;
  width: auto;
}

/* ===== Navigation ===== */
#mainNav {
  background-color: var(--dark-color) !important;
  padding: 0.75rem 0;
  transition: padding-top 0.3s, padding-bottom 0.3s;
}

#mainNav .navbar-brand {
  color: var(--white-color);
  font-weight: 600;
}

#mainNav .nav-link {
  color: rgba(255, 255, 255, 0.75) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  transition: var(--transition);
  letter-spacing: 0.5px;
}

#mainNav .nav-link:hover {
  color: var(--primary-color) !important;
}

#mainNav .nav-link.active {
  color: var(--primary-color) !important;
}

#mainNav .navbar-toggler {
  border: none;
  padding: 0.5rem;
}

#mainNav .navbar-toggler:focus {
  box-shadow: none;
}

#mainNav.navbar-shrink {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

@media (min-width: 992px) {
  #mainNav {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  #mainNav .navbar-nav > li.nav-item > a.nav-link.active {
    color: var(--white-color) !important;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
  }
}

/* ===== Hero Section (Masthead) ===== */
.masthead {
  position: relative;
  overflow: hidden;
  padding-top: calc(5rem + 60px);
  padding-bottom: 5rem;
  background: linear-gradient(135deg, var(--dark-color) 0%, #253042 100%);
}

.masthead-logo {
  max-width: 300px;
  height: auto;
  margin-bottom: 1.5rem !important;
  border-radius: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.5));
}

.masthead-heading {
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--text-white);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.masthead-subheading {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* ===== Masthead Background Visualisations ===== */
.masthead-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
}

.masthead-bg svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#map-svg {
  top: 10%;
  opacity: 0.9;
}

#network-left-svg {
  width: 45%;
  height: 80%;
  top: auto;
  bottom: -5%;
  left: -5%;
  opacity: 0.7;
}

#network-right-svg {
  width: 45%;
  height: 80%;
  top: auto;
  bottom: -5%;
  right: -5%;
  left: auto;
  opacity: 0.7;
}

.masthead-content {
  position: relative;
  z-index: 1;
}

/* ===== Cartographie (background) ===== */
.map-land {
  fill: #7dcdbc;
  stroke: rgba(125, 205, 188, 0.4);
  stroke-width: 0.4;
}

.map-marker circle.dot {
  fill: var(--primary-color);
  stroke: #fff;
  stroke-width: 1;
}

.map-marker circle.pulse {
  fill: var(--primary-color);
  opacity: 0.3;
}

/* ===== Graphe de corrélation (background) ===== */
.network-node circle {
  fill: var(--primary-color);
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1;
}

.network-node--org circle { fill: var(--accent-color); }
.network-node--place circle { fill: #6a8db5; }
.network-node--event circle { fill: #c0506e; }

.network-edge {
  stroke: rgba(125, 205, 188, 0.5);
  stroke-width: 1;
  stroke-opacity: 0.4;
}

.network-label {
  font-family: 'Lato', sans-serif;
  font-size: 10px;
  fill: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  user-select: none;
}

/* ===== Responsive masthead-bg ===== */
@media (max-width: 768px) {
  .masthead-bg {
    opacity: 0.12;
  }

  #network-left-svg,
  #network-right-svg {
    display: none;
  }
}

@media (min-width: 768px) {
  .masthead {
    padding-top: calc(6rem + 70px);
    padding-bottom: 6rem;
  }
  .masthead-heading {
    font-size: 2.75rem;
  }
  .masthead-subheading {
    font-size: 1.35rem;
  }
  .masthead-logo {
    max-width: 380px;
  }
}

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

.page-section-heading {
  font-size: 1.75rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--text-color);
}

.page-section-subheading {
  font-size: 1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 1rem;
}

@media (min-width: 992px) {
  .page-section {
    padding: 5rem 0;
  }
  .page-section-heading {
    font-size: 2.25rem;
  }
  .page-section-subheading {
    font-size: 1.1rem;
  }
}

/* ===== Section Backgrounds (alternance bleu marine / bleu clair) ===== */
.section-navy {
  background: linear-gradient(135deg, var(--dark-color) 0%, #253042 100%);
  color: var(--text-white);
}

.section-light {
  background-color: var(--light-color);
  color: var(--text-color);
}

.section-navy .page-section-heading {
  color: var(--text-white);
}

.section-navy .page-section-subheading {
  color: rgba(255, 255, 255, 0.85);
}

/* Texte clair uniquement sur le texte "libre" des sections bleu marine
   (hors cartes, qui ont leur propre fond blanc et texte foncé). */
.section-navy > .container .lead,
.section-navy > .container > .row .lead,
#about .lead,
#about .small,
#about p {
  color: var(--text-white);
}

/* Verrouillage : le texte des cartes reste foncé sur fond blanc,
   quelle que soit la section (navy ou light). */
.use-case-card p,
.use-case-card .small,
.use-case-card h3,
.feature-card p,
.feature-card .small,
.feature-card h3,
.benefit-card p,
.benefit-card .small,
.benefit-card h3 {
  color: var(--text-color) !important;
}

.use-case-card h3 {
  color: var(--primary-color) !important;
}

/* ===== About Section ===== */
#about .page-section-heading,
#about .divider-custom {
  text-align: center;
}

#about .col-lg-6:first-child {
  text-align: center;
}

#about .lead,
#about .small,
#about p {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Divider Custom ===== */
.divider-custom {
  margin: 1.5rem 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.divider-custom .divider-custom-line {
  width: 100%;
  max-width: 5rem;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 1rem;
}

.divider-custom .divider-custom-line:first-child {
  margin-right: 1rem;
}

.divider-custom .divider-custom-line:last-child {
  margin-left: 1rem;
}

.divider-custom .divider-custom-icon {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.divider-custom.divider-light .divider-custom-line {
  background-color: var(--white-color);
}

.divider-custom.divider-light .divider-custom-icon {
  color: var(--white-color);
}

/* ===== Cards Styles ===== */
.feature-card, .use-case-card, .benefit-card, .contact-info, .contact-form {
  background: var(--white-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.feature-card:hover, .use-case-card:hover, .benefit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.feature-icon, .benefit-icon {
  color: var(--primary-color);
}

/* Feature Cards */
.feature-card {
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

/* Use Case Cards */
.use-case-card {
  border-left: 3px solid var(--primary-color);
}

.use-case-card h3 {
  color: var(--primary-color) !important;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.use-case-card p {
  color: var(--text-color);
}

/* ===== Use Case — Emojis illustratifs ===== */
.use-case-body {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.use-case-text {
  flex: 1 1 auto;
}

.use-case-emoji {
  flex: 0 0 auto;
  font-size: 3rem;
  line-height: 1;
}

/* Bouton "En savoir plus" des cartes cas d'usage */
.use-case-card .btn-outline-primary {
  border-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.35rem 0.9rem;
}

.use-case-card .btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: var(--dark-color);
  border-color: var(--primary-color);
}

/* Modales cas d'usage */
.modal-content {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background-color: var(--dark-color);
}

.modal-header .modal-title {
  color: var(--text-white);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

.modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-body h6 {
  color: var(--primary-color);
  font-weight: 600;
}

.modal-body ul {
  padding-left: 1.25rem;
}

.modal-body li {
  margin-bottom: 0.4rem;
  color: var(--text-color);
}

.modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

@media (max-width: 576px) {
  .use-case-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* Benefit Cards */
.benefit-icon {
  color: var(--accent-color);
}

.benefit-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

/* ===== Contact Section ===== */
#contact {
  background-color: var(--light-color);
}

.contact-info {
  background: var(--white-color);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.contact-info h3, .contact-form h3 {
  color: var(--text-color);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.contact-info h4 {
  color: var(--text-color);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.contact-info p {
  color: var(--text-light);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.contact-info a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
}

.contact-info a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.contact-form {
  background: var(--white-color);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ===== Form Styles ===== */
.form-control {
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 0.6rem 1rem;
  background: var(--white-color);
  color: var(--text-color);
  transition: var(--transition);
}

.form-control::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.form-control:focus {
  border-color: var(--primary-color);
  background: var(--white-color);
  box-shadow: 0 0 0 0.2rem rgba(125, 205, 188, 0.25);
  color: var(--text-color);
}

.form-floating > label {
  color: var(--text-light);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
}

.form-check-label {
  color: var(--text-color);
  font-size: 0.9rem;
}

/* ===== Buttons ===== */
.btn {
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition);
  padding: 0.6rem 1.25rem;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--dark-color);
  font-weight: 600;
}

.btn-primary:hover {
  background-color: #6bc4b1;
  border-color: #6bc4b1;
  transform: translateY(-1px);
  color: var(--dark-color);
}

.btn-accent {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--dark-color);
  font-weight: 600;
}

.btn-accent:hover {
  background-color: #c88f2f;
  border-color: #c88f2f;
  transform: translateY(-1px);
  color: var(--dark-color);
}

.btn-outline-light {
  border-radius: var(--border-radius);
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  transition: var(--transition);
  color: var(--text-white);
  border-color: var(--text-white);
}

.btn-outline-light:hover {
  background-color: var(--text-white);
  color: var(--dark-color);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* ===== Alert Messages ===== */
.alert {
  border-radius: var(--border-radius);
  border: none;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* ===== Footer ===== */
.footer {
  background-color: var(--dark-color);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

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

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .page-section-heading {
    font-size: 1.5rem;
  }

  .masthead .masthead-heading {
    font-size: 1.75rem;
  }

  .masthead .masthead-subheading {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .masthead {
    padding-top: calc(4rem + 60px) !important;
    padding-bottom: 4rem !important;
  }

  .page-section {
    padding: 3rem 0 !important;
  }

  .contact-info, .contact-form {
    margin-bottom: 1.5rem;
  }

  .masthead-logo {
    max-width: 280px !important;
  }

  .masthead-heading {
    font-size: 1.5rem !important;
  }
}

/* ===== Smooth Scrolling ===== */
html {
  scroll-padding-top: calc(3.5rem - 1px);
}

/* ===== Navbar Shrink on Scroll ===== */
.navbar-shrink {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}