/* ====== Theme tokens ====== */
:root {
  --bg: #d35656;
  --text: #6b7280;
  --text-strong: #4b5563;
  --title: #4a4a4a;

  --divider: #e5e7eb;

  --footer-bg: var(--bg);
  --footer-text: #d1d5db;
  --footer-muted: rgba(255, 255, 255, 0.7);

  --input-bg: rgba(255, 255, 255, 0.08);
  --input-border: rgba(255, 255, 255, 0.15);
  --focus: rgba(30, 73, 242, 0.35);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ====== Buttons ====== */
.btn-primary {
  background-color: #294bbb;
  border-color: #2e6694;
  color: #ffffff;
}

/* ====== Text in evidence color ====== */
.text-evidence {
  color: #294bbb;
}

/* ====== Navigation Bar Styles ====== */
/* Set maximum width for navbar container (overrides inline styles) */
header .container,
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px !important;
}

/* Reduce navbar height for a more compact design */
.navbar {
  min-height: 60px;
  max-height: 80px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Navbar logo sizing for desktop */
.navbar-logo {
  width: 180px;
  height: 180px;
}

/* Navbar menu spacing */
.navbar-nav {
  padding-right: 20px;
}

/* Navbar responsive adjustments for tablets and mobile devices */
/* Tablets (max-width: 991.98px) */
@media (max-width: 991.98px) {
  .navbar {
    min-height: 60px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    justify-content: flex-start;
  }

  .navbar-logo {
    width: auto;
    max-height: 44px;
  }
}

/* Mobile devices (max-width: 575.98px) */
@media (max-width: 575.98px) {
  .navbar {
    min-height: 56px;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .navbar-logo {
    width: auto;
    height: 38px;
  }

  .navbar-toggler {
    padding: 0.3rem 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
  }
}

/* ====== Offcanvas Menu Panel Styles ====== */
/* Custom styling for the mobile/tablet menu panel */
.offcanvas {
  max-width: 280px;
}

.offcanvas-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.offcanvas-title {
  font-weight: 600;
  color: #294bbb;
}

.offcanvas-body {
  padding: 1.5rem 1rem;
}

/* Offcanvas menu items styling */
.offcanvas-body .navbar-nav {
  flex-direction: column;
  gap: 0.5rem;
}

.offcanvas-body .nav-link {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.offcanvas-body .nav-link:hover {
  background-color: #f8f9fa;
}

.offcanvas-body .nav-link.active {
  background-color: #dbe2fb;
  color: #0d6efd;
}

/* Desktop: show normal navbar, hide offcanvas behavior */
@media (min-width: 992px) {
  .offcanvas {
    position: static !important;
    visibility: visible !important;
    transform: none !important;
    width: auto !important;
    max-width: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .offcanvas-header {
    display: none;
  }

  .offcanvas-body {
    padding: 0;
    overflow-y: visible !important;
  }

  .offcanvas-body .navbar-nav {
    flex-direction: row;
    gap: 0.5rem;
  }

  .offcanvas-body .nav-link {
    padding: 0.5rem 1rem;
  }
}

/* ====== Accessibility ====== */
/* Screen reader only and visually hidden elements */
.sr-only,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ====== Placeholders (images + icons) ====== */
.ph-img {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
}

.ph-img--hero {
  height: 260px;
}

/* Card images for homepage bottom section (3 cards layout) */
.ph-img--card {
  height: 160px;
  /* hauteur fixe = carte stable */
  background: #f8f9fb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ph-img--card img {
  max-height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
}

/* Time Awareness illustration card - Fixed height with rounded corners */
.ph-card {
  height: 300px;
  /* taille fixe de la carte */
  border-radius: 1rem;
  /* coins arrondis */
  overflow: hidden;
  /* respecte les coins */
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.08);
  /* ombre douce */
  background: #fff;
}

.ph-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* image incrustée (fill) */
  object-position: center;
  display: block;
}

/* FAQ page card styling */
.ph-cardFaq {
  height: 200px;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.08);
  background: #fff;
}

/* Step-by-step guide image placeholders (different sizes) */
.ph-img--step-lg {
  height: 210px;
}

.ph-img--step-md {
  height: 180px;
}

.ph-img--step-sm {
  height: 170px;
}

/* Icon placeholder styling */
.ph-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px dashed rgba(0, 0, 0, 0.15);
  display: inline-block;
  flex: 0 0 auto;
}

.ph-icon--sm {
  width: 28px;
  height: 28px;
  border-radius: 10px;
}

/* Responsive adjustments for image placeholders */
/* Tablets */
@media (max-width: 991.98px) {
  .ph-img--hero {
    height: 240px;
  }

  .ph-img--step-lg {
    height: 190px;
  }

  .ph-img--step-md {
    height: 170px;
  }

  .ph-img--step-sm {
    height: 160px;
  }
}

/* Mobile devices */
@media (max-width: 575.98px) {
  .ph-img--hero {
    height: 210px;
  }

  .ph-img--step-lg {
    height: 170px;
  }

  .ph-img--step-md {
    height: 160px;
  }

  .ph-img--step-sm {
    height: 150px;
  }

  .ph-img--card {
    height: 160px;
  }
}

/* ====== Footer ====== */
.footer {
  background: #101e4a;
  color: var(--footer-text);
}

.footer__muted {
  color: var(--footer-muted);
}

.footer__link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.footer__link:hover {
  text-decoration: underline;
}

.footer__input {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: #7e7e7e;
}

.footer__input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.footer__icon {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ====== HowToUse ====== */
.howto__divider {
  height: 2px;
  width: min(520px, 85%);
  margin-inline: auto;
  background: rgba(153, 153, 153, 0.15);
  border-radius: 999px;
}

/* Steps cards: make the media cards taller on the HowToUse page */
.howto .howto-steps .media-card .ratio {
  /* Bootstrap ratio default for 16x9 is 56.25%. Increasing it makes cards taller. */
  --bs-aspect-ratio: 70%;
}

/* Steps images: show the full image (no cropping) inside the card */
.howto .howto-steps .media-card img {
  object-fit: contain;
  background: #fff;
}

@media (max-width: 575.98px) {
  .howto .howto-steps .media-card .ratio {
    --bs-aspect-ratio: 75%;
  }
}

/* ====== Privacy / Terms section separators ====== */
.privacy-section + .privacy-section,
.terms-section + .terms-section {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ====== FAQ look (cards + chevron right) ====== */
.faq-accordion .accordion-item {
  background: transparent;
  border: 0;
  margin-bottom: 16px;
}

.faq-accordion .accordion-button {
  background: #fff;
  border-radius: 18px !important;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 22px 22px;
  font-weight: 600;
  color: #404040;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.faq-accordion .accordion-button:focus {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
}

.faq-accordion .accordion-button:not(.collapsed) {
  color: #2f2f2f;
  background: #fff;
}

.faq-accordion .accordion-body {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  margin-top: -10px;
  padding: 18px 22px 22px;
}

.faq-accordion .accordion-button::after {
  opacity: 0.8;
}

/* FAQ accordion mobile adjustments */
@media (max-width: 575.98px) {
  .faq-accordion .accordion-button {
    padding: 18px 18px;
  }

  .faq-accordion .accordion-body {
    padding: 16px 18px 18px;
  }
}

/* ======================= Contact Page Styles =============================== */
/* Contact form input and textarea styling */
.contact-form .contact-input,
.contact-form .contact-textarea {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  padding-left: 18px;
  padding-right: 18px;
}

/* Textarea specific styling */
.contact-form .contact-textarea {
  padding-top: 16px;
  padding-bottom: 16px;
  resize: vertical;
  max-height: 200px;
}

/* Contact form submit button */
.contact-submit {
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

/* ===== Subject Accordion (Contact) ===== */
.subject-accordion .subject-accordion__item {
  background: transparent;
  border: 0;
}

.subject-accordion .subject-accordion__btn {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  padding: 0.9rem 18px; /* proche form-control-lg */
  color: #6b7280;
  font-weight: 400;
}

.subject-accordion .subject-accordion__btn:focus {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.subject-accordion .subject-accordion__btn:not(.collapsed) {
  background: #fff;
  color: #4b5563;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.subject-accordion .subject-accordion__body {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-top: 0;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.subject-accordion__opt {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 0;
  padding: 4px 18px;
  font-size: 1rem;
  color: #9ea9b9;
}

.subject-accordion__opt:hover {
  background: #f8f9fa;
}

.subject-accordion__btn,
.subject-accordion__opt {
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 400;
  color: #6b7280;
}

/* ===================== End of contact page styles =========================== */

/* ===== Global section spacing ===== */
main > .container > section {
  margin-top: 0px;
  margin-bottom: 8px;
}

/* Responsive section spacing adjustments for mobile */
@media (max-width: 768px) {
  main > .container > section {
    margin-bottom: 64px;
  }
}

/* Specific spacing for card sections */
.section-cards {
  margin-bottom: 10px;
}

/* Features section spacing */
.section-features {
  margin-top: 64px;
}

/* Hero section spacing - Creates visual separation after hero */
.section-after-hero {
  margin-top: 634px;
}

/* Hero section mobile spacing */
@media (max-width: 768px) {
  .section-after-hero {
    margin-top: 48px;
  }
}

/* ====== Media Cards ====== */
/* Container for images/videos - Responsive without breaking on mobile */
.media-card {
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Media card content sizing */
.media-card img,
.media-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Use "contain" to show entire image without cropping */
  display: block;
}

/* ====== Active Navigation Link Styles ====== */
/* Highlighted state for current page in navigation */
.nav-link.active {
  color: #0d6efd;
  background-color: #dbe2fb;
  border-radius: 6px;
  font-weight: 600;
}
